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

2021-04-15 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 --- drivers/nvme/host/core.c | 3 +++ include/linux/blk_types.h | 8 2 files changed, 11 insertions(+) diff --git a/drivers/nvme/host/core.c b

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

2021-04-15 Thread Mike Snitzer
BZ: 1948690 Upstream Status: RHEL-only Signed-off-by: Mike Snitzer rhel-8.git commit b904f4b8e0f90613bf1b2b9d9ccad3c015741daf Author: Mike Snitzer Date: Tue Aug 25 21:52:47 2020 -0400 [nvme] nvme: decouple basic ANA log page re-read support from native multipathing Message-id

[dm-devel] nvme: update failover handling to work with REQ_FAILFAST_TRANSPORT

2021-04-15 Thread Mike Snitzer
BZ: 1948690 Upstream Status: RHEL-only Signed-off-by: Mike Snitzer rhel-8.git commit f8fb6ea1226e2abc525c88da13b346118d548eea Author: Mike Snitzer Date: Tue Aug 25 21:52:46 2020 -0400 [nvme] nvme: update failover handling to work with REQ_FAILFAST_TRANSPORT Message-id

[dm-devel] nvme: allow retry for requests with REQ_FAILFAST_TRANSPORT set

2021-04-15 Thread Mike Snitzer
BZ: 1948690 Upstream Status: RHEL-only Signed-off-by: Mike Snitzer rhel-8.git commit 7dadadb072515f243868e6fe2f7e9c97fd3516c9 Author: Mike Snitzer Date: Tue Aug 25 21:52:48 2020 -0400 [nvme] nvme: allow retry for requests with REQ_FAILFAST_TRANSPORT set Message-id

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

2021-04-15 Thread Mike Snitzer
BZ: 1948690 Upstream Status: RHEL-only Signed-off-by: Mike Snitzer rhel-8.git commit ef4ab90c12db5e0e50800ec323736b95be7a6ff5 Author: Mike Snitzer Date: Tue Aug 25 21:52:45 2020 -0400 [nvme] nvme: Return BLK_STS_TARGET if the DNR bit is set Message-id: <20200825215248.229

[dm-devel] [git pull] device mapper fix for 5.12 final

2021-04-14 Thread Mike Snitzer
Hi Linus, The following changes since commit d434405aaab7d0ebc516b68a8fc4100922d7f5ef: Linux 5.12-rc7 (2021-04-11 15:16:13 -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.12/dm-fixes-3 for you to fetch

Re: [dm-devel] [PATCH v8 0/4] block device interposer

2021-04-09 Thread Mike Snitzer
On Fri, Apr 09 2021 at 7:48am -0400, Sergei Shtepa wrote: > I think I'm ready to suggest the next version of block device interposer > (blk_interposer). It allows to redirect bio requests to other block > devices. > > In this series of patches, I reviewed the process of attaching and >

[dm-devel] [git pull] device mapper fixes for 5.12-rc5

2021-03-26 Thread Mike Snitzer
Hi Linus, The following changes since commit 0d02ec6b3136c73c09e7859f0d0e4e2c4c07b49b: Linux 5.12-rc4 (2021-03-21 14:56:43 -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.12/dm-fixes-2 for you to fetch

Re: [dm-devel] [PATCH V3 13/13] dm: support IO polling for bio-based dm device

2021-03-25 Thread Mike Snitzer
table(md, _idx); > + ret = dm_table_supports_poll(t); > + dm_put_live_table(md, srcu_idx); > + > + return ret; > +} > + I know this code will only get called by blk-core if bio-based but there isn't anything about this method's implementation that is inherently bio-base

Re: [dm-devel] md/dm-mpath: check whether all pgpaths have same uuid in multipath_ctr()

2021-03-25 Thread Mike Snitzer
On Wed, Mar 24 2021 at 9:21pm -0400, Zhiqiang Liu wrote: > > > On 2021/3/22 22:22, Mike Snitzer wrote: > > On Mon, Mar 22 2021 at 4:11am -0400, > > Christoph Hellwig wrote: > > > >> On Sat, Mar 20, 2021 at 03:19:23PM +0800, Zhiqiang Liu wrote: > >

Re: [dm-devel] dm-integrity - add the "reset_recalculate" flag

2021-03-23 Thread Mike Snitzer
On Tue, Mar 23 2021 at 10:59am -0400, Mikulas Patocka wrote: > This patch adds a new flag "reset_recalculate" that will restart > recalculating from the beginning of the device. It can be used if we want > to change the hash function. Example: > > #!/bin/sh > dmsetup remove_all > rmmod brd >

Re: [dm-devel] md/dm-mpath: check whether all pgpaths have same uuid in multipath_ctr()

2021-03-22 Thread Mike Snitzer
On Mon, Mar 22 2021 at 4:11am -0400, Christoph Hellwig wrote: > On Sat, Mar 20, 2021 at 03:19:23PM +0800, Zhiqiang Liu wrote: > > From: Zhiqiang Liu > > > > When we make IO stress test on multipath device, there will > > be a metadata err because of wrong path. In the test, we > > concurrent

Re: [dm-devel] [RFC PATCH V2 00/13] block: support bio based io polling

2021-03-19 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > Hi, > > Add per-task io poll context for holding HIPRI blk-mq/underlying bios > queued from bio based driver's io submission context, and reuse one bio > padding field for storing 'cookie' returned from submit_bio() for these > bios. Also

Re: [dm-devel] [RFC PATCH V2 09/13] block: use per-task poll context to implement bio based io poll

2021-03-19 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > Currently bio based IO poll needs to poll all hw queue blindly, this way > is very inefficient, and the big reason is that we can't pass bio > submission result to io poll task. This is awkward because bio-based IO polling doesn't exist

Re: [dm-devel] [RFC PATCH V2 06/13] block: add new field into 'struct bvec_iter'

2021-03-19 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > There is a hole at the end of 'struct bvec_iter', so put a new field > here and we can save cookie returned from submit_bio() here for > supporting bio based polling. > > This way can avoid to extend bio unnecessarily. > > Signed-off-by:

Re: [dm-devel] [RFC PATCH V2 05/13] block: add req flag of REQ_TAG

2021-03-19 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > Add one req flag REQ_TAG which will be used in the following patch for > supporting bio based IO polling. "REQ_TAG" is so generic yet is used in such a specific way (to mark an FS bio as having polling context) I don't have a great

Re: [dm-devel] [RFC PATCH V2 04/13] block: create io poll context for submission and poll task

2021-03-19 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > Create per-task io poll context for both IO submission and poll task > if the queue is bio based and supports polling. > > This io polling context includes two queues: 1) submission queue(sq) for storing HIPRI bio submission result(cookie)

