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

2022-04-12 Thread Zdenek Kabelac
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 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): Your

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

2022-04-12 Thread David Teigland
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, Apr 12, 2022 at 11:32:09AM +0200, Zdenek Kabelac wrote: > Here is actually the fundamental problem with your proposal - our

Re: [dm-devel] [PATCH v7 3/6] mce: fix set_mce_nospec to always unmap the whole page

2022-04-12 Thread Borislav Petkov
On Tue, Apr 05, 2022 at 01:47:44PM -0600, Jane Chu wrote: > The set_memory_uc() approach doesn't work well in all cases. > For example, when "The VMM unmapped the bad page from guest > physical space and passed the machine check to the guest." > "The guest gets virtual #MC on an access to that

[dm-devel] [PATCH 7/8] dm: improve target io referencing

2022-04-12 Thread Ming Lei
Currently target io's reference counter is grabbed before calling __map_bio(), this way isn't efficient since we can move this grabbing into alloc_io(). Meantime it becomes typical async io reference counter model: one is for submission side, the other is for completion side, and the io won't be

[dm-devel] [PATCH 6/8] dm: don't grab target io reference in dm_zone_map_bio

2022-04-12 Thread Ming Lei
dm_zone_map_bio() is only called from __map_bio in which the io's reference is grabbed already, and the reference won't be released until the bio is submitted, so no necessary to do it dm_zone_map_bio any more. Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Ming Lei ---

[dm-devel] [PATCH 8/8] dm: put all polled io into one single list

2022-04-12 Thread Ming Lei
If bio_split() isn't involved, it is a bit overkill to link dm_io into hlist, given there is only single dm_io in the list, so convert to single list for holding all dm_io instances associated with this bio. Signed-off-by: Ming Lei --- drivers/md/dm-core.h | 2 +- drivers/md/dm.c | 46

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

2022-04-12 Thread Ming Lei
The current DM codes setup ->orig_bio after __map_bio() returns, and not only cause kernel panic for dm zone, but also a bit ugly and tricky, especially the waiting until ->orig_bio is set in dm_submit_bio_remap(). The reason is that one new bio is cloned from original FS bio to represent the

[dm-devel] [PATCH 2/8] dm: don't pass bio to __dm_start_io_acct and dm_end_io_acct

2022-04-12 Thread Ming Lei
dm->orig_bio is always passed to __dm_start_io_acct and dm_end_io_acct, so it isn't necessary to take one bio parameter for the two helpers. Signed-off-by: Ming Lei --- drivers/md/dm.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/md/dm.c

[dm-devel] [PATCH 0/8] dm: io accounting & polling improvement

2022-04-12 Thread Ming Lei
Hello Guys, The 1st patch adds bdev based io accounting interface. The 2nd ~ 5th patches improves dm's io accounting & split, meantime fixes kernel panic on dm-zone. The other patches improves io polling & dm io reference handling. Ming Lei (8): block: replace disk based account with bdev's

[dm-devel] [PATCH 3/8] dm: pass 'dm_io' instance to dm_io_acct directly

2022-04-12 Thread Ming Lei
All the other 4 parameters are retrieved from the 'dm_io' instance, so not necessary to pass all four to dm_io_acct(). Signed-off-by: Ming Lei --- drivers/md/dm.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index

[dm-devel] [PATCH 4/8] dm: switch to bdev based io accounting interface

2022-04-12 Thread Ming Lei
DM won't account sectors in flush IO, also we can retrieve sectors from 'dm_io' for avoiding to allocate & update new original bio, which will be done in the following patch. So switch to bdev based io accounting interface. Signed-off-by: Ming Lei --- drivers/md/dm.c | 21 -

[dm-devel] [PATCH 1/8] block: replace disk based account with bdev's

2022-04-12 Thread Ming Lei
'block device' is generic type for interface, and gendisk becomes more one block layer internal type, so replace disk based account interface with bdec's. Also add 'start_time' parameter to bdev_start_io_acct() so that we can cover device mapper's io accounting by the two bdev based interface.

Re: [dm-devel] [PATCH 0/9] Add protocol specific config subsection

2022-04-12 Thread Benjamin Marzinski
On Tue, Apr 12, 2022 at 10:31:50AM +, Martin Wilck wrote: > On Mon, 2022-04-11 at 20:59 -0500, Benjamin Marzinski wrote: > > Some storage arrays can be accessed using multiple protocols at the > > same > > time.  I've have customers request the ability to set different > > values > > for the

Re: [dm-devel] [PATCH 0/8] dm: io accounting & polling improvement

