[dm-devel] [PATCH 1/3] block: add __bio_start_io_acct() to control start_time

2022-01-27 Thread Mike Snitzer
__bio_start_io_acct() interface is like bio_start_io_acct() that allows start_time to be passed in. This gives drivers the ability to defer starting accounting until after IO is issued (but possibily not entirely due to bio splitting). Signed-off-by: Mike Snitzer --- block/blk-core.c | 27

Re: [dm-devel] [PATCH 07/19] dm-snap: use blkdev_issue_flush instead of open coding it

2022-01-27 Thread Mike Snitzer
On Mon, Jan 24 2022 at 4:10P -0500, Christoph Hellwig wrote: > Use blkdev_issue_flush, which uses an on-stack bio instead of an > opencoded version with a bio embedded into struct dm_snapshot. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- dm-devel mailing l

Re: [dm-devel] [PATCH 08/19] dm-thin: use blkdev_issue_flush instead of open coding it

2022-01-27 Thread Mike Snitzer
On Mon, Jan 24 2022 at 4:10P -0500, Christoph Hellwig wrote: > Use blkdev_issue_flush, which uses an on-stack bio instead of an > opencoded version with a bio embedded into struct pool. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- dm-devel mailing list dm-deve

Re: [dm-devel] [PATCH 06/19] dm-crypt: remove clone_init

2022-01-27 Thread Mike Snitzer
> Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 05/19] dm: bio_alloc can't fail if it is allowed to sleep

2022-01-27 Thread Mike Snitzer
On Mon, Jan 24 2022 at 4:10P -0500, Christoph Hellwig wrote: > Remove handling of NULL returns from sleeping bio_alloc calls given that > those can't fail. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listma

Re: [dm-devel] improve the bio cloning interface

2022-01-27 Thread Mike Snitzer
On Thu, Jan 27 2022 at 1:35P -0500, Christoph Hellwig wrote: > Hi Jens, > > this series changes the bio cloning interface to match the rest changes > to the bio allocation interface and passes the block_device and operation > to the cloning helpers. In addition it renames the cloning helpers

Re: [dm-devel] [PATCH 0/3] blk-mq/dm-rq: support BLK_MQ_F_BLOCKING for dm-rq

2022-01-19 Thread Mike Snitzer
On Mon, Jan 17 2022 at 3:10P -0500, Christoph Hellwig wrote: > On Tue, Jan 11, 2022 at 01:23:53PM -0500, Jeff Moyer wrote: > > Maybe I have bad taste, but the patches didn't look like cruft to me. > > :) > > They do to me. The extend the corner case of request on request > stacking that

[dm-devel] [git pull] device mapper changes for 5.17