Re: [dm-devel] [RFC PATCH V2 01/13] block: add helper of blk_queue_poll

2021-03-19 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > There has been 3 users, and will be more, so add one such helper. > > Signed-off-by: Ming Lei Not sure if you're collecting Reviewed-by or Acked-by at this point? Seems you dropped Chaitanya's Reviewed-by to v1:

Re: [dm-devel] [RFC PATCH V2 09/13] block: use per-task poll context to implement bio based io poll

2021-03-18 Thread Mike Snitzer
On Thu, Mar 18, 2021 at 1:26 PM Mike Snitzer wrote: > > On Thu, Mar 18 2021 at 12:48pm -0400, > Ming Lei wrote: > > > Currently bio based IO poll needs to poll all hw queue blindly, this way > > is very inefficient, and the big reason is that we can't pass bio > >

Re: [dm-devel] [RFC PATCH V2 09/13] block: use per-task poll context to implement bio based io poll

2021-03-18 Thread Mike Snitzer
On Thu, Mar 18 2021 at 12:48pm -0400, Ming Lei wrote: > Currently bio based IO poll needs to poll all hw queue blindly, this way > is very inefficient, and the big reason is that we can't pass bio > submission result to io poll task. > > In IO submission context, track associated underlying

Re: [dm-devel] [RFC PATCH 08/11] block: use per-task poll context to implement bio based io poll

2021-03-18 Thread Mike Snitzer
On Wed, Mar 17 2021 at 3:19am -0400, Ming Lei wrote: > On Wed, Mar 17, 2021 at 11:49:00AM +0800, JeffleXu wrote: > > > > > > On 3/16/21 7:00 PM, JeffleXu wrote: > > > > > > > > > On 3/16/21 3:17 PM, Ming Lei wrote: > > >> On Tue, Mar 16, 2021 at 02:46:08PM +0800, JeffleXu wrote: > > >>> It

Re: [dm-devel] [PATCH v7 2/3] block: add bdev_interposer

2021-03-17 Thread Mike Snitzer
On Wed, Mar 17 2021 at 2:14pm -0400, Sergei Shtepa wrote: > The 03/17/2021 18:04, Mike Snitzer wrote: > > On Wed, Mar 17 2021 at 8:22am -0400, > > Sergei Shtepa wrote: > > > > > The 03/17/2021 06:03, Ming Lei wrote: > > > > On Tue, Mar 16, 202

Re: [dm-devel] [PATCH v7 2/3] block: add bdev_interposer

2021-03-17 Thread Mike Snitzer
On Wed, Mar 17 2021 at 8:22am -0400, Sergei Shtepa wrote: > The 03/17/2021 06:03, Ming Lei wrote: > > On Tue, Mar 16, 2021 at 07:35:44PM +0300, Sergei Shtepa wrote: > > > The 03/16/2021 11:09, Ming Lei wrote: > > > > On Fri, Mar 12, 2021 at 06:44:54PM +0300, Sergei Shtepa wrote: > > > > >

Re: [dm-devel] [PATCH v7 2/3] block: add bdev_interposer

2021-03-17 Thread Mike Snitzer
On Tue, Mar 16 2021 at 11:03pm -0400, Ming Lei wrote: > On Tue, Mar 16, 2021 at 07:35:44PM +0300, Sergei Shtepa wrote: > > The 03/16/2021 11:09, Ming Lei wrote: > > > On Fri, Mar 12, 2021 at 06:44:54PM +0300, Sergei Shtepa wrote: > > > > bdev_interposer allows to redirect bio requests to another

Re: [dm-devel] [PATCH v2] dm table: Fix zoned model check and zone sectors check

2021-03-16 Thread Mike Snitzer
On Tue, Mar 16 2021 at 2:14am -0400, Damien Le Moal wrote: > On 2021/03/16 13:36, Shin'ichiro Kawasaki wrote: > > Commit 24f6b6036c9e ("dm table: fix zoned iterate_devices based device > > capability checks") triggered dm table load failure when dm-zoned device > > is set up for zoned block

Re: [dm-devel] dm table: Fix zoned model check and zone sectors check

