[dm-devel] [PATCH 11/27] block: add a bdev_nonrot helper

2022-04-14 Thread Christoph Hellwig
Add a helper to check the nonrot flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Acked-by: David Sterba [btrfs] --- block/ioctl.c | 2 +-

[dm-devel] [PATCH 02/27] target: pass a block_device to target_configure_unmap_from_queue

2022-04-14 Thread Christoph Hellwig
The SCSI target drivers is a consumer of the block layer and shoul d generally work on struct block_device. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/target/target_core_device.c | 5 +++-- drivers/target/target_core_file.c| 7 ---

[dm-devel] [PATCH 16/27] block: use bdev_alignment_offset in part_alignment_offset_show

2022-04-14 Thread Christoph Hellwig
Replace the open coded offset calculation with the proper helper. This is an ABI change in that the -1 for a misaligned partition is properly propagated, which can be considered a bug fix and matches what is done on the whole device. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K.

[dm-devel] [PATCH 04/27] drbd: remove assign_p_sizes_qlim

2022-04-14 Thread Christoph Hellwig
Fold each branch into its only caller. Signed-off-by: Christoph Hellwig Acked-by: Christoph Böhmwalder --- drivers/block/drbd/drbd_main.c | 47 +++--- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c

[dm-devel] [PATCH 01/27] target: remove an incorrect unmap zeroes data deduction