2022-01-12 Thread Mike Snitzer
Hi Linus, The following changes since commit fc74e0a40e4f9fd0468e34045b0c45bba11dcbb2: Linux 5.16-rc7 (2021-12-26 13:17:17 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-5.17/dm-changes for you to fetch

Re: [dm-devel] [PATCH 0/3] blk-mq/dm-rq: support BLK_MQ_F_BLOCKING for dm-rq

2022-01-11 Thread Mike Snitzer
On Tue, Jan 11 2022 at 3:34P -0500, Christoph Hellwig wrote: > On Tue, Dec 28, 2021 at 04:30:08PM -0500, Mike Snitzer wrote: > > Yeah, people use request-based for IO scheduling and more capable path > > selectors. Imposing bio-based would be a pretty jar

Re: [dm-devel] [PATCH 0/3] blk-mq/dm-rq: support BLK_MQ_F_BLOCKING for dm-rq

2022-01-10 Thread Mike Snitzer
On Tue, Dec 28 2021 at 4:30P -0500, Mike Snitzer wrote: > On Wed, Dec 22 2021 at 11:16P -0500, > Ming Lei wrote: > > > On Tue, Dec 21, 2021 at 08:21:39AM -0800, Christoph Hellwig wrote: > > > On Tue, Dec 21, 2021 at 10:14:56PM +0800, Ming Lei wrote: > > > &g

Re: [dm-devel] [PATCH 3/3] dm: mark dm queue as blocking if any underlying is blocking

2022-01-10 Thread Mike Snitzer
On Thu, Jan 06 2022 at 10:51P -0500, Ming Lei wrote: > On Thu, Jan 06, 2022 at 10:40:51AM -0500, Mike Snitzer wrote: > > On Tue, Dec 21 2021 at 9:14P -0500, > > Ming Lei wrote: > > > > > dm request based driver doesn't set BLK_MQ_F_BLOCKING, so dm_queue_rq()

Re: [dm-devel] [PATCH 1/2] block: add resubmit_bio_noacct()

2022-01-10 Thread Mike Snitzer
On Mon, Jan 10 2022 at 12:35P -0500, Christoph Hellwig wrote: > On Mon, Jan 10, 2022 at 03:51:40PM +0800, Ming Lei wrote: > > Add block layer API of resubmit_bio_noacct() for handling blk-throttle > > iops limit correctly. Typical use case is that bio split, and it isn't > > good to export

Re: [dm-devel] [PATCH 3/3] dm: mark dm queue as blocking if any underlying is blocking

2022-01-06 Thread Mike Snitzer
t; index 742d9c80efe1..f7f92b272cce 100644 > --- a/drivers/md/dm.h > +++ b/drivers/md/dm.h > @@ -60,6 +60,7 @@ int dm_calculate_queue_limits(struct dm_table *table, > struct queue_limits *limits); > int dm_table_set_restrictions(struct dm_table *t, struct re

Re: [dm-devel] dm sysfs: use default_groups in kobj_type

2022-01-06 Thread Mike Snitzer
On Thu, Jan 06 2022 at 10:04P -0500, Greg Kroah-Hartman wrote: > On Thu, Jan 06, 2022 at 09:25:11AM -0500, Mike Snitzer wrote: > > On Thu, Jan 06 2022 at 5:02P -0500, > > Greg Kroah-Hartman wrote: > > > > > There are currently 2 ways to create a set of sys

Re: [PATCH 4/4] dax: remove the copy_from_iter and copy_to_iter methods

2022-01-06 Thread Mike Snitzer
but quite a lot of dax DM code removed, thanks! Reviewed-by: Mike Snitzer

Re: [dm-devel] dm sysfs: use default_groups in kobj_type

2022-01-06 Thread Mike Snitzer
referred way since aa30f47cf666 ("kobject: Add support for > default attribute groups to kobj_type") so that we can soon get rid of > the obsolete default_attrs field. > > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: dm-devel@redhat.com > Signed-off-by: Greg Kroah-

Re: [dm-devel] [PATCH 0/3] blk-mq/dm-rq: support BLK_MQ_F_BLOCKING for dm-rq

2021-12-28 Thread Mike Snitzer
On Wed, Dec 22 2021 at 11:16P -0500, Ming Lei wrote: > On Tue, Dec 21, 2021 at 08:21:39AM -0800, Christoph Hellwig wrote: > > On Tue, Dec 21, 2021 at 10:14:56PM +0800, Ming Lei wrote: > > > Hello, > > > > > > dm-rq may be built on blk-mq device which marks BLK_MQ_F_BLOCKING, so > > >

[dm-devel] [git pull] device mapper fixes for 5.16-rc6

2021-12-16 Thread Mike Snitzer
rebalance_children(). - Fix DM integrity data corruption, introduced during 5.16 merge, due to improper use of bvec_kmap_local(). Joe Thornber (1): dm btree remove: fix use after free in rebalance_children() Mike Snitzer (1

Re: [PATCH v2 2/2] dax,pmem: Implement pmem based dax data recovery

2021-11-12 Thread Mike Snitzer
On Wed, Nov 10 2021 at 1:26P -0500, Jane Chu wrote: > On 11/9/2021 1:02 PM, Dan Williams wrote: > > On Tue, Nov 9, 2021 at 11:59 AM Jane Chu wrote: > >> > >> On 11/9/2021 10:48 AM, Dan Williams wrote: > >>> On Mon, Nov 8, 2021 at 11:27 PM Christoph Hellwig > >>> wrote: > > On Fri,

Re: [dm-devel] [RFC PATCH 1/1] dm crypt: change maximum sector size to PAGE_SIZE

2021-11-12 Thread Mike Snitzer
On Thu, Nov 11 2021 at 8:07P -0500, Milan Broz wrote: > On 10/11/2021 18:43, Itai Handler wrote: > > Maximum sector size of dm-crypt is currently limited to 4096 bytes. > > > > On systems where PAGE_SIZE is larger than 4096 bytes, using larger > > sectors can be beneficial for performance

Re: [dm-devel] [RFC PATCH 8/8] md: add support for REQ_OP_VERIFY

2021-11-12 Thread Mike Snitzer
On Thu, Nov 11 2021 at 3:13P -0500, Chaitanya Kulkarni wrote: > On 11/3/2021 11:46 PM, Chaitanya Kulkarni wrote: > > From: Chaitanya Kulkarni > > > > Signed-off-by: Chaitanya Kulkarni > > I want to make sure the new REQ_OP_VERIFY is compatible with the > dm side as it is a generic

Re: [dm-devel] dm: remove unneeded variable

2021-11-12 Thread Mike Snitzer
= 0; > > if (!path) > DMEMIT("0 "); > @@ -107,7 +106,7 @@ static int rr_status(struct path_selector *ps, struct > dm_path *path, > } > } > > - return sz; > + return 0; > } > > /* > -- &g

Re: [dm-devel] dm snapshot: remove unneeded variable

2021-11-12 Thread Mike Snitzer
static struct dm_exception_store_type _transient_type = { > -- > 2.25.1 > You clearly didn't even compile test this. Nacked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [git pull] device mapper changes for 5.16

2021-11-08 Thread Mike Snitzer
Hi Linus, The following changes since commit d208b89401e073de986dc891037c5a668f5d5d95: dm: fix mempool NULL pointer race when completing IO (2021-10-12 13:54:10 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git

Re: [dm-devel] [PATCH 3/3] dm: don't stop request queue after the dm device is suspended

2021-11-01 Thread Mike Snitzer
eue(q); > - > if (request_based) { > /* >* Leverage the fact that request-based DM targets are > -- > 2.31.1 > I think this is fine given your previous commit (b4459b11e8f dm rq: don't queue request to blk-mq during DM suspend). Acked-by: Mi

Re: [PATCH 03/11] dax: simplify the dax_device <-> gendisk association

2021-11-01 Thread Mike Snitzer
md->dax_dev = alloc_dax(md, _dax_ops, 0); > if (IS_ERR(md->dax_dev)) > goto bad; > + if (dax_add_host(md->dax_dev, md->disk)) > + goto bad; > } > > format_dev_t(md->name, MKDEV(_major, minor)); Acked-by: Mike Snitzer

Re: [PATCH 10/11] dm-stripe: add a stripe_dax_pgoff helper

2021-11-01 Thread Mike Snitzer
> > already been done by the submitting file system and don't need to be > > repeated. > > Again, looks good. Kind of embarrassing when the open-coded version is > less LOC than using the helper. > > Mike, ack? Acked-by: Mike Snitzer

Re: [PATCH 09/11] dm-log-writes: add a log_writes_dax_pgoff helper

2021-11-01 Thread Mike Snitzer
> > already been done by the submitting file system and don't need to be > > repeated. > > Looks good. > > Mike, ack? > Acked-by: Mike Snitzer

Re: [PATCH 08/11] dm-linear: add a linear_dax_pgoff helper

2021-11-01 Thread Mike Snitzer
> > already been done by the submitting file system and don't need to be > > repeated. > > Looks good. > > Mike, ack? Acked-by: Mike Snitzer

Re: [PATCH 07/11] dax: remove dax_capable

2021-11-01 Thread Mike Snitzer
rivers/md/dm-table.c > > @@ -807,12 +807,14 @@ void dm_table_set_type(struct dm_table *t, enum > > dm_queue_mode type) > > EXPORT_SYMBOL_GPL(dm_table_set_type); > > > > /* validate the dax capability of the target device span */ > > -int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > +static int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev, > > sector_t start, sector_t len, void *data) > > { > > - int blocksize = *(int *) data; > > + if (dev->dax_dev) > > + return false; > > > > - return !dax_supported(dev->dax_dev, dev->bdev, blocksize, start, > > len); > > + pr_debug("%pg: error: dax unsupported by block device\n", > > dev->bdev); Would prefer the use of DMDEBUG() here (which doesn't need trailing \n) But otherwise: Acked-by: Mike Snitzer

Re: [PATCH 01/11] dm: make the DAX support dependend on CONFIG_FS_DAX

2021-11-01 Thread Mike Snitzer
es). Sorry for late reply, but I see you punted on pushing for 5.16 merge anyway (I'm sure my lack of response didn't help, sorry about that). Acked-by: Mike Snitzer Thanks!

Re: [dm-devel] audit: correct the AUDIT_DM_CTRL and AUDIT_DM_EVENT numbering

2021-10-27 Thread Mike Snitzer
On Tue, Oct 26 2021 at 10:22P -0400, Paul Moore wrote: > On Tue, Oct 19, 2021 at 9:17 PM Paul Moore wrote: > > On Tue, Oct 19, 2021 at 9:15 PM Paul Moore wrote: > > > > > > Due to conflict with the audit and SELinux trees the device mapper > > > audit record types need to be renumbered before

[dm-devel] [git pull] device mapper fixes for 5.15-rc6

2021-10-15 Thread Mike Snitzer
Hi Linus, The following changes since commit 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc: Linux 5.15-rc5 (2021-10-10 17:01:59 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-5.15/dm-fixes for you to fetch

Re: [dm-devel] [PATCH 03/29] dm: use bdev_nr_sectors instead of open coding it

2021-10-13 Thread Mike Snitzer
On Wed, Oct 13 2021 at 1:10P -0400, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig Acked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] dm: change dm_get_target_type() to check for module load error

2021-10-06 Thread Mike Snitzer
at doesn't mean the target_type won;t have been loaded into DM for it to access. So all said, your patch is bogus and would break DM and user experience: Nacked-by: Mike Snitzer But thanks for raising your concern. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] dm: fix NULL pointer issue when free bio

2021-10-06 Thread Mike Snitzer
On Wed, Sep 29 2021 at 7:59P -0400, Jiazi Li wrote: > dm_io_dec_pending call end_io_acct first, will dec md in-flight > pending count. If a task is swapping table at same time. > task1 task2 > do_resume > ->do_suspend > ->dm_wait_for_completion >

Re: [dm-devel] dm-rq: don't queue request during suspend

2021-10-06 Thread Mike Snitzer
On Thu, Sep 23 2021 at 5:11P -0400, Ming Lei wrote: > DM uses blk-mq's quiesce/unquiesce to stop/start device mapper queue. > > But blk-mq's unquiesce may come from outside events, such as elevator > switch, updating nr_requests or others, and request may come during > suspend, so simply ask

Re: [dm-devel] [PATCH v4 4/4] blk-crypto: update inline encryption documentation

2021-10-06 Thread Mike Snitzer
e renaming from > blk_keyslot_manager to blk_crypto_profile. > > Signed-off-by: Eric Biggers Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v4 3/4] blk-crypto: rename blk_keyslot_manager to blk_crypto_profile