2022-04-12 Thread Mike Snitzer
On Tue, Apr 12 2022 at 4:56P -0400, Ming Lei wrote: > Hello Guys, > > The 1st patch adds bdev based io accounting interface. > > The 2nd ~ 5th patches improves dm's io accounting & split, meantime > fixes kernel panic on dm-zone. > > The other patches improves io polling & dm io reference

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

2022-04-12 Thread Mike Snitzer
On Tue, Apr 12 2022 at 4:56P -0400, Ming Lei wrote: > The current DM codes setup ->orig_bio after __map_bio() returns, > and not only cause kernel panic for dm zone, but also a bit ugly > and tricky, especially the waiting until ->orig_bio is set in > dm_submit_bio_remap(). > > The reason is

Re: [dm-devel] [PATCH 3/8] dm: pass 'dm_io' instance to dm_io_acct directly

2022-04-12 Thread Mike Snitzer
On Tue, Apr 12 2022 at 4:56P -0400, Ming Lei wrote: > All the other 4 parameters are retrieved from the 'dm_io' instance, so > not necessary to pass all four to dm_io_acct(). > > Signed-off-by: Ming Lei Yeah, commit 0ab30b4079e103 ("dm: eliminate copying of dm_io fields in

Re: [dm-devel] [PATCH 0/9] Add protocol specific config subsection

2022-04-12 Thread Benjamin Marzinski
On Tue, Apr 12, 2022 at 08:47:38PM +, Martin Wilck wrote: > On Tue, 2022-04-12 at 13:47 -0500, Benjamin Marzinski wrote: > > On Tue, Apr 12, 2022 at 10:31:50AM +, Martin Wilck wrote: > > > > > I agree that setting fast_io_fail_tmo to different values based on > > both > > array and

Re: [dm-devel] [PATCH 3/8] dm: pass 'dm_io' instance to dm_io_acct directly

2022-04-12 Thread Ming Lei
On Tue, Apr 12, 2022 at 04:28:59PM -0400, Mike Snitzer wrote: > On Tue, Apr 12 2022 at 4:56P -0400, > Ming Lei wrote: > > > All the other 4 parameters are retrieved from the 'dm_io' instance, so > > not necessary to pass all four to dm_io_acct(). > > > > Signed-off-by: Ming Lei > > Yeah,

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

2022-04-12 Thread Mike Snitzer
On Tue, Apr 12 2022 at 6:38P -0400, Damien Le Moal wrote: > On 4/13/22 05:52, Mike Snitzer wrote: > > On Tue, Apr 12 2022 at 4:56P -0400, > > Ming Lei wrote: > > > >> The current DM codes setup ->orig_bio after __map_bio() returns, > >> and not only cause kernel panic for dm zone, but also a

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

2022-04-12 Thread Ming Lei
On Tue, Apr 12, 2022 at 04:52:40PM -0400, Mike Snitzer wrote: > On Tue, Apr 12 2022 at 4:56P -0400, > Ming Lei wrote: > > > The current DM codes setup ->orig_bio after __map_bio() returns, > > and not only cause kernel panic for dm zone, but also a bit ugly > > and tricky, especially the

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

2022-04-12 Thread Demi Marie Obenour
On Mon, Apr 11, 2022 at 10:16:02AM +0200, Zdenek Kabelac wrote: > 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. The main thing holding me back is that the > > current dm-thin interface

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

2022-04-12 Thread Demi Marie Obenour
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 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): > > > > > > Your proposal actually breaks this

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

2022-04-12 Thread Jan Höppner
On 09/04/2022 06:50, Christoph Hellwig wrote: > 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

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

2022-04-12 Thread Keith Busch
On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c > index efb85c6d8e2d5..7e07dd69262a7 100644 > --- a/drivers/nvme/host/core.c > +++ b/drivers/nvme/host/core.c > @@ -1607,10 +1607,8 @@ static void

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

2022-04-12 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:41AM +0200, Christoph Hellwig wrote: > 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:

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

2022-04-12 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:24AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn Acked-by: David Sterba -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

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

2022-04-12 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > 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

Re: [dm-devel] [PATCH] block: remove redundant blk-cgroup init from __bio_clone

2022-04-12 Thread Dennis Zhou
On Mon, Apr 11, 2022 at 10:27:54PM -0700, Christoph Hellwig wrote: > On Mon, Apr 11, 2022 at 01:33:58PM -0400, Mike Snitzer wrote: > > When bio_{alloc,init}_clone are passed a bdev, bio_init() will call > > bio_associate_blkg() so the __bio_clone() work to initialize blkcg > > isn't needed. > >