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]
Date:   Sat, 26 Nov 2016 23:41:04 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:     Minchan Kim <minchan@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, Takashi Iwai <tiwai@...e.de>,
        Hyeoncheol Lee <cheol.lee@....com>, yjay.kim@....com,
        Sangseok Lee <sangseok.lee@....com>,
        Hugh Dickins <hughd@...gle.com>, stable@...r.kernel.org
Subject: Re: [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES

Hi Sergey,

On Sat, Nov 26, 2016 at 03:37:01PM +0900, Sergey Senozhatsky wrote:
> Hello Minchan,
> 
> On (11/25/16 17:35), Minchan Kim wrote:
> [..]
> > +static void zram_revalidate_disk(struct zram *zram)
> > +{
> > +	revalidate_disk(zram->disk);
> > +	zram->disk->queue->backing_dev_info.capabilities |=
> > +		BDI_CAP_STABLE_WRITES;
> > +}
> > +
> >  /*
> >   * Check if request is within bounds and aligned on zram logical blocks.
> >   */
> > @@ -1094,7 +1102,7 @@ static ssize_t disksize_store(struct device *dev,
> >  	zram->comp = comp;
> >  	zram->disksize = disksize;
> >  	set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT);
> > -	revalidate_disk(zram->disk);
> > +	zram_revalidate_disk(zram);
> >  	up_write(&zram->init_lock);
> >  
> >  	return len;
> > @@ -1142,7 +1150,7 @@ static ssize_t reset_store(struct device *dev,
> >  	/* Make sure all the pending I/O are finished */
> >  	fsync_bdev(bdev);
> >  	zram_reset_device(zram);
> > -	revalidate_disk(zram->disk);
> > +	zram_revalidate_disk(zram);
> >  	bdput(bdev);
> >  
> >  	mutex_lock(&bdev->bd_mutex);
> 
> why not set it just once, when we allocate queue/disk and configure both
> of them:  in zram_add()

I should have mentioned the reason.
The revalidate_disk reset the BDI_CAP_STABLE_WRITES.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