From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Takashi Iwai <tiwai@suse.de>, Hyeoncheol Lee <cheol.lee@lge.com>,
yjay.kim@lge.com, Sangseok Lee <sangseok.lee@lge.com>,
Hugh Dickins <hughd@google.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES
Date: Sat, 26 Nov 2016 15:37:01 +0900 [thread overview]
Message-ID: <20161126063701.GA521@tigerII> (raw)
In-Reply-To: <1480062914-25556-4-git-send-email-minchan@kernel.org>
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
next prev parent reply other threads:[~2016-11-26 6:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1480062914-25556-1-git-send-email-minchan@kernel.org>
2016-11-25 8:35 ` [PATCH v3 1/3] mm: support anonymous stable page Minchan Kim
2016-11-27 13:19 ` Sergey Senozhatsky
2016-11-28 0:41 ` Minchan Kim
2016-11-28 5:38 ` Sergey Senozhatsky
2016-11-25 8:35 ` [PATCH v3 2/3] zram: revalidate disk under init_lock Minchan Kim
2016-11-26 6:38 ` Sergey Senozhatsky
2016-11-25 8:35 ` [PATCH v3 3/3] zram: support BDI_CAP_STABLE_WRITES Minchan Kim
2016-11-26 6:37 ` Sergey Senozhatsky [this message]
2016-11-26 14:41 ` Minchan Kim
2016-11-27 13:01 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161126063701.GA521@tigerII \
--to=sergey.senozhatsky@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cheol.lee@lge.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=sangseok.lee@lge.com \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=yjay.kim@lge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).