diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-24 08:51:38 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-24 21:43:39 +0200 |
commit | 1cb039f3dc1619eb795c54aad0a98fdb379b4237 (patch) | |
tree | f2fbc89b26bd404d4f31b66b258e5ca08a5d9070 /mm/backing-dev.c | |
parent | mm: use SWP_SYNCHRONOUS_IO more intelligently (diff) | |
download | linux-1cb039f3dc1619eb795c54aad0a98fdb379b4237.tar.xz linux-1cb039f3dc1619eb795c54aad0a98fdb379b4237.zip |
bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag
The BDI_CAP_STABLE_WRITES is one of the few bits of information in the
backing_dev_info shared between the block drivers and the writeback code.
To help untangling the dependency replace it with a queue flag and a
superblock flag derived from it. This also helps with the case of e.g.
a file system requiring stable writes due to its own checksumming, but
not forcing it on other users of the block device like the swap code.
One downside is that we an't support the stable_pages_required bdi
attribute in sysfs anymore. It is replaced with a queue attribute which
also is writable for easier testing.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 2dac3be61271..8e3802bf03a9 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -204,10 +204,9 @@ static ssize_t stable_pages_required_show(struct device *dev, struct device_attribute *attr, char *page) { - struct backing_dev_info *bdi = dev_get_drvdata(dev); - - return snprintf(page, PAGE_SIZE-1, "%d\n", - bdi_cap_stable_pages_required(bdi) ? 1 : 0); + dev_warn_once(dev, + "the stable_pages_required attribute has been removed. Use the stable_writes queue attribute instead.\n"); + return snprintf(page, PAGE_SIZE-1, "%d\n", 0); } static DEVICE_ATTR_RO(stable_pages_required); |