lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200708132338.GO25523@casper.infradead.org>
Date:   Wed, 8 Jul 2020 14:23:38 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Guoqing Jiang <guoqing.jiang@...ud.ionos.com>
Cc:     Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>,
        Song Liu <song@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-kernel@...r.kernel.org, linux-xtensa@...ux-xtensa.org,
        linux-block@...r.kernel.org, linux-raid@...r.kernel.org,
        linux-mmc@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/6] md: switch to ->check_events for media change
 notifications

On Wed, Jul 08, 2020 at 03:17:31PM +0200, Guoqing Jiang wrote:
> On 7/8/20 2:25 PM, Christoph Hellwig wrote:
> > -static int md_media_changed(struct gendisk *disk)
> > -{
> > -	struct mddev *mddev = disk->private_data;
> > -
> > -	return mddev->changed;
> > -}
> 
> Maybe we can remove "changed" from struct mddev since no one reads it
> after the change.

You missed this hunk:

+static unsigned int md_check_events(struct gendisk *disk, unsigned int clearing)
 {
        struct mddev *mddev = disk->private_data;
+	unsigned int ret = 0;

+	if (mddev->changed)
+               ret = DISK_EVENT_MEDIA_CHANGE;
        mddev->changed = 0;
-	return 0;
+	return ret;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