2022-04-14 Thread Christoph Hellwig
For block devices, the SCSI target drivers implements UNMAP as calls to blkdev_issue_discard, which does not guarantee zeroing just because Write Zeroes is supported. Note that this does not affect the file backed path which uses fallocate to punch holes. Fixes: 2237498f0b5c ("target/iblock:

[dm-devel] [PATCH 17/27] block: use bdev_alignment_offset in disk_alignment_offset_show

2022-04-14 Thread Christoph Hellwig
This does the same as the open coded variant except for an extra branch, and allows to remove queue_alignment_offset entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- block/genhd.c | 2 +- include/linux/blkdev.h | 8 2 files changed, 1

[dm-devel] [PATCH 13/27] block: add a bdev_fua helper

2022-04-14 Thread Christoph Hellwig
Add a helper to check the FUA flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/block/rnbd/rnbd-srv.c | 3 +-- drivers/target/target_core_iblock.c | 3 +--

[dm-devel] [PATCH 12/27] block: add a bdev_write_cache helper

2022-04-14 Thread Christoph Hellwig
Add a helper to check the write cache flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Acked-by: David Sterba [btrfs] --- drivers/block/rnbd/rnbd-srv.c | 2 +-

[dm-devel] [PATCH 19/27] block: remove queue_discard_alignment

2022-04-14 Thread Christoph Hellwig
Just use bdev_alignment_offset in disk_discard_alignment_show instead. That helpers is the same except for an always false branch that doesn't matter in this slow path. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- block/genhd.c | 2 +- include/linux/blkdev.h |

[dm-devel] [PATCH 03/27] target: fix discard alignment on partitions

2022-04-14 Thread Christoph Hellwig
Use the proper bdev_discard_alignment helper that accounts for partition offsets. Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/target/target_core_device.c | 4 ++-- 1 file changed, 2

[dm-devel] [PATCH 08/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: David Sterba --- fs/btrfs/zoned.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 1b1b310c3c510..f72cad7391a11 100644 --- a/fs/btrfs/zoned.c +++

[dm-devel] [PATCH 18/27] block: move bdev_alignment_offset and queue_limit_alignment_offset out of line

2022-04-14 Thread Christoph Hellwig
No need to inline these fairly larger helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- block/blk-settings.c | 23 +++ include/linux/blkdev.h | 21 + 2 files changed, 24 insertions(+), 20 deletions(-) diff --git

[dm-devel] [PATCH 14/27] block: add a bdev_stable_writes helper

2022-04-14 Thread Christoph Hellwig
Add a helper to check the stable writes flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/md/dm-table.c | 4 +--- fs/super.c | 2 +-

[dm-devel] [PATCH 09/27] ntfs3: use bdev_logical_block_size instead of open coding it

2022-04-14 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- fs/ntfs3/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 278dcf5024102..cd30e81abbce0 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -920,7 +920,7

[dm-devel] use block_device based APIs in block layer consumers v3

2022-04-14 Thread Christoph Hellwig
Hi Jens, this series cleanups up the block layer API so that APIs consumed by file systems are (almost) only struct block_devic based, so that file systems don't have to poke into block layer internals like the request_queue. I also found a bunch of existing bugs related to partition offsets and

Re: [dm-devel] cleanup bio_kmalloc v3

2022-04-14 Thread Christoph Hellwig
Hi Jens, can you pull this into 5.19/block? I'd like to send some bio cloning optimizations for Mike on top of this series. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH 23/27] block: add a bdev_max_discard_sectors helper

2022-04-14 Thread Christoph Hellwig
Add a helper to query the number of sectors support per each discard bio based on the block device and use this helper to stop various places from poking into the request_queue to see if discard is supported and if so how much. This mirrors what is done e.g. for write zeroes as well.

[dm-devel] [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-14 Thread Christoph Hellwig
Just use a non-zero max_discard_sectors as an indicator for discard support, similar to what is done for write zeroes. The only places where needs special attention is the RAID5 driver, which must clear discard support for security reasons by default, even if the default stacking rules would

[dm-devel] [PATCH 27/27] direct-io: remove random prefetches

2022-04-14 Thread Christoph Hellwig
Randomly poking into block device internals for manual prefetches isn't exactly a very maintainable thing to do. And none of the performance criticil direct I/O implementations still use this library function anyway, so just drop it. Signed-off-by: Christoph Hellwig --- fs/direct-io.c | 32

[dm-devel] [PATCH 26/27] block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD

2022-04-14 Thread Christoph Hellwig
Secure erase is a very different operation from discard in that it is a data integrity operation vs hint. Fully split the limits and helper infrastructure to make the separation more clear. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Acked-by: Christoph Böhmwalder [drbd]

[dm-devel] [PATCH 25/27] block: add a bdev_discard_granularity helper

2022-04-14 Thread Christoph Hellwig
Abstract away implementation details from file systems by providing a block_device based helper to retrieve the discard granularity. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Acked-by: Christoph Böhmwalder [drbd] Acked-by: Ryusuke Konishi Acked-by: David Sterba [btrfs]

[dm-devel] [PATCH 20/27] block: use bdev_discard_alignment in part_discard_alignment_show

2022-04-14 Thread Christoph Hellwig
Use the bdev based alignment helper instead of open coding it. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- block/partitions/core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/block/partitions/core.c b/block/partitions/core.c index

[dm-devel] [PATCH 22/27] block: refactor discard bio size limiting

2022-04-14 Thread Christoph Hellwig
Move all the logic to limit the discard bio size into a common helper so that it is better documented. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Acked-by: Coly Li --- block/blk-lib.c | 59 - block/blk.h | 14

[dm-devel] [PATCH 21/27] block: move {bdev, queue_limit}_discard_alignment out of line

2022-04-14 Thread Christoph Hellwig
No need to inline these fairly larger helpers. Also fix the return value to be unsigned, just like the field in struct queue_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- block/blk-settings.c | 35 +++ include/linux/blkdev.h |

Re: [dm-devel] [PATCH 0/7] multipath-tools: remove deprecated options

2022-04-14 Thread Benjamin Marzinski
On Thu, Apr 14, 2022 at 03:18:04PM +0200, mwi...@suse.com wrote: For the set: Reviewed-by: Benjamin Marzinski -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-14 Thread Ming Lei
On Thu, Apr 14, 2022 at 01:45:33PM -0400, Mike Snitzer wrote: > On Wed, Apr 13 2022 at 11:57P -0400, > Ming Lei wrote: > > > On Wed, Apr 13, 2022 at 10:25:45PM -0400, Mike Snitzer wrote: > > > On Wed, Apr 13 2022 at 8:36P -0400, > > > Ming Lei wrote: > > > > > > > On Wed, Apr 13, 2022 at

Re: [PATCH v7 1/6] x86/mm: fix comment

2022-04-14 Thread Jane Chu
On 4/14/2022 1:44 AM, Borislav Petkov wrote: > On Thu, Apr 14, 2022 at 01:00:05AM +, Jane Chu wrote: >> This change used to be folded in the mce patch, but for that I received >> a review comment pointing out that the change is unrelated to the said >> patch and doesn't belong, hence I pulled

[dm-devel] [PATCH] libmultipath: use symbolic value for invalid pcentry

2022-04-14 Thread Benjamin Marzinski
Suggested-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 4 ++-- libmultipath/config.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libmultipath/config.c b/libmultipath/config.c index c3cfa119..54c28d24 100644 --- a/libmultipath/config.c

Re: [dm-devel] [PATCH 5/8] dm: always setup ->orig_bio in alloc_io

2022-04-14 Thread Mike Snitzer
On Wed, Apr 13 2022 at 11:57P -0400, Ming Lei wrote: > On Wed, Apr 13, 2022 at 10:25:45PM -0400, Mike Snitzer wrote: > > On Wed, Apr 13 2022 at 8:36P -0400, > > Ming Lei wrote: > > > > > On Wed, Apr 13, 2022 at 01:58:54PM -0400, Mike Snitzer wrote: > > > > > > > > The bigger issue with this

Re: [dm-devel] [bug report] BUG for REQ_OP_WRITE_ZEROES to dm-zoned

2022-04-14 Thread Mike Snitzer
On Thu, Apr 14 2022 at 12:29P -0400, Mike Snitzer wrote: > Thanks for the report, I've staged a fix here (btw, your change above > needs to be paired with the 2nd hunk of my fix otherwise you won't get > the bio split you desire): > >

Re: [dm-devel] [bug report] BUG for REQ_OP_WRITE_ZEROES to dm-zoned

2022-04-14 Thread Mike Snitzer
On Thu, Apr 14 2022 at 4:34P -0400, Shinichiro Kawasaki wrote: > Hello Mike, > > Let me share a BUG I observed with v5.18-rcX and ask comments for the fix. > > BUG_ON(dm_tio_flagged(tio, DM_TIO_IS_DUPLICATE_BIO)) in > dm_accept_partial_bio() > was triggered for dm-zoned. It happens when a

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-14 Thread Demi Marie Obenour
On 4/12/22 05:32, Zdenek Kabelac wrote: > Dne 12. 04. 22 v 0:30 Demi Marie Obenour napsal(a): >> On Mon, Apr 11, 2022 at 10:16:43PM +0200, Zdenek Kabelac wrote: >>> Dne 11. 04. 22 v 19:22 Demi Marie Obenour napsal(a): On Mon, Apr 11, 2022 at 10:16:02AM +0200, Zdenek Kabelac wrote: > Dne

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

2022-04-14 Thread Martin Liška
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: Martin Liska --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-14 Thread Demi Marie Obenour
On Wed, Apr 13, 2022 at 09:55:00AM +0200, Zdenek Kabelac wrote: > Dne 12. 04. 22 v 16:29 David Teigland napsal(a): > > Dne 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): > > > For quite a while, I have wanted to write a tool to manage thin volumes > > > that is not based on LVM. > > > > On Tue,