2021-10-06 Thread Mike Snitzer
fairly > straightforward change, as it doesn't change any actual functionality. > > Acked-by: Ulf Hansson # For MMC > Signed-off-by: Eric Biggers Unfortunate how fiddley this change forced you to get but it looks like you've done a very solid job of cleaning it all up to be consistent. Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v4 2/4] blk-crypto: rename keyslot-manager files to blk-crypto-profile

2021-10-06 Thread Mike Snitzer
re making a lot of > changes to their contents makes it easier for git to understand that > they were renamed. > > Acked-by: Ulf Hansson # For MMC > Reviewed-by: Christoph Hellwig > Signed-off-by: Eric Biggers Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redh

Re: [dm-devel] [PATCH v4 1/4] blk-crypto-fallback: properly prefix function and struct names

2021-10-06 Thread Mike Snitzer
> No change in behavior. > > Reviewed-by: Christoph Hellwig > Reviewed-by: Chaitanya Kulkarni > Signed-off-by: Eric Biggers Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v4 4/6] dm: add add_disk() error handling

2021-10-06 Thread Mike Snitzer
viewed-by: Hannes Reinecke > Signed-off-by: Luis Chamberlain Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [git pull] device mapper changes for 5.15

2021-08-31 Thread Mike Snitzer
pu_counter spinlock contention in crypt_page_alloc() Changbin Du (1): dm crypt: use in_hardirq() instead of deprecated in_irq() Mike Snitzer (3): dm writecache: split up writecache_map() to improve code readability dm writecache: factor out writecache_map_remap_origin() dm

