[dm-devel] [PATCH] shmfs: don't allocate pages on read

2020-07-21 Thread Mikulas Patocka
Hi Do we still need the patch a0ee5ec520ede? We are using the loop device for testing and when we read something from the loop device, it allocates the pages on the underlying shmfs filesystem. See this example: # mkdir -p /mnt/test # mount -t tmpfs /dev/null /mnt/test # cd /mnt/test # truncat

Re: [dm-devel] [PATCH 11/14] mm: use SWP_SYNCHRONOUS_IO more intelligently

2020-07-21 Thread Minchan Kim
Thanks for Ccing me, Shakeel. On Mon, Jul 20, 2020 at 10:52:55AM -0700, Shakeel Butt wrote: > +Minchan Kim > > On Mon, Jul 20, 2020 at 12:52 AM Christoph Hellwig wrote: > > > > There is no point in trying to call bdev_read_page if SWP_SYNCHRONOUS_IO > > is not set, as the device won't support it

Re: [dm-devel] [PATCH 04/14] bdi: initialize ->ra_pages in bdi_init

2020-07-21 Thread Richard Weinberger
On Mon, Jul 20, 2020 at 2:37 PM Artem Bityutskiy wrote: > > On Mon, 2020-07-20 at 14:07 +0200, Christoph Hellwig wrote: > > What about jffs2 and blk2mtd raw block devices? I don't worry much about blk2mtd. > If my memory serves me correctly JFFS2 did not mind readahead. This covers my knowledge

Re: [dm-devel] [PATCH 1/3] block: inherit the zoned characteristics in blk_stack_limits

2020-07-21 Thread Mike Snitzer
On Mon, Jul 20 2020 at 2:12am -0400, Christoph Hellwig wrote: > Lift the code from device mapper into blk_stack_limits to inherity > the stacking limitations. This ensures we do the right thing for > all stacked zoned block devices. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer

[dm-devel] bdi cleanups v2

2020-07-21 Thread Christoph Hellwig
Hi Jens, this series contains a bunch of different BDI cleanups. The biggest item is to isolate block drivers from the BDI in preparation of changing the lifetime of the block device BDI in a follow up series. Changes since v1: - rebased to the for-5.9/block-merge branch - explicitly set the

[dm-devel] [PATCH 09/14] bdi: remove BDI_CAP_CGROUP_WRITEBACK

2020-07-21 Thread Christoph Hellwig
Just checking SB_I_CGROUPWB for cgroup writeback support is enough. Either the file system allocates its own bdi (e.g. btrfs), in which case it is know to support cgroup writeback, or the bdi comes from the block layer, which always supports cgroup writeback. Signed-off-by: Christoph Hellwig ---

[dm-devel] [PATCH 05/14] md: update the optimal I/O size on reshape

2020-07-21 Thread Christoph Hellwig
The raid5 and raid10 drivers currently update the read-ahead size, but not the optimal I/O size on reshape. To prepare for deriving the read-ahead size from the optimal I/O size make sure it is updated as well. Signed-off-by: Christoph Hellwig --- drivers/md/raid10.c | 22 ++

[dm-devel] [PATCH 04/14] bdi: initialize ->ra_pages in bdi_init

2020-07-21 Thread Christoph Hellwig
Set up a readahead size by default, as very few users have a good reason to change it. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 1 - drivers/mtd/mtdcore.c | 1 + fs/9p/vfs_super.c | 4 ++-- fs/afs/super.c| 1 - fs/btrfs/disk-io.c| 1 - fs/fuse/inode.c |

[dm-devel] [PATCH 11/14] mm: use SWP_SYNCHRONOUS_IO more intelligently

2020-07-21 Thread Christoph Hellwig
There is no point in trying to call bdev_read_page if SWP_SYNCHRONOUS_IO is not set, as the device won't support it. Signed-off-by: Christoph Hellwig --- mm/page_io.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index ccda767

[dm-devel] [PATCH 12/14] bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag

2020-07-21 Thread Christoph Hellwig
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

[dm-devel] [PATCH 10/14] bdi: remove BDI_CAP_SYNCHRONOUS_IO

2020-07-21 Thread Christoph Hellwig
BDI_CAP_SYNCHRONOUS_IO is only checked in the swap code, and used to decided if ->rw_page can be used on a block device. Just check up for the method instead. The only complication is that zram needs a second set of block_device_operations as it can switch between modes that actually support ->rw

[dm-devel] [PATCH 08/14] block: add helper macros for queue sysfs entries

2020-07-21 Thread Christoph Hellwig
Add two helpers macros to avoid boilerplate code for the queue sysfs entries. Signed-off-by: Christoph Hellwig --- block/blk-sysfs.c | 248 +++--- 1 file changed, 58 insertions(+), 190 deletions(-) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index

[dm-devel] [PATCH 01/14] fs: remove the unused SB_I_MULTIROOT flag

2020-07-21 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/namei.c | 4 ++-- include/linux/fs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 72d4219c93acb7..e9ff0d54a110a7 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -568,8 +568,8 @@ static bool path_con

[dm-devel] [PATCH 13/14] bdi: invert BDI_CAP_NO_ACCT_WB

2020-07-21 Thread Christoph Hellwig
Replace BDI_CAP_NO_ACCT_WB with a positive BDI_CAP_WRITEBACK_ACCT to make the checks more obvious. Also remove the pointless bdi_cap_account_writeback wrapper that just obsfucates the check. Signed-off-by: Christoph Hellwig --- fs/fuse/inode.c | 3 ++- include/linux/backing-dev.h |

[dm-devel] [PATCH 07/14] block: make QUEUE_SYSFS_BIT_FNS a little more useful

2020-07-21 Thread Christoph Hellwig
Generate the queue_sysfs_entry given that we have all the required information for it, and rename the generated show and store methods to match the other ones in the file. Signed-off-by: Christoph Hellwig --- block/blk-sysfs.c | 31 +-- 1 file changed, 9 insertions(+)

[dm-devel] [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-21 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not use by VM writeback will not be marked congested, so the check will never trigger. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_nl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers