Re: [dm-devel] [PATCH] blk-settings: make sure that max_sectors is aligned on "logical_block_size" boundary. (fwd)

2021-02-22 Thread Ming Lei
On Mon, Feb 22, 2021 at 01:15:32PM -0500, Mikulas Patocka wrote: > > > -- Forwarded message -- > Date: Thu, 19 Nov 2020 15:36:51 -0500 (EST) > From: Mikulas Patocka > To: David Teigland , Jens Axboe > Cc: hei...@redhat.com, Zdenek Kabelac , > Marian Csontos , linux-bl...@vge

Re: [dm-devel] [PATCH] dm-verity: Fix FEC for RS roots non-aligned to block size

2021-02-22 Thread Jérôme Carretero
Tested-by: Jérôme Carretero I smoke-tested by fuzzing contiguous ranges of user data (not hash tree) and correction works up to the amount of added correction (since erasures are identified by hashes). Since the fix looks obvious, this should probably CC to stable? -- Jérôme pgpeTmeYAHNVm.p

[dm-devel] [PATCH] dm-verity: Fix FEC for RS roots non-aligned to block size

2021-02-22 Thread Milan Broz
Optional Forward Error Correction (FEC) code in dm-verity uses Reed-Solomon code and should support roots from 2 to 24. The error correction parity bytes (of roots lengths per RS block) are stored on a separate device in sequence without any padding. Currently, to access FEC device, the dm-verity

[dm-devel] [RFC PATCH] blk-core: remove blk_put_request()

2021-02-22 Thread Chaitanya Kulkarni
The function blk_put_request() is just a wrapper to blk_mq_free_request(), remove the unnecessary wrapper. Any feedback is welcome on this RFC. Signed-off-by: Chaitanya Kulkarni --- block/blk-core.c | 6 -- block/blk-merge.c | 2 +- block/bsg-lib.c

Re: [dm-devel] [PATCH v2 1/2] IMA: generalize key measurement tests

2021-02-22 Thread Tushar Sugandhi
Hi Petr, On 2020-12-21 3:05 p.m., Petr Vorel wrote: Hi Tushar, I'm very sorry about the delay. I'll finish this review in January, here just some quick thoughts (minor style nits, I'll fix it before merge). Generally LGTM, thanks for your work. Reviewed-by: Petr Vorel Thanks for your revi

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

2021-02-22 Thread pr-tracker-bot
The pull request you sent on Wed, 17 Feb 2021 20:53:37 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git > tags/for-5.12/dm-changes has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/325b764089c9bef2be45354db4f15e5b12ae406d Thank you! --

[dm-devel] [PATCH] blk-settings: make sure that max_sectors is aligned on "logical_block_size" boundary. (fwd)

2021-02-22 Thread Mikulas Patocka
-- Forwarded message -- Date: Thu, 19 Nov 2020 15:36:51 -0500 (EST) From: Mikulas Patocka To: David Teigland , Jens Axboe Cc: hei...@redhat.com, Zdenek Kabelac , Marian Csontos , linux-bl...@vger.kernel.org, dm-devel@redhat.com Subject: [PATCH] blk-settings: make sure t

Re: [dm-devel] [RFC PATCH v5 3/4] nvme: add simple copy support

2021-02-22 Thread Selva Jove
Matthew, Maximum Source Range Count (MSRC) is limited by u8. So the maximum number of source ranges is 256 (0 base value). The number of pages required to be sent to the device is at most 2. Since we are allocating the memory using kmalloc_array(), we would get a continuous physical segment. nvme_

Re: [dm-devel] [RFC PATCH v5 0/4] add simple copy support

2021-02-22 Thread Su Yue
On Fri 19 Feb 2021 at 20:45, SelvaKumar S wrote: This patchset tries to add support for TP4065a ("Simple Copy Command"), v2020.05.04 ("Ratified") The Specification can be found in following link. https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs-1.zip 404 not found

Re: [dm-devel] [RFC PATCH v5 0/4] add simple copy support

2021-02-22 Thread David Laight
From: SelvaKumar S > Sent: 19 February 2021 12:45 > > This patchset tries to add support for TP4065a ("Simple Copy Command"), > v2020.05.04 ("Ratified") > > The Specification can be found in following link. > https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs-1.zip > > Simple

[dm-devel] [PATCH v4 11/12] block: sub-fastpath for bio-based polling

2021-02-22 Thread Jeffle Xu
Offer one sub-fastpath for bio-based polling when bio submitted to dm device gets split and enqueued into multiple hw queues, while the IO submission process has not been migrated to another CPU. In this case, the IO submission routine will return the CPU number on which the IO submission happened

[dm-devel] [PATCH v4 12/12] dm: support IO polling for bio-based dm device

2021-02-22 Thread Jeffle Xu
IO polling is enabled when all underlying target devices are capable of IO polling. The sanity check supports the stacked device model, in which one dm device may be build upon another dm device. In this case, the mapped device will check if the underlying dm target device supports IO polling. Sig

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

2021-02-22 Thread Jeffle Xu
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 hw queue, as long as we could reapply for polling later. For Synchr

[dm-devel] [PATCH v4 07/12] blk-mq: add one helper function getting hw queue

2021-02-22 Thread Jeffle Xu
Add one helper function getting hw queue mapping to specific CPU, and of specific type. Signed-off-by: Jeffle Xu --- block/blk-mq.c | 10 ++ include/linux/blk-mq.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index b4de2b37b826..734aa13

[dm-devel] [PATCH v4 08/12] dm: always return BLK_QC_T_NONE for bio-based device

2021-02-22 Thread Jeffle Xu
Currently the returned cookie of bio-based device is not used at all. Cookie of bio-based device will be refactored in the following patch. Signed-off-by: Jeffle Xu Reviewed-by: Mike Snitzer --- drivers/md/dm.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-)