Re: [dm-devel] [PATCH 0/6] updates to device mapper target measurement using ima

2021-08-20 Thread Mike Snitzer
On Fri, Aug 13 2021 at 5:37P -0400, Tushar Sugandhi wrote: > > There were several improvements suggested for the original device mapper > target measurement patch series [1]. > > Those improvement suggestions include: > - Prefixing hashes for the DM tables being measured in ima log with the

Re: [dm-devel] holders not working properly, regression [was: Re: use regular gendisk registration in device mapper v2]

2021-08-19 Thread Mike Snitzer
On Thu, Aug 19 2021 at 2:05P -0400, Christoph Hellwig wrote: > Manually reverting "block: remove the extra kobject reference in > bd_link_disk_holder" as show below fixed the issue for me. I'll spend > some more time tomorrow trying to fully understan the life time rules > tomorrow before

[dm-devel] holders not working properly, regression [was: Re: use regular gendisk registration in device mapper v2]

2021-08-19 Thread Mike Snitzer
On Wed, Aug 04 2021 at 5:41P -0400, Christoph Hellwig wrote: > Hi all, > > The device mapper code currently has a somewhat odd gendisk registration > scheme where it calls add_disk early, but uses a special flag to skip the > "queue registration", which is a major part of add_disk. This

Re: [dm-devel] [PATCH 8/8] block: remove support for delayed queue registrations

2021-07-29 Thread Mike Snitzer
On Sun, Jul 25 2021 at 1:54P -0400, Christoph Hellwig wrote: > Now that device mapper has been changed to register the disk once > it is fully ready all this code is unused. > > Signed-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer > --- > block/elevator.c

Re: [dm-devel] [PATCH 7/8] dm: delay registering the gendisk

2021-07-29 Thread Mike Snitzer
the gendisk later now that the holder mechanism > can cope with that. > > Note that this introduces a user visible change: the dm kobject is > now only visible after the initial table has been loaded. > > Signed-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer Jens, fe

Re: [dm-devel] [PATCH 6/8] dm: move setting md->type into dm_setup_md_queue

2021-07-29 Thread Mike Snitzer
ned-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer > --- > drivers/md/dm-ioctl.c | 4 > drivers/md/dm.c | 5 +++-- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c > index 2209cbcd84db..2575074

Re: [dm-devel] [PATCH 5/8] dm: cleanup cleanup_mapped_device

2021-07-29 Thread Mike Snitzer
On Sun, Jul 25 2021 at 1:54P -0400, Christoph Hellwig wrote: > md->queue is not always set when md->disk is set, so simplify the > conditionas a bit. s/not/now/ s/conditionas/conditionals/ > > Signed-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer > --- &

Re: [dm-devel] [PATCH 4/8] block: support delayed holder registration