2021-03-12 Thread Mike Snitzer
On Thu, Mar 11 2021 at 6:30pm -0500, Damien Le Moal wrote: > On 2021/03/12 2:54, Mike Snitzer wrote: > > On Wed, Mar 10 2021 at 3:25am -0500, > > Shin'ichiro Kawasaki wrote: > > > >> Commit 24f6b6036c9e ("dm table: fix zoned iterate_devices based device &g

Re: [dm-devel] [PATCH v7 1/3] block: add blk_mq_is_queue_frozen()

2021-03-12 Thread Mike Snitzer
On Fri, Mar 12 2021 at 10:44am -0500, Sergei Shtepa wrote: > blk_mq_is_queue_frozen() allow to assert that the queue is frozen. > > Signed-off-by: Sergei Shtepa > --- > block/blk-mq.c | 13 + > include/linux/blk-mq.h | 1 + > 2 files changed, 14 insertions(+) > > diff

Re: [dm-devel] [PATCH v7 3/3] dm: add DM_INTERPOSED_FLAG

2021-03-12 Thread Mike Snitzer
On Fri, Mar 12 2021 at 10:44am -0500, Sergei Shtepa wrote: > DM_INTERPOSED_FLAG allow to create DM targets on "the fly". > Underlying block device opens without a flag FMODE_EXCL. > DM target receives bio from the original device via > bdev_interposer. > > Signed-off-by: Sergei Shtepa > --- >

Re: [dm-devel] [PATCH v2] dm-ioctl: return UUID in DM_LIST_DEVICES_CMD result

2021-03-11 Thread Mike Snitzer
On Thu, Mar 11 2021 at 2:43pm -0500, Mikulas Patocka wrote: > > > On Thu, 11 Mar 2021, Mike Snitzer wrote: > > > > Index: linux-2.6/include/uapi/linux/dm-ioctl.h > > > === > > > --- linux

Re: [dm-devel] [PATCH v2] dm-ioctl: return UUID in DM_LIST_DEVICES_CMD result

2021-03-11 Thread Mike Snitzer
On Thu, Mar 11 2021 at 1:26pm -0500, Mikulas Patocka wrote: > When LVM needs to find a device with a particular UUID it needs to ask for > UUID for each device. This patch returns UUID directly in the list of > devices, so that LVM doesn't have to query all the devices with an ioctl. > The UUID

Re: [dm-devel] [PATCH 2/6] dm crypt: Handle DM_CRYPT_NO_*_WORKQUEUE more explicit.

2021-03-11 Thread Mike Snitzer
On Sat, Feb 13 2021 at 9:31am -0500, Ignat Korchagin wrote: > On Sat, Feb 13, 2021 at 11:11 AM Sebastian Andrzej Siewior > wrote: > > > > By looking at the handling of DM_CRYPT_NO_*_WORKQUEUE in > > kcryptd_queue_crypt() it appears that READ and WRITE requests might be > > handled in the

Re: [dm-devel] dm table: Fix zoned model check and zone sectors check

2021-03-11 Thread Mike Snitzer
On Wed, Mar 10 2021 at 3:25am -0500, Shin'ichiro Kawasaki wrote: > Commit 24f6b6036c9e ("dm table: fix zoned iterate_devices based device > capability checks") triggered dm table load failure when dm-zoned device > is set up for zoned block devices and a regular device for cache. > > The

Re: [dm-devel] [PATCH v5 10/12] block: fastpath for bio-based polling

2021-03-10 Thread Mike Snitzer
On Wed, Mar 03 2021 at 6:57am -0500, Jeffle Xu wrote: > Offer one fastpath for bio-based polling when bio submitted to dm > device is not split. > > In this case, there will be only one bio submitted to only one polling > hw queue of one underlying mq device, and thus we don't need to track >

Re: [dm-devel] [PATCH v5 04/12] block: add poll_capable method to support bio-based IO polling

2021-03-10 Thread Mike Snitzer
On Wed, Mar 03 2021 at 6:57am -0500, Jeffle Xu wrote: > This method can be used to check if bio-based device supports IO polling > or not. For mq devices, checking for hw queue in polling mode is > adequate, while the sanity check shall be implementation specific for > bio-based devices. For

Re: [dm-devel] [PATCH v5 03/12] block: add poll method to support bio-based IO polling

2021-03-10 Thread Mike Snitzer
644 > --- a/block/blk-core.c > +++ b/block/blk-core.c > @@ -1119,6 +1119,64 @@ blk_qc_t submit_bio(struct bio *bio) > } > EXPORT_SYMBOL(submit_bio); > > + Minor nit: Extra empty new line here? ^ Otherwise, looks good (I like the end result of blk-mq and bio-based pollin

Re: [dm-devel] [PATCH v5 09/12] nvme/pci: don't wait for locked polling queue

2021-03-10 Thread Mike Snitzer
On Wed, Mar 03 2021 at 6:57am -0500, Jeffle Xu wrote: > There's no sense waiting for the hw queue when it currently has been > locked by another polling instance. The polling instance currently > occupying the hw queue will help reap the completion events. > > It shall be safe to surrender the

Re: [dm-devel] [PATCH v3 00/11] dm: support IO polling

2021-03-10 Thread Mike Snitzer
On Mon, Feb 08 2021 at 3:52am -0500, Jeffle Xu wrote: > > [Performance] > 1. One thread (numjobs=1) randread (bs=4k, direct=1) one dm-linear > device, which is built upon 3 nvme devices, with one polling hw > queue per nvme device. > > | IOPS (IRQ mode) | IOPS (iopoll=1 mode) | diff >

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

2021-03-09 Thread Mike Snitzer
On Tue, Mar 09 2021 at 4:32am -0500, Yang Li wrote: > Fix the following coccicheck warning: > ./drivers/md/dm-ps-service-time.c:85:10-12: Unneeded variable: "sz". > Return "0" on line 105 > > Reported-by: Abaci Robot > Signed-off-by: Yang Li This type of change gets proposed regaularly.

[dm-devel] [git pull] device mapper fixes for 5.12-rc2

2021-03-05 Thread Mike Snitzer
Hi Linus, The following changes since commit a666e5c05e7c4aaabb2c5d58117b0946803d03d2: dm: fix deadlock when swapping to encrypted device (2021-02-11 09:45:28 -0500) 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 4/4] dm: support I/O polling

