Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1530598 > unrolled thread
| Started by | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| First post | 2016-11-26 07:40 +0100 |
| Last post | 2016-11-27 14:10 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-11-26 07:40 +0100
Re: [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES Minchan Kim <minchan@kernel.org> - 2016-11-26 15:50 +0100
Re: [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-11-27 14:10 +0100
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Date | 2016-11-26 07:40 +0100 |
| Subject | Re: [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES |
| Message-ID | <sHEOt-2YC-1@gated-at.bofh.it> |
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()
queue->backing_dev_info.capabilities |= BDI_CAP_CGROUP_WRITEBACK;
-ss
[toc] | [next] | [standalone]
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Date | 2016-11-26 15:50 +0100 |
| Message-ID | <sHMsG-7SF-23@gated-at.bofh.it> |
| In reply to | #1530598 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Date | 2016-11-27 14:10 +0100 |
| Message-ID | <sI7nr-4GE-3@gated-at.bofh.it> |
| In reply to | #1530674 |
On (11/26/16 23:41), Minchan Kim wrote: [..] > > > 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. aha. either sets or clears it in blk_integrity_revalidate(), now I see it. -ss
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web