2021-07-29 Thread Mike Snitzer
itialized but > not registered disk instead by delaying the sysfs registration until the > disk is registered. Maybe expand "bad side effects" in header to include what you detailed here?: https://listman.redhat.com/archives/dm-devel/2021-July/msg00130.html Reviewed-by: Mike Snitzer -- dm-de

Re: [dm-devel] [PATCH 2/8] block: remove the extra kobject reference in bd_link_disk_holder

2021-07-29 Thread Mike Snitzer
imary commit that introduced "the new block_device life time rules" just so readers can inform themselves. Reviewed-by: Mike Snitzer > --- > block/holder.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/block/holder.c b/block/holder.c > index 904a1dcd5c12..96

Re: [dm-devel] [PATCH 1/8] block: make the block holder code optional

2021-07-29 Thread Mike Snitzer
t; + bool > + What is it that new code that does IO remapping and device stacking _should_ be using!? Seems the whole "do not use" and "DEPRECATED" is a misnomer. But those nits aside, code looks fine mechnically: Reviewed-by: Mike Snitzer > source "block/Kc

Re: [dm-devel] use regular gendisk registration in device mapper

2021-07-28 Thread Mike Snitzer
On Tue, Jul 27 2021 at 4:38P -0400, Milan Broz wrote: > On 27/07/2021 18:18, Mike Snitzer wrote: > > On Tue, Jul 27 2021 at 12:02P -0400, > > Christoph Hellwig wrote: > > > >> On Tue, Jul 27, 2021 at 11:58:46AM -0400, Mike Snitzer wrote: > >>>>

Re: [dm-devel] use regular gendisk registration in device mapper

2021-07-27 Thread Mike Snitzer
On Tue, Jul 27 2021 at 12:18P -0400, Mike Snitzer wrote: > On Tue, Jul 27 2021 at 12:02P -0400, > Christoph Hellwig wrote: > > > On Tue, Jul 27, 2021 at 11:58:46AM -0400, Mike Snitzer wrote: > > > > This did not make a different to my testing > > >

Re: [dm-devel] use regular gendisk registration in device mapper

2021-07-27 Thread Mike Snitzer
On Tue, Jul 27 2021 at 12:02P -0400, Christoph Hellwig wrote: > On Tue, Jul 27, 2021 at 11:58:46AM -0400, Mike Snitzer wrote: > > > This did not make a different to my testing > > > using dmsetup and the lvm2 tools. > > > > I'll try these changes running thr

Re: [dm-devel] [PATCH 4/8] block: support delayed holder registration

2021-07-27 Thread Mike Snitzer
On Sun, Jul 25 2021 at 1:54P -0400, Christoph Hellwig wrote: > device mapper needs to register holders before it is ready to do I/O. > Currently it does so by registering the disk early, which has all kinds > of bad side effects. Support registering holders on an initialized but > not

Re: [dm-devel] use regular gendisk registration in device mapper

2021-07-27 Thread Mike Snitzer
On Sun, Jul 25 2021 at 1:54P -0400, Christoph Hellwig wrote: > Hi all, > > The device mapper code currently has a somewhat odd gendisk registration > scheme where it calls add_disk early, but uses a special flag to skip the > "queue registration", which is a major part of add_disk. This

Re: [dm-devel] [PATCH 1/7] dm: measure data on table load