2021-03-05 Thread Mike Snitzer
On Fri, Mar 05 2021 at 12:56pm -0500, Heinz Mauelshagen wrote: > > On 3/5/21 6:46 PM, Heinz Mauelshagen wrote: > >On 3/5/21 10:52 AM, JeffleXu wrote: > >> > >>On 3/3/21 6:09 PM, Mikulas Patocka wrote: > >>> > >>>On Wed, 3 Mar 2021, JeffleXu wrote: > >>> > > On 3/3/21 3:05 AM, Mikulas

Re: [dm-devel] [PATCH 4/4] dm: support I/O polling

2021-03-04 Thread Mike Snitzer
On Thu, Mar 04 2021 at 10:01am -0500, Jeff Moyer wrote: > Hi, Mikulas, > > Mikulas Patocka writes: > > > On Wed, 3 Mar 2021, JeffleXu wrote: > > > >> > >> > >> On 3/3/21 3:05 AM, Mikulas Patocka wrote: > >> > >> > Support I/O polling if submit_bio_noacct_mq_direct returned non-empty > >> >

Re: [dm-devel] [PATCH v4 00/12] dm: support IO polling

2021-02-23 Thread Mike Snitzer
On Mon, Feb 22 2021 at 10:55pm -0500, JeffleXu wrote: > > > On 2/20/21 7:06 PM, Jeffle Xu wrote: > > [Changes since v3] > > - newly add patch 7 and patch 11, as a new optimization improving > > performance of multiple polling processes. Now performance of multiple > > polling processes can be

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

2021-02-17 Thread Mike Snitzer
return type of shadow_root() Mike Snitzer (2): dm writecache: use bdev_nr_sectors() instead of open-coded equivalent dm: simplify target code conditional on CONFIG_BLK_DEV_ZONED Mikulas Patocka (5): dm integrity: introduce the "fix_hmac" argument dm writecache: fix

Re: [dm-devel] [PATCH 12/78] dm: use set_capacity_and_notify

2021-02-17 Thread Mike Snitzer
On Mon, Nov 16, 2020 at 10:05 AM Christoph Hellwig wrote: > > Use set_capacity_and_notify to set the size of both the disk and block > device. This also gets the uevent notifications for the resize for free. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Hannes Reinecke > --- >

Re: [dm-devel] [PATCH v5 5/6] dm: add 'noexcl' option for dm-linear

2021-02-15 Thread Mike Snitzer
On Mon, Feb 15 2021 at 5:34am -0500, Sergei Shtepa wrote: > The 02/12/2021 19:06, Mike Snitzer wrote: > > On Fri, Feb 12 2021 at 6:34am -0500, > > Sergei Shtepa wrote: > > > > > The 02/11/2021 20:51, Mike Snitzer wrote: > > > > On Tue, Feb 09 20

Re: [dm-devel] [PATCH v5 4/6] dm: new ioctl DM_DEV_REMAP_CMD

2021-02-12 Thread Mike Snitzer
On Tue, Feb 09 2021 at 9:30am -0500, Sergei Shtepa wrote: > New ioctl DM_DEV_REMAP_CMD allow to remap bio requests > from regular block device to dm device. I really dislike the (ab)use of "REMAP" for this. DM is and always has been about remapping IO. Would prefer DM_DEV_INTERPOSE_CMD

Re: [dm-devel] [PATCH v5 5/6] dm: add 'noexcl' option for dm-linear

2021-02-12 Thread Mike Snitzer
On Fri, Feb 12 2021 at 6:34am -0500, Sergei Shtepa wrote: > The 02/11/2021 20:51, Mike Snitzer wrote: > > On Tue, Feb 09 2021 at 9:30am -0500, > > Sergei Shtepa wrote: > > > > > The 'noexcl' option allow to open underlying block-device > > > with

Re: [dm-devel] [PATCH v4 0/5] add support for inline encryption to device mapper

2021-02-11 Thread Mike Snitzer
On Thu, Feb 11 2021 at 6:01pm -0500, Satya Tangirala wrote: > On Wed, Feb 10, 2021 at 12:59:59PM -0700, Jens Axboe wrote: > > On 2/10/21 12:33 PM, Mike Snitzer wrote: > > > On Mon, Feb 01 2021 at 12:10am -0500, > > > Satya Tangirala wrote: > > > &

Re: [dm-devel] [PATCH v5 5/6] dm: add 'noexcl' option for dm-linear

2021-02-11 Thread Mike Snitzer
On Tue, Feb 09 2021 at 9:30am -0500, Sergei Shtepa wrote: > The 'noexcl' option allow to open underlying block-device > without FMODE_EXCL. > > Signed-off-by: Sergei Shtepa > --- > drivers/md/dm-linear.c| 14 +- > drivers/md/dm-table.c | 14 -- >

Re: [dm-devel] [PATCH v2] dm era: only resize metadata in preresume

