bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag
authorChristoph Hellwig <hch@lst.de>
Thu, 24 Sep 2020 06:51:38 +0000 (08:51 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 24 Sep 2020 19:43:39 +0000 (13:43 -0600)
commit1cb039f3dc1619eb795c54aad0a98fdb379b4237
treef2fbc89b26bd404d4f31b66b258e5ca08a5d9070
parent5115db10a8e0a525edf8a65b2ed4eac5c8253095
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>
18 files changed:
block/blk-integrity.c
block/blk-mq-debugfs.c
block/blk-sysfs.c
drivers/block/rbd.c
drivers/block/zram/zram_drv.c
drivers/md/dm-table.c
drivers/md/raid5.c
drivers/mmc/core/queue.c
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/scsi/iscsi_tcp.c
fs/super.c
include/linux/backing-dev.h
include/linux/blkdev.h
include/linux/fs.h
mm/backing-dev.c
mm/page-writeback.c
mm/swapfile.c