2021-07-21 Thread Mike Snitzer
On Tue, Jul 20 2021 at 10:12P -0400, Mimi Zohar wrote: > Hi Tushar, Mike, > > On Mon, 2021-07-12 at 17:48 -0700, Tushar Sugandhi wrote: > > +struct dm_ima_device_table_metadata { > > + /* > > +* Contains data specific to the device which is common across > > +* all the

Re: [dm-devel] [PATCH 0/7] device mapper target measurements using IMA

2021-07-20 Thread Mike Snitzer
On Mon, Jul 12 2021 at 8:48P -0400, Tushar Sugandhi wrote: > For a given system, various external services/infrastructure tools > (including the attestation service) interact with it - both during the > setup and during rest of the system run-time. They share sensitive data > and/or execute

[dm-devel] [git pull] device mapper changes for 5.14

2021-06-30 Thread Mike Snitzer
e: improve btree residency dm space maps: don't reset space map allocation cursor when committing dm space maps: improve performance with inc/dec on ranges of blocks dm space map disk: cache a small number of index entries Mike Snitzer (2): dm writecache: add "cleane

Re: [dm-devel] [PATCH v4 1/3] scsi: scsi_ioctl: export __scsi_result_to_blk_status()

2021-06-30 Thread Mike Snitzer
On Wed, Jun 30 2021 at 4:12P -0400, Martin Wilck wrote: > On Di, 2021-06-29 at 14:23 -0700, Keith Busch wrote: > > On Tue, Jun 29, 2021 at 09:23:18PM +0200, Martin Wilck wrote: > > > On Di, 2021-06-29 at 14:59 +0200, Christoph Hellwig wrote: > > > > On Mon, Jun 28, 2021 at 04:57:33PM +0200,

Re: [dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-18 Thread Mike Snitzer
[you really should've changed the subject of this email to "[RFC PATCH V3 3/3] dm: support bio polling"] On Fri, Jun 18 2021 at 10:39P -0400, Ming Lei wrote: > From 47e523b9ee988317369eaadb96826323cd86819e Mon Sep 17 00:00:00 2001 > From: Ming Lei > Date: Wed, 16 Jun 2021 16:13:46 +0800 >

Re: [dm-devel] [RFC PATCH 4/4] dm: support bio polling

2021-06-16 Thread Mike Snitzer
On Wed, Jun 16 2021 at 9:05P -0400, Ming Lei wrote: > Support bio(REQ_POLLED) polling in the following approach: > > 1) setup one list in instance of 'struct dm_io', adds every 'struct > dm_target_io' instance cloned for current dm bio into this list; > store the list in 1) into

Re: [dm-devel] [PATCH v3 0/2] dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath

2021-06-15 Thread Mike Snitzer
On Tue, Jun 15 2021 at 6:54P -0400, Martin Wilck wrote: > Hi Mike, > > On Mo, 2021-06-14 at 11:15 -0400, Mike Snitzer wrote: > > > > This work offers a proof-of-concept but it needs further refinement > > for sure. > > Thanks for looking into it again. I

Re: [dm-devel] [PATCH v3 2/2] dm: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO on dm-multipath

2021-06-15 Thread Mike Snitzer
On Fri, Jun 11 2021 at 4:25P -0400, mwi...@suse.com wrote: > From: Martin Wilck > > In virtual deployments, SCSI passthrough over dm-multipath devices is a > common setup. The qemu "pr-helper" was specifically invented for it. I > believe that this is the most important real-world scenario

Re: [dm-devel] [PATCH v3 0/2] dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath

2021-06-14 Thread Mike Snitzer
et upstream). Mike > Changes v1->v2: > > - applied modifications from Mike Snitzer > - moved SG_IO dependent code to a separate file, no scsi includes in >dm.c any more > - made the new code depend on a configuration option > - separated out scsi changes

Re: [dm-devel] [PATCH v5 08/11] dm: Forbid requeue of writes to zones

2021-06-04 Thread Mike Snitzer
On Tue, May 25 2021 at 5:24P -0400, Damien Le Moal wrote: > A target map method requesting the requeue of a bio with > DM_MAPIO_REQUEUE or completing it with DM_ENDIO_REQUEUE can cause > unaligned write errors if the bio is a write operation targeting a > sequential zone. If a zoned target

Re: [dm-devel] [PATCH v5 00/11] dm: Improve zoned block device support

2021-06-03 Thread Mike Snitzer
On Thu, Jun 03 2021 at 1:46P -0400, Jens Axboe wrote: > On 6/2/21 12:32 PM, Mike Snitzer wrote: > > On Tue, Jun 01 2021 at 6:57P -0400, > > Damien Le Moal wrote: > > > >> On 2021/05/26 6:25, Damien Le Moal wrote: > >>> This series improve dev

Re: [dm-devel] [PATCH v5 00/11] dm: Improve zoned block device support

2021-06-02 Thread Mike Snitzer
On Tue, Jun 01 2021 at 6:57P -0400, Damien Le Moal wrote: > On 2021/05/26 6:25, Damien Le Moal wrote: > > This series improve device mapper support for zoned block devices and > > of targets exposing a zoned device. > > Mike, Jens, > > Any feedback regarding this series ? > > > > > The

[dm-devel] [git pull] device mapper fixes for 5.13-rc4

2021-05-27 Thread Mike Snitzer
Hi Linus, The following changes since commit c4681547bcce777daf576925a966ffa824edd09d: Linux 5.13-rc3 (2021-05-23 11:42:48 -1000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-5.13/dm-fixes-2 for you to fetch

[dm-devel] [git pull] device mapper fixes for 5.13-rc3

2021-05-20 Thread Mike Snitzer
Hi Linus, The following changes since commit 6efb943b8616ec53a5e444193dccf1af9ad627b5: Linux 5.13-rc1 (2021-05-09 14:17:44 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-5.13/dm-fixes for you to fetch

Re: [dm-devel] can we fix some dm snapshot crashes please? :)

2021-05-07 Thread Mike Snitzer
On Fri, May 07 2021 at 10:10P -0400, Michael Tokarev wrote: > 07.05.2021 15:31, Zdenek Kabelac wrote: > > Dne 07. 05. 21 v 12:31 Michael Tokarev napsal(a): > ... > > >   sz=$(blockdev --getsize /dev/loop0) > > >   dmsetup create base --table "0 $sz snapshot-origin /dev/loop0" > > >   # and now

Re: [dm-devel] [PATCH v3 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-05-01 Thread Mike Snitzer
On Sat, May 01 2021 at 7:58am -0400, Hannes Reinecke wrote: > On 4/20/21 5:46 PM, Laurence Oberman wrote: > [ .. ] > > > >Let me add some reasons why as primarily a support person that this is > >important and try avoid another combative situation. > > > >Customers depend on managing

Re: [dm-devel] dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath

2021-04-30 Thread Mike Snitzer
On Thu, Apr 29 2021 at 2:02am -0400, Hannes Reinecke wrote: > On 4/28/21 9:54 PM, Mike Snitzer wrote: > >On Thu, Apr 22 2021 at 4:21P -0400, > >mwi...@suse.com wrote: > > > >>From: Martin Wilck > >> > >>In virtual deployments, SCSI passthrough

[dm-devel] [git pull] device mapper changes for 5.13

2021-04-30 Thread Mike Snitzer
ommon: fix division bug in sm_ll_find_free_block() Julia Lawall (1): dm writecache: fix flexible_array.cocci warnings Matthew Wilcox (Oracle) (1): dm: replace dm_vcalloc() Mike Snitzer (1): dm raid: remove unnecessary discard limits for raid0 and raid10 Mikulas Patocka (8)

Re: [dm-devel] dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath

2021-04-28 Thread Mike Snitzer
lude > #include > +#include > +#include > > #define DM_MSG_PREFIX "core" > Ngh... not loving this at all. But here is a patch (that I didn't compile test) that should be folded in, still have to think about how this could be made cleaner in general though. Also

Re: [dm-devel] [PATCH 077/141] dm raid: Fix fall-through warnings for Clang

2021-04-20 Thread Mike Snitzer
On Tue, Apr 20 2021 at 4:15pm -0400, Gustavo A. R. Silva wrote: > Hi all, > > Friendly ping: who can take this, please? > > Thanks > -- > Gustavo > > On 11/20/20 12:35, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > > by explicitly

Re: [dm-devel] [PATCH v3 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-20 Thread Mike Snitzer
On Tue, Apr 20 2021 at 5:37am -0400, Christoph Hellwig wrote: > > RHEL9 is coming, would really prefer that these changes land upstream > > rather than carry them within RHEL. > > We've told from the very beginning that dm-multipth on nvme is not > a support configuration. You have some high

Re: [dm-devel] [PATCH v4 3/3] nvme: decouple basic ANA log page re-read support from native multipathing

2021-04-20 Thread Mike Snitzer
On Tue, Apr 20 2021 at 5:34am -0400, Christoph Hellwig wrote: > On Fri, Apr 16, 2021 at 07:53:29PM -0400, Mike Snitzer wrote: > > Whether or not ANA is present is a choice of the target implementation; > > the host (and whether it supports multipathing) has _

Re: [dm-devel] [PATCH v4 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-19 Thread Mike Snitzer
On Fri, Apr 16 2021 at 8:02pm -0400, Mike Snitzer wrote: > On Fri, Apr 16 2021 at 7:53pm -0400, > Mike Snitzer wrote: > > > Hi, > > > > This patchset reflects changes needed to make NVMe error handling and > > ANA state updates work well wit

Re: [dm-devel] [PATCH v4 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 7:53pm -0400, Mike Snitzer wrote: > Hi, > > This patchset reflects changes needed to make NVMe error handling and > ANA state updates work well with dm-multipath (which always sets > REQ_FAILFAST_TRANSPORT). > > RHEL8 has been carrying an old

[dm-devel] [PATCH v4 1/3] nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set

2021-04-16 Thread Mike Snitzer
with the suggestion made here: https://lore.kernel.org/linux-nvme/20190813170144.ga10...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Mike Snitzer Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke --- drivers/nvme/host/core.c | 3 +++ include/linux/blk_types.h | 8 2 files

[dm-devel] [PATCH v3 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-16 Thread Mike Snitzer
ent block in nvme_decide_disposition() v2 -> v3: - Added Reviewed-by tags to BLK_STS_DO_NOT_RETRY patch. - Eliminated __nvme_end_req() and added code comment to nvme_failup_req() in FAILUP handling patch. Mike Snitzer (3): nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set nvme: allow

[dm-devel] [PATCH v4 3/3] nvme: decouple basic ANA log page re-read support from native multipathing

2021-04-16 Thread Mike Snitzer
to rely on the NVMe driver for ANA support while dm-multipath takes care of multipathing. And as always, if embedded NVMe users do not want any performance overhead associated with ANA or native NVMe multipathing they can disable CONFIG_NVME_MULTIPATH. Signed-off-by: Mike Snitzer --- drivers/nvme/host

[dm-devel] [PATCH v4 2/3] nvme: allow local retry and proper failover for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
with a retryable path error. Signed-off-by: Mike Snitzer --- drivers/nvme/host/core.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 540d6fd8ffef..a12b10a1383c 100644 --- a/drivers/nvme/host/core.c

[dm-devel] [PATCH v3 4/4] nvme: decouple basic ANA log page re-read support from native multipathing

2021-04-16 Thread Mike Snitzer
to rely on the NVMe driver for ANA support while dm-multipath takes care of multipathing. And as always, if embedded NVMe users do not want any performance overhead associated with ANA or native NVMe multipathing they can disable CONFIG_NVME_MULTIPATH. Signed-off-by: Mike Snitzer --- drivers/nvme/host

[dm-devel] [PATCH v3 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
() ensures the request is completed with a retryable IO error when appropriate. Signed-off-by: Mike Snitzer --- drivers/nvme/host/core.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index

[dm-devel] [PATCH v3 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Mike Snitzer
error is handled by multipath. Signed-off-by: Chao Leng [snitzer: edited header for grammar and clarity, also added code comment] Signed-off-by: Mike Snitzer --- drivers/nvme/host/core.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers

[dm-devel] [PATCH v3 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-16 Thread Mike Snitzer
(1): nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set Mike Snitzer (3): nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT nvme: decouple basic ANA log page re-read support from native multipath

[dm-devel] [PATCH v3 1/4] nvme: return BLK_STS_DO_NOT_RETRY if the DNR bit is set

2021-04-16 Thread Mike Snitzer
with the suggestion made here: https://lore.kernel.org/linux-nvme/20190813170144.ga10...@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Mike Snitzer Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke --- drivers/nvme/host/core.c | 3 +++ include/linux/blk_types.h | 8 2 files

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 4:52pm -0400, Ewan D. Milne wrote: > On Thu, 2021-04-15 at 19:15 -0400, Mike Snitzer wrote: > > If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry > > IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is > > set by

Re: [dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 11:20am -0400, Hannes Reinecke wrote: > On 4/16/21 4:53 PM, Mike Snitzer wrote: > > On Fri, Apr 16 2021 at 10:01am -0400, > > Hannes Reinecke wrote: > > > >> On 4/16/21 1:15 AM, Mike Snitzer wrote: > >>> From: Chao Leng >

Re: [dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 10:07am -0400, Hannes Reinecke wrote: > On 4/16/21 1:15 AM, Mike Snitzer wrote: > > If REQ_FAILFAST_TRANSPORT is set it means the driver should not retry > > IO that completed with transport errors. REQ_FAILFAST_TRANSPORT is > > set by multipath

Re: [dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-16 Thread Mike Snitzer
On Fri, Apr 16 2021 at 10:01am -0400, Hannes Reinecke wrote: > On 4/16/21 1:15 AM, Mike Snitzer wrote: > > From: Chao Leng > > > > REQ_FAILFAST_TRANSPORT was designed for SCSI, because the SCSI protocol > > does not define the local retry mechanism. SCSI impleme

Re: [dm-devel] nvme: Return BLK_STS_TARGET if the DNR bit is set

2021-04-15 Thread Mike Snitzer
Sorry, emailed from wrong terminal... have since emailed correct v2 On Thu, Apr 15 2021 at 7:11pm -0400, Mike Snitzer wrote: > BZ: 1948690 > Upstream Status: RHEL-only > > Signed-off-by: Mike Snitzer > > rhel-8.git commit ef4ab90c12db5e0e50800ec323736b95be7a6ff5 >

[dm-devel] [PATCH v2 2/4] nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-15 Thread Mike Snitzer
error is handled by multipath. Signed-off-by: Chao Leng [snitzer: edited header for grammar and clarity, also added code comment] Signed-off-by: Mike Snitzer --- drivers/nvme/host/core.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers

[dm-devel] [PATCH v2 4/4] nvme: decouple basic ANA log page re-read support from native multipathing

2021-04-15 Thread Mike Snitzer
to rely on the NVMe driver for ANA support while dm-multipath takes care of multipathing. And as always, if embedded NVMe users do not want any performance overhead associated with ANA or native NVMe multipathing they can disable CONFIG_NVME_MULTIPATH. Signed-off-by: Mike Snitzer --- drivers/nvme/host

[dm-devel] [PATCH v2 0/4] nvme: improve error handling and ana_state to work well with dm-multipath

2021-04-15 Thread Mike Snitzer
/?h=nvme-error-handling-fixes/for-5.9 RHEL9 is coming, would really prefer that these changes land upstream rather than carry them within RHEL. All review/feedback welcome. Thanks, Mike Chao Leng (1): nvme: allow local retry for requests with REQ_FAILFAST_TRANSPORT set Mike Snitzer (3): nvme

[dm-devel] [PATCH v2 3/4] nvme: introduce FAILUP handling for REQ_FAILFAST_TRANSPORT

2021-04-15 Thread Mike Snitzer
() ensures the request is completed with a retryable IO error when appropriate. __nvme_end_req() was factored out for use by both nvme_end_req() and nvme_failup_req(). Signed-off-by: Mike Snitzer --- drivers/nvme/host/core.c | 31 ++- 1 file changed, 26 insertions(+), 5

<    1   2   3   4   5   6   7   8   9   10   >