2021-02-11 Thread Mike Snitzer
On Thu, Feb 11 2021 at 9:22am -0500, Nikos Tsironis wrote: > Metadata resize shouldn't happen in the ctr. The ctr loads a temporary > (inactive) table that will only become active upon resume. That is why > resize should always be done in terms of resume. Otherwise a load (ctr) > whose inactive

Re: [dm-devel] [PATCH v4 0/5] add support for inline encryption to device mapper

2021-02-10 Thread Mike Snitzer
On Mon, Feb 01 2021 at 12:10am -0500, Satya Tangirala wrote: > This patch series adds support for inline encryption to the device mapper. > > Patch 1 introduces the "passthrough" keyslot manager. > > The regular keyslot manager is designed for inline encryption hardware that > have only a

Re: [dm-devel] dm: fix deadlock when swapping to encrypted device

2021-02-10 Thread Mike Snitzer
On Wed, Feb 10 2021 at 11:50am -0500, Mikulas Patocka wrote: > Hi > > Here I'm sending the patch that fixes swapping to dm-crypt. > > The logic that limits the number of in-progress I/Os was moved to generic > device mapper. A dm target can activate it by setting ti->limit_swap. The > actual

Re: [dm-devel] [PATCH 4/4] dm era: Remove unreachable resize operation in pre-resume function

2021-02-10 Thread Mike Snitzer
On Wed, Feb 10 2021 at 1:12P -0500, Mike Snitzer wrote: > On Fri, Jan 22 2021 at 10:25am -0500, > Nikos Tsironis wrote: > > > The device metadata are resized in era_ctr(), so the metadata resize > > operation in era_preresume() never runs. > > > > Also, not

Re: [dm-devel] [PATCH 0/4] dm era: Various minor fixes

2021-02-10 Thread Mike Snitzer
On Wed, Feb 10 2021 at 12:56pm -0500, Ming Hung Tsai wrote: > On Fri, Jan 22, 2021 at 11:30 PM Nikos Tsironis wrote: > > > > While working on fixing the bugs that cause lost writes, for which I > > have sent separate emails, I bumped into several other minor issues that > > I fix in this patch

Re: [dm-devel] [PATCH 4/4] dm era: Remove unreachable resize operation in pre-resume function

2021-02-10 Thread Mike Snitzer
On Fri, Jan 22 2021 at 10:25am -0500, Nikos Tsironis wrote: > The device metadata are resized in era_ctr(), so the metadata resize > operation in era_preresume() never runs. > > Also, note, that if the operation did ever run it would deadlock, since > the worker has not been started at this

Re: [dm-devel] dm-writecache: allow the underlying device to be shrunk

2021-02-09 Thread Mike Snitzer
On Tue, Feb 09 2021 at 10:56am -0500, Mikulas Patocka wrote: > Allow shrinking the underlying data device (dm-writecache must be > suspended when the device is shrunk). > > This patch modifies dm-writecache, so that it doesn't attempt to write any > data beyond the end of the data device. > >

Re: [dm-devel] dm: fix iterate_device sanity check

2021-02-09 Thread Mike Snitzer
On Tue, Feb 09 2021 at 2:06am -0500, JeffleXu wrote: > > > On 2/9/21 1:29 PM, Mike Snitzer wrote: > > > > Hi, please see these commits that I've staged in linux-next via: > > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/log/?h=for-ne

Re: [dm-devel] dm: fix iterate_device sanity check

2021-02-08 Thread Mike Snitzer
On Mon, Feb 08 2021 at 10:17am -0500, Mike Snitzer wrote: > On Fri, Feb 05 2021 at 9:03pm -0500, > JeffleXu wrote: > > > > > > > On 2/6/21 2:39 AM, Mike Snitzer wrote: > > > On Mon, Feb 01 2021 at 10:35pm -0500, > > > Jeffle Xu wro

Re: [dm-devel] dm: fix iterate_device sanity check

2021-02-08 Thread Mike Snitzer
On Fri, Feb 05 2021 at 9:03pm -0500, JeffleXu wrote: > > > On 2/6/21 2:39 AM, Mike Snitzer wrote: > > On Mon, Feb 01 2021 at 10:35pm -0500, > > Jeffle Xu wrote: > > > >> According to the definition of dm_iterate_devices_fn: > >> * This functio

Re: [dm-devel] dm: fix iterate_device sanity check

2021-02-05 Thread Mike Snitzer
On Mon, Feb 01 2021 at 10:35pm -0500, Jeffle Xu wrote: > According to the definition of dm_iterate_devices_fn: > * This function must iterate through each section of device used by the > * target until it encounters a non-zero return code, which it then returns. > * Returns zero if no callout

Re: [dm-devel] [PATCH v4 2/6] block: add blk_interposer

2021-02-03 Thread Mike Snitzer
On Wed, Feb 03 2021 at 10:53am -0500, Sergei Shtepa wrote: > blk_interposer allows to intercept bio requests, remap bio to another devices > or add new bios. > > Signed-off-by: Sergei Shtepa > --- > block/bio.c | 2 + > block/blk-core.c | 33 >

Re: [dm-devel] [PATCH v4 3/6] block: add blk_mq_is_queue_frozen()

2021-02-03 Thread Mike Snitzer
On Wed, Feb 03 2021 at 10:53am -0500, Sergei Shtepa wrote: > blk_mq_is_queue_frozen() allow to assert that the queue is frozen. > > Signed-off-by: Sergei Shtepa > --- > block/blk-mq.c | 13 + > include/linux/blk-mq.h | 1 + > 2 files changed, 14 insertions(+) > > diff

