]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7d63ed006b47b8f926b47d475dd9de0750010ca6
treef2fbc89b26bd404d4f31b66b258e5ca08a5d9070
parentf7b9da588e1dd66a35279a7ab185aa15f1d7965a
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