Re: [dm-devel] [PATCHv2 0/5] fix direct io device mapper errors

2022-11-16 Thread Jens Axboe
On Thu, 10 Nov 2022 10:44:56 -0800, Keith Busch wrote: > From: Keith Busch > > The 6.0 kernel made some changes to the direct io interface to allow > offsets in user addresses. This based on the hardware's capabilities > reported in the request_queue's dma_alignment attribute. > > dm-crypt, -log

Re: [dm-devel] [PATCH v3 01/10] block: clear ->slave_dir when dropping the main slave_dir reference

2022-11-16 Thread Mike Snitzer
On Tue, Nov 15 2022 at 9:10P -0500, Yu Kuai wrote: > From: Christoph Hellwig > > Zero out the pointer to ->slave_dir so that the holder code doesn't > incorrectly treat the object as alive when add_disk failed or after > del_gendisk was called. > > Fixes: 89f871af1b26 ("dm: delay registering

Re: [dm-devel] [PATCH v3 00/10] fix delayed holder tracking

2022-11-16 Thread Jens Axboe
On Tue, 15 Nov 2022 22:10:44 +0800, Yu Kuai wrote: > From: Yu Kuai > > Hi all, > > this series tries to fix the delayed holder tracking that is only used by > dm by moving it into dm, where we can track the lifetimes much better. > v2 is from Christoph, here I send v3 with some additional fixes.

Re: [dm-devel] [PATCH v3 02/10] dm: remove free_table_devices

2022-11-16 Thread Mike Snitzer
On Tue, Nov 15 2022 at 9:10P -0500, Yu Kuai wrote: > From: Christoph Hellwig > > free_table_devices just warns and frees all table_device structures when > the target removal did not remove them. This should never happen, but > if it did, just freeing the structure without deleting them from

Re: [dm-devel] [PATCH v3 06/10] dm: track per-add_disk holder relations in DM

2022-11-16 Thread Mike Snitzer
On Tue, Nov 15 2022 at 9:10P -0500, Yu Kuai wrote: > From: Christoph Hellwig > > dm is a bit special in that it opens the underlying devices. Commit > 89f871af1b26 ("dm: delay registering the gendisk") tried to accommodate > that by allowing to add the holder to the list before add_gendisk an

Re: [dm-devel] [PATCH RFC v3 05/10] dm: make sure create and remove dm device won't race with open and close table

2022-11-16 Thread Mike Snitzer
On Tue, Nov 15 2022 at 9:10P -0500, Yu Kuai wrote: > From: Yu Kuai > > open_table_device() and close_table_device() is protected by > table_devices_lock, hence use it to protect add_disk() and > del_gendisk(). > > Prepare to track per-add_disk holder relations in dm. > > Signed-off-by: Yu Ku

Re: [dm-devel] [PATCH v3 04/10] dm: cleanup close_table_device

2022-11-16 Thread Mike Snitzer
On Tue, Nov 15 2022 at 9:10P -0500, Yu Kuai wrote: > From: Christoph Hellwig > > Take the list unlink and free into close_table_device so that no half > torn down table_devices exist. Also remove the check for a NULL bdev > as that can't happen - open_table_device never adds a table_device to

Re: [dm-devel] [PATCH v3 03/10] dm: cleanup open_table_device

2022-11-16 Thread Mike Snitzer
On Tue, Nov 15 2022 at 9:10P -0500, Yu Kuai wrote: > From: Christoph Hellwig > > Move all the logic for allocation the table_device and linking it into > the list into the open_table_device. This keeps the code tidy and > ensures that the table_devices only exist in fully initialized state. >

Re: [dm-devel] [PATCHv2 5/5] dm-log-writes: set dma_alignment limit in io_hints

2022-11-16 Thread Mike Snitzer
On Thu, Nov 10 2022 at 1:45P -0500, Keith Busch wrote: > From: Keith Busch > > This device mapper needs bio vectors to be sized and memory aligned to > the logical block size. Set the minimum required queue limit > accordingly. > > Signed-off-by: Keith Busch Reviewed-by: Mike Snitzer -- d

Re: [dm-devel] [PATCHv2 4/5] dm-integrity: set dma_alignment limit in io_hints

2022-11-16 Thread Mike Snitzer
On Thu, Nov 10 2022 at 1:45P -0500, Keith Busch wrote: > From: Keith Busch > > This device mapper needs bio vectors to be sized and memory aligned to > the logical block size. Set the minimum required queue limit > accordingly. > > Signed-off-by: Keith Busch Reviewed-by: Mike Snitzer -- d

Re: [dm-devel] [PATCHv2 2/5] dm-crypt: provide dma_alignment limit in io_hints

2022-11-16 Thread Mike Snitzer
On Thu, Nov 10 2022 at 1:44P -0500, Keith Busch wrote: > From: Keith Busch > > This device mapper needs bio vectors to be sized and memory aligned to > the logical block size. Set the minimum required queue limit > accordingly. > > Link: > https://lore.kernel.org/linux-block/20221101001558.6

Re: [dm-devel] [PATCH] dm init: add dm-mod.waitfor to wait for asynchronously probed block devices

2022-11-16 Thread Peter Korsgaard
> "Peter" == Peter Korsgaard writes: > Just calling wait_for_device_probe() is not enough to ensure that > asynchronously probed block devices are available (E.G. mmc, usb, ..), so > add a "dm-mod.waitfor=[,..,]" parameter to get dm-init to > explicitly wait for specific block devices be