Re: [dm-devel] [PATCH] multipath-tools: prevent a kernel upgrade leading to all paths lost

2022-04-29 Thread Benjamin Marzinski
On Mon, Apr 18, 2022 at 02:54:15PM -0700, Brian Bunker wrote: > With the kernel commit 268940b80fa4096397fd0a28e6ad807e64120215, the > handling of ALUA state transitioning state changed. It used to be that > paths which returned with ALUA transitioning state would not result in > those paths being

[dm-devel] [PATCH] update HPE MSA builtin config

2022-04-29 Thread Benjamin Marzinski
Make the config better align to MSA 4th, 5th and 6th Generation systems. Suggested-by: Jon Paul Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index

Re: [dm-devel] [PATCH v5.10] dm: fix mempool NULL pointer race when completing IO

2022-04-29 Thread Greg Kroah-Hartman
On Thu, Apr 28, 2022 at 12:22:26PM -0400, Mikulas Patocka wrote: > > > On Tue, 26 Apr 2022, Greg Kroah-Hartman wrote: > > > On Thu, Apr 21, 2022 at 02:08:30PM -0400, Mikulas Patocka wrote: > > > Hi > > > > Not really needed in a changelog text :) > > > > > This is backport of patches

[dm-devel] [PATCH 05/16] nvme: zns: Allow ZNS drives that have non-power_of_2 zone size

2022-04-29 Thread Pankaj Raghav
Remove the condition which disallows non-power_of_2 zone size ZNS drive to be updated and use generic method to calculate number of zones instead of relying on log and shift based calculation on zone size. The power_of_2 calculation has been replaced directly with generic calculation without

[dm-devel] [PATCH 07/16] btrfs: zoned: Cache superblock location in btrfs_zoned_device_info

2022-04-29 Thread Pankaj Raghav
Instead of calculating the superblock location every time, cache the superblock zone location in btrfs_zoned_device_info struct and use it to locate the zone index. The functions such as btrfs_sb_log_location_bdev() and btrfs_reset_sb_log_zones() which work directly on block_device shall continue

Re: [dm-devel] [PATCH v4 02/10] block: Add copy offload support infrastructure

2022-04-29 Thread Nitesh Shetty
On Wed, Apr 27, 2022 at 12:29:15PM +0200, Hannes Reinecke wrote: > On 4/26/22 12:12, Nitesh Shetty wrote: > > Introduce blkdev_issue_copy which supports source and destination bdevs, > > and an array of (source, destination and copy length) tuples. > > Introduce REQ_COPY copy offload operation

Re: [dm-devel] [PATCH v4 02/10] block: Add copy offload support infrastructure

2022-04-29 Thread Nitesh Shetty
On Thu, Apr 28, 2022 at 07:04:13AM +0900, Damien Le Moal wrote: > On 4/28/22 00:15, Nitesh Shetty wrote: > > On Wed, Apr 27, 2022 at 11:45:26AM +0900, Damien Le Moal wrote: > >> On 4/26/22 19:12, Nitesh Shetty wrote: > >>> Introduce blkdev_issue_copy which supports source and destination bdevs, >

Re: [dm-devel] [PATCH v4 01/10] block: Introduce queue limits for copy-offload support

2022-04-29 Thread Nitesh Shetty
On Wed, Apr 27, 2022 at 10:59:01AM +0900, Damien Le Moal wrote: > On 4/26/22 19:12, Nitesh Shetty wrote: > > Add device limits as sysfs entries, > > - copy_offload (RW) > > - copy_max_bytes (RW) > > - copy_max_hw_bytes (RO) > > - copy_max_range_bytes (RW) > >

[dm-devel] [PATCH 16/16] dm-zoned: ensure only power of 2 zone sizes are allowed

2022-04-29 Thread Pankaj Raghav
From: Luis Chamberlain Today dm-zoned relies on the assumption that you have a zone size with a power of 2. Even though the block layer today enforces this requirement, these devices do exist and so provide a stop-gap measure to ensure these devices cannot be used by mistake Signed-off-by: Luis

Re: [dm-devel] [PATCH][V2] Fix possibility to redefine -D_FORTIFY_SOURCE macro.

2022-04-29 Thread Martin Liška
On 4/12/22 22:24, Martin Wilck wrote: > On Tue, 2022-04-12 at 13:19 +0200, Martin Liška wrote: >> As explained here: >> https://github.com/opensvc/multipath-tools/issues/29 >> >> using -Wp,-D_FORTIFY_SOURCE cannot be redefined with >> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3. >> >> Signed-off-by:

[dm-devel] [PATCH 03/16] block: add bdev_zone_no helper

2022-04-29 Thread Pankaj Raghav
Many places in the filesystem for zoned devices open code this function to find the zone number for a given sector with power of 2 assumption. This generic helper can be used to calculate zone number for a given sector in a block device This helper internally uses blk_queue_zone_no to find the

[dm-devel] [PATCH 00/16] support non power of 2 zoned devices

