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

2020-07-20 Thread Christoph Hellwig
On Mon, Jul 20, 2020 at 11:27:57PM +0200, Richard Weinberger wrote: > 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

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

2020-07-20 Thread Shakeel Butt
+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. Also there is no point in > trying a bio submission if bdev_read_page failed. This will at least

Re: [dm-devel] a fix and two cleanups around blk_stack_limits

2020-07-20 Thread Jens Axboe
On 7/20/20 3:35 PM, Jens Axboe wrote: > On 7/20/20 11:35 AM, Christoph Hellwig wrote: >> On Mon, Jul 20, 2020 at 10:56:23AM -0600, Jens Axboe wrote: >>> On 7/20/20 12:12 AM, Christoph Hellwig wrote: Hi Jens, this series ensures that the zoned device limitations are properly

Re: [dm-devel] a fix and two cleanups around blk_stack_limits

2020-07-20 Thread Jens Axboe
On 7/20/20 11:35 AM, Christoph Hellwig wrote: > On Mon, Jul 20, 2020 at 10:56:23AM -0600, Jens Axboe wrote: >> On 7/20/20 12:12 AM, Christoph Hellwig wrote: >>> Hi Jens, >>> >>> this series ensures that the zoned device limitations are properly >>> inherited in blk_stack_limits, and then cleanups

Re: [dm-devel] [PATCH 00/80] multipath-tools series part VI: incomplete udev initialization

2020-07-20 Thread Benjamin Marzinski
On Thu, Jul 09, 2020 at 01:03:24PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, hi Ben, > > This is part VI of a larger patch series for multipath-tools I've been > preparing. > It's based on the previously submitted part V. > > The full series will also be available

Re: [dm-devel] [PATCH 00/74] multipath-tools series part V: removed path handling

2020-07-20 Thread Benjamin Marzinski
On Thu, Jul 09, 2020 at 12:51:24PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, hi Ben, > > This is part V of a larger patch series for multipath-tools I've been > preparing. > It's based on the previously submitted part IV. > > The full series will also be available

Re: [dm-devel] [PATCH 00/54] multipath-tools series part IV: identify paths by dev_t

2020-07-20 Thread Benjamin Marzinski
On Thu, Jul 09, 2020 at 12:36:11PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, hi Ben, > > This is part IV of a larger patch series for multipath-tools I've been > preparing. > It's based on the previously submitted part III. > > The full series will also be

Re: [dm-devel] [PATCH 42/42] libmultipath: dm_addmap(): refuse creating map with empty WWID

2020-07-20 Thread Benjamin Marzinski
On Thu, Jul 09, 2020 at 12:35:13PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > We already avoid creating maps with empty WWID in coalesce_paths() > as well as in ev_add_path(). The only code path where it's difficult > to prove (although extremely unlikely) that we can't call >

Re: [dm-devel] [PATCH 00/35] multipath-tools series part I: minor changes

2020-07-20 Thread Benjamin Marzinski
On Thu, Jul 09, 2020 at 12:15:45PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, hi Ben, > > This is part I of a larger patch series for multpath-tools I've been > preparing. > It contains self-contained fixes and cleanups, and unit test additions. > > The full series

Re: [dm-devel] [PATCH 00/42] multipath-tools series part III: duplicate alias

2020-07-20 Thread Benjamin Marzinski
On Thu, Jul 09, 2020 at 12:35:10PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, hi Ben, > > This is part II of a larger patch series for multpath-tools I've been > preparing. > It contains fixes for a customer issue where the same alias was set for > several maps with

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

2020-07-20 Thread Richard Weinberger
Hello Chrstoph, On Mon, Jul 20, 2020 at 9:53 AM Christoph Hellwig wrote: > > Set up a readahead size by default. This changes behavior for mtd, > ubifs, and vboxsf to actually enabled readahead, the lack of which > very much looks like an oversight. UBIFS doesn't enable readahead on purpose,

Re: [dm-devel] a fix and two cleanups around blk_stack_limits

