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

2020-12-02 Thread Dan Carpenter
On Sun, Nov 22, 2020 at 08:17:03AM -0800, Kees Cook wrote: > On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > > On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > > > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > > > On Fri, 20 Nov 2020 12:21:39 -0600 Gusta

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

2020-12-02 Thread Dan Carpenter
On Mon, Nov 23, 2020 at 05:32:51PM -0800, Nick Desaulniers wrote: > On Sun, Nov 22, 2020 at 8:17 AM Kees Cook wrote: > > > > On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > > > If none of the 140 patches here fix a real bug, and there is no change > > > to machine code then it so

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

2020-12-02 Thread JeffleXu
On 12/2/20 1:03 PM, 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: > > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux

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

2020-12-02 Thread JeffleXu
Actually in terms of this issue, I think the dilemma here is that, @chunk_sectors of dm device is mainly from two source. One is that from the underlying devices, which is calculated into one composed one in blk_stack_limits(). > commit 22ada802ede8 ("block: use lcm_not_zero() when stacking > chu

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

2020-12-02 Thread JeffleXu
On 12/2/20 2:31 PM, JeffleXu wrote: > > > On 12/2/20 1:14 PM, Mike Snitzer wrote: >> 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

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

2020-12-02 Thread JeffleXu
On 12/2/20 1:14 PM, Mike Snitzer wrote: > 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-02 Thread JeffleXu
On 12/2/20 1:03 PM, 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: > > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-

Re: [dm-devel] [PATCH v3 0/4] crypto: switch to crypto API for EBOIV generation

2020-12-02 Thread Gilad Ben-Yossef
Hi, On Thu, Oct 29, 2020 at 12:05 PM Gilad Ben-Yossef wrote: > > > This series creates an EBOIV template that produces a skcipher > transform which passes through all operations to the skcipher, while > using the same skcipher and key to encrypt the input IV, which is > assumed to be a sector off

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

2020-12-02 Thread javier.g...@samsung.com
On 01.12.2020 11:22, Damien Le Moal wrote: + 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/NV

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

2020-12-02 Thread Jeffle Xu
As it said in commit 7e7986f9d3ba ("block: use gcd() to fix chunk_sectors limit stacking"), chunk_sectors should reflect the most limited of all devices in the IO stack. The previous commit only fixes block/blk-settings.c:blk_stack_limits(), while leaving dm.c:dm_calculate_queue_limits() unfixed.

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

2020-12-02 Thread Jeffle Xu
As it said in commit 7e7986f9d3ba ("block: use gcd() to fix chunk_sectors limit stacking"), chunk_sectors should reflect the most limited of all devices in the IO stack. The previous commit only fixes block/blk-settings.c:blk_stack_limits(), while leaving dm.c:dm_calculate_queue_limits() unfixed.

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

2020-12-02 Thread JeffleXu
Hi Mike, What about this patch? On 11/30/20 7:33 PM, Jeffle Xu wrote: > 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

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

2020-12-02 Thread Mike Snitzer
On Wed, Dec 02 2020 at 2:10am -0500, JeffleXu wrote: > > > On 12/2/20 1:03 PM, 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 crypt: export sysfs of kcryptd workqueue

2020-12-02 Thread Mike Snitzer
On Tue, Dec 01 2020 at 11:04pm -0500, JeffleXu wrote: > Hi Mike, > > What about this patch? > > On 11/30/20 7:33 PM, Jeffle Xu wrote: > > It should be helpful to export sysfs of "kcryptd" workqueue in some > > cases, such as setting specific CPU affinity of the workqueue. > > > > Besides, also

Re: [dm-devel] [PATCH v2 1/5] multipath: fix issues found by compiling with gcc 10

2020-12-02 Thread Martin Wilck
Hi Ben, On Wed, 2020-02-19 at 14:21 -0600, Benjamin Marzinski wrote: > Signed-off-by: Benjamin Marzinski > --- > kpartx/dasd.c| 6 +++--- > libmultipath/print.c | 16 > multipath/main.c | 2 +- > 3 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/

Re: [dm-devel] [PATCH 25/45] block: simplify bdev/disk lookup in blkdev_get

2020-12-02 Thread Tejun Heo
On Sat, Nov 28, 2020 at 05:14:50PM +0100, Christoph Hellwig wrote: > To simplify block device lookup and a few other upcoming areas, make sure > that we always have a struct block_device available for each disk and > each partition, and only find existing block devices in bdget. The only > downsid

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:15PM +0100, Christoph Hellwig wrote: > 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 th

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

2020-12-02 Thread Tejun Heo
On Wed, Dec 02, 2020 at 05:35:21PM -0500, Tejun Heo wrote: > On Tue, Dec 01, 2020 at 05:54:15PM +0100, Christoph Hellwig wrote: > > 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 >

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:16PM +0100, Christoph Hellwig wrote: > The block layer already checks for this conditions in bio_check_eod > before calling the driver. > > Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Thanks. -- tejun -- dm-devel mailing list dm-devel@redhat.com https:

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:17PM +0100, Christoph Hellwig wrote: > The block layer already checks for this conditions in bio_check_eod > before calling the driver. > > Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Thanks. -- tejun -- dm-devel mailing list dm-devel@redhat.com https:

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:18PM +0100, Christoph Hellwig wrote: > 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 infor

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:19PM +0100, Christoph Hellwig wrote: > Merge a few checks for whole devices vs partitions to streamline the > sanity checks. > > Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo -- tejun -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mai

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:20PM +0100, Christoph Hellwig wrote: > 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

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:21PM +0100, Christoph Hellwig wrote: > Remove the reverse map from a sector to a partition for I/O accounting by > simply using ->bi_bdev. > > Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo -- tejun -- dm-devel mailing list dm-devel@redhat.com https://www.

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:22PM +0100, Christoph Hellwig wrote: > 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 Acked-by: Tejun Heo Thanks

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:23PM +0100, Christoph Hellwig wrote: > 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 Yeah, I was blindly keeping the iteration order. Can't fin

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

2020-12-02 Thread Tejun Heo
On Tue, Dec 01, 2020 at 05:54:24PM +0100, Christoph Hellwig wrote: > 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 Acked-by: Tejun Heo Tha

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

2020-12-02 Thread Ming Lei
On Tue, Dec 01, 2020 at 11:07:09AM -0500, 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

Re: [dm-devel] [PATCH 1/4] block: add a hard-readonly flag to struct gendisk

2020-12-02 Thread Martin K. Petersen
Hi Christoph! > - If BLKROSET is used to set a whole-disk device read-only, any >partitions will end up in a read-only state until the user >explicitly clears the flag. This no longer appears to be the case with your tweak. It's very common for database folks to twiddle the read-only

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

2020-12-02 Thread Ming Lei
On Tue, Dec 01, 2020 at 05:54:18PM +0100, Christoph Hellwig wrote: > 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 infor

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

2020-12-02 Thread Ming Lei
On Thu, Dec 03, 2020 at 02:40:04PM +0800, Ming Lei wrote: > On Tue, Dec 01, 2020 at 05:54:18PM +0100, Christoph Hellwig wrote: > > 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 ext