2022-04-29 Thread Pankaj Raghav
- Background and Motivation: The zone storage implementation in Linux, introduced since v4.10, first targetted SMR drives which have a power of 2 (po2) zone size alignment requirement. The po2 zone size was further imposed implicitly by the block layer's blk_queue_chunk_sectors(), used to prevent

Re: [dm-devel] [PATCH v4 00/10] Add Copy offload support

2022-04-29 Thread Nitesh Shetty
On Thu, Apr 28, 2022 at 07:05:32AM +0900, Damien Le Moal wrote: > On 4/27/22 21:49, Nitesh Shetty wrote: > > O Wed, Apr 27, 2022 at 11:19:48AM +0900, Damien Le Moal wrote: > >> On 4/26/22 19:12, Nitesh Shetty wrote: > >>> The patch series covers the points discussed in November 2021 virtual call >

[dm-devel] [PATCH 01/16] block: make blkdev_nr_zones and blk_queue_zone_no generic for npo2 zsze

2022-04-29 Thread Pankaj Raghav
Adapt blkdev_nr_zones and blk_queue_zone_no function so that it can also work for non-power-of-2 zone sizes. As the existing deployments of zoned devices had power-of-2 assumption, power-of-2 optimized calculation is kept for those devices. There are no direct hot paths modified and the changes

Re: [dm-devel] [PATCH][V2] Fix possibility to redefine -D_FORTIFY_SOURCE macro.

2022-04-29 Thread Martin Liška
On 4/28/22 10:07, Martin Wilck wrote: > Hi Martin L, > > On Thu, 2022-04-28 at 08:54 +0200, Martin Liška wrote: >> On 4/12/22 22:24, Martin Wilck wrote: >>> On Tue, 2022-04-12 at 13:19 +0200, Martin Liška wrote: As explained here: https://github.com/opensvc/multipath-tools/issues/29

[dm-devel] [PATCH 11/16] btrfs: zoned: relax the alignment constraint for zoned devices

2022-04-29 Thread Pankaj Raghav
Checks were in place to return error when a non power-of-2 zoned devices is detected. Remove those checks as non power-of-2 zoned devices are now supported. Relax the zone size constraint to align with the BTRFS_STRIPE_LEN(64k) so that block groups are aligned to the BTRFS_STRIPE_LEN.

Re: [dm-devel] [PATCH v4 00/10] Add Copy offload support

2022-04-29 Thread Nitesh Shetty
O Wed, Apr 27, 2022 at 11:19:48AM +0900, Damien Le Moal wrote: > On 4/26/22 19:12, Nitesh Shetty wrote: > > The patch series covers the points discussed in November 2021 virtual call > > [LSF/MM/BFP TOPIC] Storage: Copy Offload[0]. > > We have covered the Initial agreed requirements in this

Re: [dm-devel] [PATCH v2] hex2bin: fix access beyond string end

2022-04-29 Thread Andy Shevchenko
On Tue, Apr 26, 2022 at 5:29 PM Mikulas Patocka wrote: > On Tue, 26 Apr 2022, Andy Shevchenko wrote: > > On Tue, Apr 26, 2022 at 08:07:44AM -0400, Mikulas Patocka wrote: > > > On Tue, 26 Apr 2022, Andy Shevchenko wrote: > > > > On Sun, Apr 24, 2022 at 10:48 PM Mikulas Patocka > > > > wrote:

[dm-devel] [PATCH 09/16] btrfs: zoned: Make sb_zone_number function non power of 2 compatible

2022-04-29 Thread Pankaj Raghav
Make the calculation in sb_zone_number function to be generic and work for both power-of-2 and non power-of-2 zone sizes. The function signature has been modified to take block device and mirror as input as this function is only invoked from callers that have access to the block device. This

[dm-devel] [PATCH 10/16] btrfs: zoned: use btrfs zone helpers to support non po2 zoned devices

2022-04-29 Thread Pankaj Raghav
Use the generic btrfs zone helpers to calculate zone index, check zone alignment, round up and round down operations. The zone_size_shift field is not needed anymore as generic helpers are used for calculation. Reviewed-by: Luis Chamberlain Signed-off-by: Pankaj Raghav --- fs/btrfs/volumes.c

[dm-devel] [PATCH 08/16] btrfs: zoned: add generic btrfs helpers for zoned devices

2022-04-29 Thread Pankaj Raghav
Add helpers to calculate alignment, round up and round down for zoned devices. These helpers encapsulates the necessary handling for power_of_2 and non-power_of_2 zone sizes. Optimized calculations are performed for zone sizes that are power_of_2 with log and shifts. btrfs_zoned_is_aligned() is

Re: [dm-devel] [PATCH v4 00/10] Add Copy offload support

2022-04-29 Thread Nitesh Shetty
On Wed, Apr 27, 2022 at 10:46:32AM +0900, Damien Le Moal wrote: > On 4/26/22 19:12, Nitesh Shetty wrote: > > The patch series covers the points discussed in November 2021 virtual call > > [LSF/MM/BFP TOPIC] Storage: Copy Offload[0]. > > We have covered the Initial agreed requirements in this