2020-07-20 Thread Christoph Hellwig
On Mon, Jul 20, 2020 at 10:56:23AM -0600, Jens Axboe wrote: > On 7/20/20 12:12 AM, Christoph Hellwig wrote: > > Hi Jens, > > > > this series ensures that the zoned device limitations are properly > > inherited in blk_stack_limits, and then cleanups up two rather > > pointless wrappers around it.

Re: [dm-devel] a fix and two cleanups around blk_stack_limits

2020-07-20 Thread Jens Axboe
On 7/20/20 12:12 AM, Christoph Hellwig wrote: > Hi Jens, > > this series ensures that the zoned device limitations are properly > inherited in blk_stack_limits, and then cleanups up two rather > pointless wrappers around it. We should probably make this against for-5.9/drivers instead, to avoid

Re: [dm-devel] [RFC PATCH v4 02/12] security: add ipe lsm evaluation loop and audit system

2020-07-20 Thread Deven Bowers
On 7/17/2020 4:16 PM, Randy Dunlap wrote: On 7/17/20 4:09 PM, Deven Bowers wrote: +config SECURITY_IPE_PERMISSIVE_SWITCH + bool "Enable the ability to switch IPE to permissive mode" + default y + help + This option enables two ways of switching IPE to permissive

Re: [dm-devel] [RFC PATCH v4 05/12] fs: add security blob and hooks for block_device

2020-07-20 Thread Deven Bowers
On 7/17/2020 5:14 PM, Casey Schaufler wrote: [...snip] +EXPORT_SYMBOL(security_bdev_free); + +int security_bdev_setsecurity(struct block_device *bdev, + const char *name, const void *value, + size_t size) +{ + return

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

2020-07-20 Thread Artem Bityutskiy
On Mon, 2020-07-20 at 14:07 +0200, Christoph Hellwig wrote: > What about jffs2 and blk2mtd raw block devices? If my memory serves me correctly JFFS2 did not mind readahead. -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

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

2020-07-20 Thread Christoph Hellwig
On Mon, Jul 20, 2020 at 01:58:22PM +0200, Richard Weinberger wrote: > Hello Chrstoph, > > On Mon, Jul 20, 2020 at 9:53 AM Christoph Hellwig wrote: > > > > Set up a readahead size by default. This changes behavior for mtd, > > ubifs, and vboxsf to actually enabled readahead, the lack of which >

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

2020-07-20 Thread Johannes Thumshirn
On 20/07/2020 08:13, Christoph Hellwig wrote: > /* > * Zoned block device models (zoned limit). > + * > + * Note: This needs to be ordered from the least to the most severe > + * restrictions for the inheritance in blk_stack_limits() to work. > */ > enum blk_zoned_model { > -

Re: [dm-devel] [RFC PATCH v4 05/12] fs: add security blob and hooks for block_device

2020-07-20 Thread Casey Schaufler
On 7/17/2020 4:09 PM, Deven Bowers wrote: > Add a security blob and associated allocation, deallocation and set hooks > for a block_device structure. > > Signed-off-by: Deven Bowers > --- > fs/block_dev.c| 8 + > include/linux/fs.h| 1 + >

Re: [dm-devel] a fix and two cleanups around blk_stack_limits

2020-07-20 Thread Damien Le Moal
On 2020/07/20 15:13, Christoph Hellwig wrote: > Hi Jens, > > this series ensures that the zoned device limitations are properly > inherited in blk_stack_limits, and then cleanups up two rather > pointless wrappers around it. > Tested with dm-linear, dm-crypt and dm-zoned multi device setup

Re: [dm-devel] [PATCH 3/3] block: remove blk_queue_stack_limits

2020-07-20 Thread Damien Le Moal
On 2020/07/20 15:13, Christoph Hellwig wrote: > This function is just a tiny wrapper around blk_stack_limits. Open code > it int the two callers. > > Signed-off-by: Christoph Hellwig > --- > block/blk-settings.c | 11 --- > drivers/block/drbd/drbd_nl.c | 4 ++-- >

Re: [dm-devel] [PATCH 2/3] block: remove bdev_stack_limits

2020-07-20 Thread Damien Le Moal
On 2020/07/20 15:13, Christoph Hellwig wrote: > This function is just a tiny wrapper around blk_stack_limit and has > two callers. Simplify the stack a bit by open coding it in the two > callers. > > Signed-off-by: Christoph Hellwig > --- > block/blk-settings.c | 25 ++---

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

2020-07-20 Thread Damien Le Moal
On 2020/07/20 15:13, 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 > --- > block/blk-settings.c | 1 + >

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

2020-07-20 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 | 236 +++--- 1 file changed, 56 insertions(+), 180 deletions(-) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index

[dm-devel] [PATCH 03/14] drbd: remove RB_CONGESTED_REMOTE

2020-07-20 Thread Christoph Hellwig
This case isn't ever used. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_req.c | 4 include/linux/drbd.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 674be09b2da94a..4d944f2eb56efa 100644

[dm-devel] [PATCH 06/14] block: lift setting the readahead size into the block layer

2020-07-20 Thread Christoph Hellwig
Drivers shouldn't really mess with the readahead size, as that is a VM concept. Instead set it based on the optimal I/O size by lifting the algorithm from the md driver when registering the disk. Also set bdi->io_pages there as well by applying the same scheme based on max_sectors.

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

2020-07-20 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

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

2020-07-20 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 09/14] bdi: remove BDI_CAP_CGROUP_WRITEBACK

2020-07-20 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 11/14] mm: use SWP_SYNCHRONOUS_IO more intelligently

