Re: [dm-devel] dm: use gcd() to fix chunk_sectors limit stacking

2020-12-01 Thread Mike Snitzer
On Wed, Dec 02 2020 at 12:03am -0500, Mike Snitzer wrote: > What you've done here is fairly chaotic/disruptive: > 1) you emailed a patch out that isn't needed or ideal, I dealt already >staged a DM fix in linux-next for 5.10-rcX, see: > >

Re: [dm-devel] dm: use gcd() to fix chunk_sectors limit stacking

2020-12-01 Thread Mike Snitzer
What you've done here is fairly chaotic/disruptive: 1) you emailed a patch out that isn't needed or ideal, I dealt already staged a DM fix in linux-next for 5.10-rcX, see:

Re: [dm-devel] [PATCH v2] block: use gcd() to fix chunk_sectors limit stacking

2020-12-01 Thread Martin K. Petersen
Mike, > And since commit 07d098e6bbad ("block: allow 'chunk_sectors' to be > non-power-of-2") care must be taken to properly stack chunk_sectors to > be compatible with the possibility that a non-power-of-2 chunk_sectors > may be stacked. This is why gcd() is used instead of reverting back > to

Re: [dm-devel] [PATCH v2] block: use gcd() to fix chunk_sectors limit stacking

2020-12-01 Thread Jens Axboe
On 12/1/20 9:07 AM, Mike Snitzer wrote: > commit 22ada802ede8 ("block: use lcm_not_zero() when stacking > chunk_sectors") broke chunk_sectors limit stacking. chunk_sectors must > reflect the most limited of all devices in the IO stack. > > Otherwise malformed IO may result. E.g.: prior to this

Re: [dm-devel] [PATCH v2] block: use gcd() to fix chunk_sectors limit stacking

2020-12-01 Thread John Dorminy
On Tue, Dec 1, 2020 at 11:07 AM Mike Snitzer wrote: > > commit 22ada802ede8 ("block: use lcm_not_zero() when stacking > chunk_sectors") broke chunk_sectors limit stacking. chunk_sectors must > reflect the most limited of all devices in the IO stack. > > Otherwise malformed IO may result. E.g.:

[dm-devel] [PATCH 5/9] block: use ->bi_bdev for bio based I/O accounting

2020-12-01 Thread Christoph Hellwig
Rework the I/O accounting for bio based drivers to use ->bi_bdev. This means all drivers can now simply use bio_start_io_acct to start accounting, and it will take partitions into account automatically. To end I/O account either bio_end_io_acct can be used if the driver never remaps I/O to a

[dm-devel] [PATCH 7/9] block: add a disk_uevent helper

2020-12-01 Thread Christoph Hellwig
Add a helper to call kobject_uevent for the disk and all partitions, and unexport the disk_part_iter_* helpers that are now only used in the core block code. Signed-off-by: Christoph Hellwig --- block/genhd.c | 27 ++- drivers/s390/block/dasd.c | 26

[dm-devel] [PATCH 8/9] block: remove DISK_PITER_REVERSE

2020-12-01 Thread Christoph Hellwig
There is good reason to iterate backwards when deleting all partitions in del_gendisk, just like we don't in blk_drop_partitions. Signed-off-by: Christoph Hellwig --- block/genhd.c | 34 -- include/linux/genhd.h | 1 - 2 files changed, 4 insertions(+),

[dm-devel] [PATCH 1/9] brd: remove the end of device check in brd_do_bvec

2020-12-01 Thread Christoph Hellwig
The block layer already checks for this conditions in bio_check_eod before calling the driver. Signed-off-by: Christoph Hellwig --- drivers/block/brd.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/block/brd.c b/drivers/block/brd.c index

[dm-devel] [PATCH 2/9] dcssblk: remove the end of device check in brd_do_bvec