[dm-devel] [PATCH v4 06/12] blk-mq: add iterator for polling hw queues

2021-02-22 Thread Jeffle Xu
Add one helper function for iterating all hardware queues in polling mode. Signed-off-by: Jeffle Xu --- include/linux/blk-mq.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index cf1910c6d5ae..0c511555ec16 100644 --- a/include/linux/bl

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

2021-02-22 Thread Jeffle Xu
[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 as scalable as single polling process (~30%). Refer to the following [Performance] chapter for more details. [Intent

[dm-devel] [PATCH v4 01/12] block: move definition of blk_qc_t to types.h

2021-02-22 Thread Jeffle Xu
So that kiocb.ki_cookie can be defined as blk_qc_t, which will enforce the encapsulation. Signed-off-by: Jeffle Xu Reviewed-by: Christoph Hellwig Reviewed-by: Mike Snitzer --- include/linux/blk_types.h | 2 +- include/linux/fs.h| 2 +- include/linux/types.h | 3 +++ 3 files changed

Re: [dm-devel] [RFC PATCH v5 0/4] add simple copy support

2021-02-22 Thread Keith Busch
On Sat, Feb 20, 2021 at 06:01:56PM +, David Laight wrote: > From: SelvaKumar S > > Sent: 19 February 2021 12:45 > > > > This patchset tries to add support for TP4065a ("Simple Copy Command"), > > v2020.05.04 ("Ratified") > > > > The Specification can be found in following link. > > https://nv

[dm-devel] [PATCH v4 05/12] blk-mq: extract one helper function polling hw queue

2021-02-22 Thread Jeffle Xu
Extract the logic of polling one hw queue and related statistics handling out as the helper function. Signed-off-by: Jeffle Xu --- block/blk-mq.c | 5 + include/linux/blk-mq.h | 13 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/block/blk-mq.c b/block/

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

2021-02-22 Thread Jeffle Xu
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 all split bios or iterate through all polling hw queues. The pointer t

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

2021-02-22 Thread Jeffle Xu
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 example, dm device needs to check if all underlying devices are capa

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

2021-02-22 Thread Jeffle Xu
->poll_fn was introduced in commit ea435e1b9392 ("block: add a poll_fn callback to struct request_queue") to support bio-based queues such as nvme multipath, but was later removed in commit 529262d56dbe ("block: remove ->poll_fn"). Given commit c62b37d96b6e ("block: move ->make_request_fn to struc

[dm-devel] [PATCH v4 02/12] block: add queue_to_disk() to get gendisk from request_queue

2021-02-22 Thread Jeffle Xu
Sometimes we need to get the corresponding gendisk from request_queue. It is preferred that block drivers store private data in gendisk->private_data rather than request_queue->queuedata, e.g. see: commit c4a59c4e5db3 ("dm: stop using ->queuedata"). So if only request_queue is given, we need to g