Re: [dm-devel] [PATCH v4 03/10] block: Introduce a new ioctl for copy

2022-04-29 Thread Nitesh Shetty
O Wed, Apr 27, 2022 at 11:48:57AM +0900, Damien Le Moal wrote: > On 4/26/22 19:12, Nitesh Shetty wrote: > > Add new BLKCOPY ioctl that offloads copying of one or more sources ranges > > to one or more destination in a device. COPY ioctl accepts a 'copy_range' > > structure that contains no of

Re: [dm-devel] [PATCH v2 0/3] LoadPin: Enable loading from trusted dm-verity devices

2022-04-29 Thread Paul Menzel
Dear Matthias, Thank you for your patches. Am 26.04.22 um 23:31 schrieb Matthias Kaehlcke: As of now LoadPin restricts loading of kernel files to a single pinned filesystem, typically the rootfs. This works for many […] A small nit, if you should reroll the patches, please use 75

[dm-devel] [PATCH 04/16] block: allow blk-zoned devices to have non-power-of-2 zone size

2022-04-29 Thread Pankaj Raghav
Convert the calculations on zone size to be generic instead of relying on power_of_2 based logic in the block layer using the helpers wherever possible. The only hot path affected by this change for power_of_2 zoned devices is in blk_check_zone_append() but the effects should be negligible as the

[dm-devel] [PATCH 15/16] f2fs: ensure only power of 2 zone sizes are allowed

2022-04-29 Thread Pankaj Raghav
From: Luis Chamberlain F2FS zoned support has power of 2 zone size assumption in many places such as in __f2fs_issue_discard_zone, init_blkz_info. As the power of 2 requirement has been removed from the block layer, explicitly add a condition in f2fs to allow only power of 2 zone size devices.

[dm-devel] [PATCH 13/16] null_blk: allow non power of 2 zoned devices

2022-04-29 Thread Pankaj Raghav
Convert the power of 2 based calculation with zone size to be generic in null_zone_no with optimization for power of 2 based zone sizes. The nr_zones calculation in null_init_zoned_dev has been replaced with a division without special handling for power of 2 based zone sizes as this function is

[dm-devel] [PATCH 12/16] zonefs: allow non power of 2 zoned devices

2022-04-29 Thread Pankaj Raghav
The zone size shift variable is useful only if the zone sizes are known to be power of 2. Remove that variable and use generic helpers from block layer to calculate zone index in zonefs Reviewed-by: Luis Chamberlain Signed-off-by: Pankaj Raghav --- fs/zonefs/super.c | 6 ++

[dm-devel] [PATCH 14/16] f2fs: call bdev_zone_sectors() only once on init_blkz_info()

2022-04-29 Thread Pankaj Raghav
From: Luis Chamberlain Instead of calling bdev_zone_sectors() multiple times, call it once and cache the value locally. This will make the subsequent change easier to read. Signed-off-by: Luis Chamberlain Signed-off-by: Pankaj Raghav --- fs/f2fs/super.c | 9 ++--- 1 file changed, 6

Re: [dm-devel] [PATCH v4 02/10] block: Add copy offload support infrastructure

2022-04-29 Thread Nitesh Shetty
On Wed, Apr 27, 2022 at 11:45:26AM +0900, Damien Le Moal wrote: > On 4/26/22 19:12, Nitesh Shetty wrote: > > Introduce blkdev_issue_copy which supports source and destination bdevs, > > and an array of (source, destination and copy length) tuples. > > Introduce REQ_COPY copy offload operation

[dm-devel] [PATCH 02/16] block: add blk_queue_zone_aligned and bdev_zone_aligned helper

2022-04-29 Thread Pankaj Raghav
Checking if a given sector is aligned to a zone is a very common operation that is performed for zoned devices. Add blk_queue_zone_aligned helper to check for this instead of opencoding it everywhere. The helper is made to be generic so that it can also check for alignment for non non-power-of-2

[dm-devel] [PATCH 06/16] nvmet: use blk_queue_zone_no()

2022-04-29 Thread Pankaj Raghav
From: Luis Chamberlain Instead of open coding the number of zones given a sector, use the helper blk_queue_zone_no(). This let's us make modifications to the math if needed in one place and adds now support for npo2 zone devices. Signed-off-by: Luis Chamberlain Signed-off-by: Pankaj Raghav

Re: [dm-devel] [PATCH v2] hex2bin: fix access beyond string end

2022-04-29 Thread Andy Shevchenko
On Wed, Apr 27, 2022 at 4:10 PM Mikulas Patocka wrote: > On Wed, 27 Apr 2022, Andy Shevchenko wrote: > > On Tue, Apr 26, 2022 at 5:29 PM Mikulas Patocka wrote: > > > On Tue, 26 Apr 2022, Andy Shevchenko wrote: > > > > On Tue, Apr 26, 2022 at 08:07:44AM -0400, Mikulas Patocka wrote: > > > > > On