2020-12-01 Thread Christoph Hellwig
The block layer already checks for this conditions in bio_check_eod before calling the driver. Signed-off-by: Christoph Hellwig --- drivers/s390/block/dcssblk.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index

[dm-devel] [PATCH 6/9] blk-mq: use ->bi_bdev for I/O accounting

2020-12-01 Thread Christoph Hellwig
Remove the reverse map from a sector to a partition for I/O accounting by simply using ->bi_bdev. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 6 +- block/blk.h | 2 -- block/genhd.c| 48 3 files changed, 5

[dm-devel] [PATCH 9/9] block: use an xarray for disk->part_tbl

2020-12-01 Thread Christoph Hellwig
Now that no fast path lookups in the partition table are left, there is no point in micro-optimizing the data structure for it. Just use a bog standard xarray. Signed-off-by: Christoph Hellwig --- block/blk-settings.c| 2 +- block/blk.h | 1 - block/genhd.c | 156

[dm-devel] store a pointer to the block_device in struct bio (again)

2020-12-01 Thread Christoph Hellwig
Hi Jens, this series switches back from storing the gendisk + partno to storing a block_device pointer in struct bio. The reason is two fold: for one the new struct block_device actually is always available, removing the need to avoid originally. Second the merge struct block_device is much

[dm-devel] [PATCH 4/9] block: simplify submit_bio_checks a bit

2020-12-01 Thread Christoph Hellwig
Merge a few checks for whole devices vs partitions to streamline the sanity checks. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index

[dm-devel] [PATCH 3/9] block: store a block_device pointer in struct bio

2020-12-01 Thread Christoph Hellwig
Replace the gendisk pointer in struct bio with a pointer to the newly improved struct block device. From that the gendisk can be trivially accessed with an extra indirection, but it also allows to directly look up all information related to partition remapping. Signed-off-by: Christoph Hellwig

[dm-devel] [PATCH v2] block: use gcd() to fix chunk_sectors limit stacking

2020-12-01 Thread Mike Snitzer
commit 22ada802ede8 ("block: use lcm_not_zero() when stacking chunk_sectors") broke chunk_sectors limit stacking. chunk_sectors must reflect the most limited of all devices in the IO stack. Otherwise malformed IO may result. E.g.: prior to this fix, ->chunk_sectors = lcm_not_zero(8, 128) would

Re: [dm-devel] dm: Devices not having .iterate_devices may want to set max_io_len

2020-12-01 Thread Kirill Tkhai
On 30.11.2020 20:30, Mike Snitzer wrote: > On Wed, Nov 25 2020 at 3:49pm -0500, > Kirill Tkhai wrote: > >> After commit 5091cdec56fa "dm: change max_io_len() to use >> blk_max_size_offset()" my out-of-tree driver stopped to work. >> The reason is that now ti->max_io_len from such target is

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

2020-12-01 Thread Damien Le Moal
+ Mike and DM list On 2020/12/01 16:12, 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 >

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

2020-12-01 Thread Gustavo A. R. Silva
On Tue, Dec 01, 2020 at 12:52:27AM -0500, Martin K. Petersen wrote: > > Gustavo, > > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > Applied 20-22,54,120-124 to 5.11/scsi-staging, thanks. Awesome! :) Thanks,

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

2020-12-01 Thread Martin K. Petersen
Gustavo, > This series aims to fix almost all remaining fall-through warnings in > order to enable -Wimplicit-fallthrough for Clang. Applied 20-22,54,120-124 to 5.11/scsi-staging, thanks. -- Martin K. Petersen Oracle Linux Engineering -- dm-devel mailing list dm-devel@redhat.com

[dm-devel] [PATCH] dm crypt: export sysfs of kcryptd workqueue

2020-12-01 Thread Jeffle Xu
It should be helpful to export sysfs of "kcryptd" workqueue in some cases, such as setting specific CPU affinity of the workqueue. Besides, also tweak the name format a little. The slash inside a directory name will be translate into exclamation mark, such as