Re: [dm-devel] [PATCH 1/2] dm crypt: replaced #if defined with IS_ENABLED

2021-02-02 Thread Mike Snitzer
On Fri, Jan 22 2021 at 3:43am -0500, Ahmad Fatoum wrote: > IS_ENABLED(CONFIG_ENCRYPTED_KEYS) is true whether the option is built-in > or a module, so use it instead of #if defined checking for each > separately. > > The other #if was to avoid a static function defined, but unused > warning. As

Re: [dm-devel] [PATCH 0/2] block: blk_interposer v3

2021-02-01 Thread Mike Snitzer
On Mon, Feb 01 2021 at 1:18pm -0500, Sergei Shtepa wrote: > The 02/01/2021 18:45, Bart Van Assche wrote: > > On 1/28/21 9:12 AM, Sergei Shtepa wrote: > > > I`m ready to suggest the blk_interposer again. > > > blk_interposer allows to intercept bio requests, remap bio to > > > another devices or

Re: [dm-devel] [PATCH v2 0/6] dm: support IO polling for bio-based dm device

2021-01-31 Thread Mike Snitzer
On Wed, Jan 27 2021 at 10:06pm -0500, JeffleXu wrote: > > > On 1/28/21 1:19 AM, Mike Snitzer wrote: > > On Mon, Jan 25 2021 at 7:13am -0500, > > Jeffle Xu wrote: > > > >> Since currently we have no simple but efficient way to implement the > >> b

Re: [dm-devel] [PATCH v2 3/6] block: add iopoll method to support bio-based IO polling

2021-01-27 Thread Mike Snitzer
mq_poll() implementation to blk_poll() and reduce > blk_mq_poll() to blk-mq specific code that is called from blk_poll(). > > Signed-off-by: Jeffle Xu > Suggested-by: Mike Snitzer Reviewed-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v2 5/6] block: add QUEUE_FLAG_POLL_CAP flag

2021-01-27 Thread Mike Snitzer
On Mon, Jan 25 2021 at 7:13am -0500, Jeffle Xu wrote: > Introduce QUEUE_FLAG_POLL_CAP flag representing if the request queue > capable of polling or not. > > Signed-off-by: Jeffle Xu Why are you adding QUEUE_FLAG_POLL_CAP? Doesn't seem as though DM or anything else actually needs it. Mike

Re: [dm-devel] [PATCH v2 2/6] block: add queue_to_disk() to get gendisk from request_queue

2021-01-27 Thread Mike Snitzer
a59c4e5db3 ("dm: stop using ->queuedata"). > > So if only request_queue is given, we need to get its corresponding > gendisk to get the private data stored in that gendisk. > > Signed-off-by: Jeffle Xu > Review-by: Mike Snitzer ^typo Reviewed-by: Mike Snitzer

Re: [dm-devel] [PATCH v2 0/6] dm: support IO polling for bio-based dm device

2021-01-27 Thread Mike Snitzer
when > reloading the mapping table. > > > changes since v1: > - patch 1,2,4 is the same as v1 and have already been reviewed > - patch 3 is refactored a bit on the basis of suggestions from > Mike Snitzer. > - patch 5 is newly added and introduces one new queue flag > re

[dm-devel] [git pull] device mapper fixes for 5.11-rc5

2021-01-22 Thread Mike Snitzer
Hi Linus, The following changes since commit 19c329f6808995b142b3966301f217c831e7cf31: Linux 5.11-rc4 (2021-01-17 16:37:05 -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.11/dm-fixes-2 for you to fetch

Re: [dm-devel] [PATCH 5/5] crypto: remove Salsa20 stream cipher algorithm

2021-01-21 Thread Mike Snitzer
example "chacha20" > > > + or "ctr(aes)"). > > > > You should check with the dm-integrity maintainers how likely it is that > > people > > are using salsa20 with dm-integrity. It's possible that people are using > > it, > > espec

Re: [dm-devel] [PATCH v2] dm: avoid filesystem lookup in dm_get_dev_t()

2021-01-21 Thread Mike Snitzer
On Thu, Jan 21 2021 at 12:53pm -0500, Christoph Hellwig wrote: > Looks good, > > Reviewed-by: Christoph Hellwig > > Mike, Jens - can we make sure this goes in before branching off the > block branch for 5.12? I have some work pending that would otherwise > conflict. Sure, I'll do my part to

Re: [dm-devel] dm: avoid filesystem lookup in dm_get_dev_t()

2021-01-21 Thread Mike Snitzer
On Thu, Jan 21 2021 at 10:02am -0500, Martin Wilck wrote: > On Thu, 2020-12-10 at 18:11 +0100, Martin Wilck wrote: > > On Thu, 2020-12-10 at 10:24 +0100, Hannes Reinecke wrote: > > > dm_get_dev_t() is just used to convert an arbitrary 'path' string > > > into a dev_t. It doesn't presume that the

Re: [dm-devel] [RFC PATCH 00/37] block: introduce bio_init_fields()

2021-01-19 Thread Mike Snitzer
field to set would create a cascade of churn throughout kernel (and invariably many callers won't need the new field initialized, so you keep passing 0 for more and more fields). Nacked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

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

2021-01-15 Thread Mike Snitzer
crypto request completion in softirq dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq dm crypt: do not call bio_endio() from the dm-crypt tasklet dm crypt: defer decryption to a tasklet if interrupts disabled Mike Snitzer (2): dm raid: fix discard limits

Re: [dm-devel] [PATCH v3 5/6] dm: Verify inline encryption capabilities of new table when it is loaded

2021-01-14 Thread Mike Snitzer
On Tue, Dec 29 2020 at 3:55am -0500, Satya Tangirala wrote: > DM only allows the table to be swapped if the new table's inline encryption > capabilities are a superset of the old table's. We only check that this > constraint is true when the table is actually swapped in (in > dm_swap_table()).

Re: [dm-devel] [PATCH v3 3/6] dm: add support for passing through inline crypto support

2021-01-14 Thread Mike Snitzer
On Tue, Dec 29 2020 at 3:55am -0500, Satya Tangirala wrote: > Update the device-mapper core to support exposing the inline crypto > support of the underlying device(s) through the device-mapper device. > > This works by creating a "passthrough keyslot manager" for the dm > device, which

Re: [dm-devel] [PATCH v3 2/6] block: keyslot-manager: Introduce functions for device mapper support

2021-01-14 Thread Mike Snitzer
On Tue, Dec 29 2020 at 3:55am -0500, Satya Tangirala wrote: > Introduce blk_ksm_update_capabilities() to update the capabilities of > a keyslot manager (ksm) in-place. The pointer to a ksm in a device's > request queue may not be easily replaced, because upper layers like > the filesystem might

Re: [dm-devel] [PATCH RFC 6/7] block: track cookies of split bios for bio-based device

2021-01-14 Thread Mike Snitzer
On Thu, Jan 14 2021 at 4:16am -0500, JeffleXu wrote: > > > On 1/13/21 12:13 AM, Mike Snitzer wrote: > > On Tue, Jan 12 2021 at 12:46am -0500, > > JeffleXu wrote: > > > >> > >> > >> On 1/9/21 1:26 AM, Mike Snitzer wrote: > >&g

Re: [dm-devel] dm-integrity: fix the maximum number of arguments

2021-01-12 Thread Mike Snitzer
On Tue, Jan 12 2021 at 2:54pm -0500, Mikulas Patocka wrote: > Advance the maximum number of arguments to 15. > > Signed-off-by: Mikulas Patocka > Cc: sta...@vger.kernel.org# v4.19+ > > --- > drivers/md/dm-integrity.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index:

Re: [dm-devel] [PATCH RFC 6/7] block: track cookies of split bios for bio-based device

2021-01-12 Thread Mike Snitzer
On Tue, Jan 12 2021 at 12:46am -0500, JeffleXu wrote: > > > On 1/9/21 1:26 AM, Mike Snitzer wrote: > > On Thu, Jan 07 2021 at 10:08pm -0500, > > JeffleXu wrote: > > > >> Thanks for reviewing. > >> > >> > >> On 1/8/21 6:18 AM,

Re: [dm-devel] dm-integrity: Fix flush with external metadata device

2021-01-08 Thread Mike Snitzer
On Fri, Jan 08 2021 at 11:12am -0500, Mikulas Patocka wrote: > > > On Mon, 4 Jan 2021, Mike Snitzer wrote: > > > On Sun, Dec 20 2020 at 8:02am -0500, > > Lukas Straub wrote: > > > > > With an external metadata device, flush requests aren

Re: [dm-devel] [PATCH RFC 3/7] block: add iopoll method for non-mq device

2021-01-08 Thread Mike Snitzer
On Thu, Jan 07 2021 at 10:24pm -0500, JeffleXu wrote: > > > On 1/8/21 5:47 AM, Mike Snitzer wrote: > > On Wed, Dec 23 2020 at 6:26am -0500, > > Jeffle Xu wrote: > > > >> ->poll_fn is introduced in commit ea435e1b9392 ("block: add a p

Re: [dm-devel] [PATCH RFC 6/7] block: track cookies of split bios for bio-based device

2021-01-08 Thread Mike Snitzer
On Thu, Jan 07 2021 at 10:08pm -0500, JeffleXu wrote: > Thanks for reviewing. > > > On 1/8/21 6:18 AM, Mike Snitzer wrote: > > On Wed, Dec 23 2020 at 6:26am -0500, > > Jeffle Xu wrote: > > > >> This is actuaaly the core when supporting iopoll

Re: [dm-devel] [PATCH RFC 6/7] block: track cookies of split bios for bio-based device

2021-01-07 Thread Mike Snitzer
On Wed, Dec 23 2020 at 6:26am -0500, Jeffle Xu wrote: > This is actuaaly the core when supporting iopoll for bio-based device. > > A list is maintained in the top bio (the original bio submitted to dm > device), which is used to maintain all valid cookies of split bios. The > IO polling

Re: [dm-devel] [PATCH RFC 5/7] dm: always return BLK_QC_T_NONE for bio-based device

2021-01-07 Thread Mike Snitzer
> Signed-off-by: Jeffle Xu Reviewed-by: Mike Snitzer > --- > drivers/md/dm.c | 26 ++ > 1 file changed, 10 insertions(+), 16 deletions(-) > > diff --git a/drivers/md/dm.c b/drivers/md/dm.c > index 5b2f371ec4bb..03c2b867acaa 100644 > --- a/dri

Re: [dm-devel] [PATCH RFC 4/7] block: define blk_qc_t as uintptr_t

2021-01-07 Thread Mike Snitzer
On Wed, Dec 23 2020 at 6:26am -0500, Jeffle Xu wrote: > To support iopoll for bio-based device, the returned cookie is actually > a pointer to an implementation specific object, e.g. an object > maintaining all split bios. > > In such case, blk_qc_t should be large enough to contain one

Re: [dm-devel] [PATCH RFC 3/7] block: add iopoll method for non-mq device

2021-01-07 Thread Mike Snitzer
On Wed, Dec 23 2020 at 6:26am -0500, Jeffle Xu wrote: > ->poll_fn is introduced in commit ea435e1b9392 ("block: add a poll_fn > callback to struct request_queue") for supporting non-mq queues such as > nvme multipath, but removed in commit 529262d56dbe ("block: remove > ->poll_fn"). > > To add

Re: [dm-devel] [PATCH RFC 2/7] block: add helper function fetching gendisk from queue

2021-01-07 Thread Mike Snitzer
st_queue is given, we need to get its corresponding gendisk to get the private data stored in that gendisk. Signed-off-by: Jeffle Xu Review-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH RFC 1/7] block: move definition of blk_qc_t to types.h

2021-01-07 Thread Mike Snitzer
4 blkcnt_t; > > +/* cookie used for IO polling */ > +typedef unsigned int blk_qc_t; > + > /* > * The type of an index into the pagecache. > */ > -- > 2.27.0 > Unfortunate that you cannot just include blk_types.h in fs.h; but vma_is_dax() ruins that for us sinc

Re: [dm-devel] dm-integrity: Fix flush with external metadata device

2021-01-04 Thread Mike Snitzer
On Sun, Dec 20 2020 at 8:02am -0500, Lukas Straub wrote: > With an external metadata device, flush requests aren't passed down > to the data device. > > Fix this by issuing flush in the right places: In integrity_commit > when not in journal mode, in do_journal_write after writing the >

Re: [dm-devel] dm snap : add sanity checks to snapshot_ctr

2021-01-04 Thread Mike Snitzer
On Fri, Dec 25 2020 at 1:48am -0500, Defang Bo wrote: > Similar to commit<70de2cbd>,there should be a check for argc and argv to > prevent Null pointer dereferencing > when the dm_get_device invoked twice on the same device path with differnt > mode. > > Signed-off-by: Defang Bo > --- >

Re: [dm-devel] dm-raid: set discard_granularity non-zero if possible

2021-01-04 Thread Mike Snitzer
On Wed, Dec 16 2020 at 2:53pm -0500, Stephan Bärwolf wrote: > Hi > > I hope this address is the right place for this patch. > It is supposed to fix the triggering of block/blklib.c:51 WARN_ON_ONCE(..) > when using LVM2 raid1 with SSD-PVs. > Since commit

Re: [dm-devel] [PATCH 0/4] Fix order when split bio and send remaining back to itself

2020-12-30 Thread Mike Snitzer
en we want to > split bio and send remaining back to itself. Ordering aside, you cannot split more than once. So your proposed fix to insert at head isn't valid because you're still implicitly allocating more than one bio from the bioset which could cause deadlock in a low memory situation.

[dm-devel] [git pull] device mapper fix for 5.11-rc2

2020-12-28 Thread Mike Snitzer
SFS change that broke reencryption (and all other functionality that requires reloading a dm-crypt DM table). ---- Mike Snitzer (1): Revert "dm crypt: export sysfs of kcryptd workqueue" drivers/md/dm-crypt.c | 7 +++---

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

2020-12-22 Thread Mike Snitzer
signature verification with 2nd keyring Mike Christie (1): dm mpath: add IO affinity path selector Mike Snitzer (1): dm: rename multipath path selector source files to have "dm-ps" prefix Qinglang Miao (1): dm ioctl: fix error return code in target_message Rikard Falkeb

[dm-devel] DM's filesystem lookup in dm_get_dev_t() [was: Re: linux-next: manual merge of the device-mapper tree with Linus' tree]

2020-12-22 Thread Mike Snitzer
[added linux-block and dm-devel, if someone replies to this email to continue "proper discussion" _please_ at least drop sfr and linux-next from Cc] On Tue, Dec 22 2020 at 8:15am -0500, Christoph Hellwig wrote: > Mike, Hannes, > > I think this patch is rather harmful. Why does device mapper

Re: [dm-devel] [PATCH v1 0/5] dm: dm-user: New target that proxies BIOs to userspace

2020-12-22 Thread Mike Snitzer
On Tue, Dec 22 2020 at 8:32am -0500, Christoph Hellwig wrote: > On Mon, Dec 14, 2020 at 07:00:57PM -0800, Palmer Dabbelt wrote: > > I haven't gotten a whole lot of feedback, so I'm inclined to at least have > > some > > reasonable performance numbers before bothering with a v2. > > FYI, my

[dm-devel] [git pull] 2 reverts for 5.11 to fix v5.10 MD regression

2020-12-14 Thread Mike Snitzer
just makes sure mainline does so too. ---- Mike Snitzer (2): Revert "md: change mddev 'chunk_sectors' from int to unsigned" Revert "dm raid: fix discard limits for raid1 and raid10" drivers/md/dm-raid.c

Re: [dm-devel] Linux 5.10

2020-12-14 Thread Mike Snitzer
On Mon, Dec 14 2020 at 11:02am -0500, Mike Snitzer wrote: > On Mon, Dec 14 2020 at 12:52am -0500, > Greg KH wrote: > > > On Mon, Dec 14, 2020 at 12:31:47AM -0500, Dave Jones wrote: > > > On Sun, Dec 13, 2020 at 03:03:29PM -0800, Linus Torvalds wrote: > > >

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