2020-07-20 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. Also there is no point in trying a bio submission if bdev_read_page failed. Signed-off-by: Christoph Hellwig --- mm/page_io.c | 7 +-- 1 file changed, 5 insertions(+), 2

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

2020-07-20 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. Signed-off-by: Christoph Hellwig --- drivers/block/brd.c | 1 - drivers/block/zram/zram_drv.c | 17 +

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

2020-07-20 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

[dm-devel] bdi cleanups

2020-07-20 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. Note that this is based on top of the "a fix and two cleanups around

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

2020-07-20 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

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

2020-07-20 Thread Christoph Hellwig
Set up a readahead size by default. This changes behavior for mtd, ubifs, and vboxsf to actually enabled readahead, the lack of which very much looks like an oversight. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 1 - fs/9p/vfs_super.c | 4 ++-- fs/afs/super.c | 1 -

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

2020-07-20 Thread Christoph Hellwig
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 --- block/blk-settings.c | 1 + drivers/md/dm-table.c | 19 ---

[dm-devel] [PATCH 3/3] block: remove blk_queue_stack_limits

2020-07-20 Thread Christoph Hellwig
This function is just a tiny wrapper around blk_stack_limits. Open code it int the two callers. Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 11 --- drivers/block/drbd/drbd_nl.c | 4 ++-- drivers/nvme/host/core.c | 3 ++- include/linux/blkdev.h | 1 -

Re: [dm-devel] master - multipathd: fix fd leak when iscsi device logs in

2020-07-20 Thread Zhiqiang Liu
On 2020/7/16 1:41, Martin Wilck wrote: > On Tue, 2020-07-14 at 17:22 -0500, Benjamin Marzinski wrote: >> On Mon, Jul 13, 2020 at 09:59:43PM +0200, Martin Wilck wrote: >>> Comments welcome. >> >> We've agreed that dm_lib_release() is unnecessary, since we always >> call >> dm_udev_wait() when

[dm-devel] [PATCH 2/3] block: remove bdev_stack_limits

2020-07-20 Thread Christoph Hellwig
This function is just a tiny wrapper around blk_stack_limit and has two callers. Simplify the stack a bit by open coding it in the two callers. Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 25 ++--- drivers/md/dm-table.c | 3 ++- include/linux/blkdev.h |

[dm-devel] a fix and two cleanups around blk_stack_limits

2020-07-20 Thread Christoph Hellwig
Hi Jens, this series ensures that the zoned device limitations are properly inherited in blk_stack_limits, and then cleanups up two rather pointless wrappers around it. -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel