[dm-devel] [PATCH 4/4] block: Generically handle report zones buffer

2019-10-23 Thread Damien Le Moal
Instead of relying on a zoned block device driver to allocate a buffer for every execution of a report zones command execution, rely on the block layer use of the device zone report queue limits to allocate a buffer and keep it around when the device report_zones method is executed in a loop, e.g.

[dm-devel] [PATCH 1/4] block: Enhance blk_revalidate_disk_zones()

2019-10-23 Thread Damien Le Moal
For ZBC and ZAC zoned devices, the scsi driver revalidation processing implemented by sd_revalidate_disk() includes a call to sd_zbc_read_zones() which executes a full disk zone report used to check that all zones of the disk are the same size. This processing is followed by a call to blk_revalidat

[dm-devel] [PATCH 3/4] block: Introduce report zones queue limits

2019-10-23 Thread Damien Le Moal
In preparation for a generic report zones command buffer allocation to the block layer, introduce three new request queue limits describing the device zone descriptor size (zone_descriptor_size limit), the needed granularity of the report zones command buffer size (zones_report_granularity limit) a

[dm-devel] [PATCH 2/4] block: Simplify report zones execution

2019-10-23 Thread Damien Le Moal
All kernel users of blkdev_report_zones() as well as applications use through ioctl(BLKZONEREPORT) expect to potentially get less zone descriptors than requested. As such, the use of the internal report zones command execution loop implemented by blk_report_zones() is not necessary and can even be

[dm-devel] [PATCH 0/4] zoned block device report zones enhancements

2019-10-23 Thread Damien Le Moal
This series of patches improve the handling and execution of report zones operations for zoned block devices. The first patch enhances device revalidation by moving zone information checks from the low level driver into the block layer. The second patch remove some unnecessary code. The last two p

[dm-devel] [PATCH] dm-cache: replace spin_lock_irqsave with spin_lock_irq

2019-10-23 Thread Mikulas Patocka
If we are in a place where it is known that interrupts are enabled, functions spin_lock_irq/spin_unlock_irq should be used instead of spin_lock_irqsave/spin_unlock_irqrestore. spin_lock_irq and spin_unlock_irq are faster because the don't need to push and pop the flags register. Signed-off-by: Mi

[dm-devel] [PATCH] dm-bio-prison-v2: replace spin_lock_irqsave with spin_lock_irq

2019-10-23 Thread Mikulas Patocka
Replace spin_lock_irqsave/irqrestore with spin_lock_irq/spin_unlock_irq. Signed-off-by: Mikulas Patocka --- drivers/md/dm-bio-prison-v2.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) Index: linux-2.6/drivers/md/dm-bio-prison-v2.c

Re: [dm-devel] [PATCH 45/72] libmultipath: fix -Wsign-compare warnings with snprintf()

2019-10-23 Thread Martin Wilck
Hello Bart, On Tue, 2019-10-22 at 14:32 -0700, Bart Van Assche wrote: > I'd like to reiterate that introducing -Wsign-compare seems dubious > to me. While I disagree with this general statement, I now realized that my approach to use (int) casts in this specific patch was indeed wrong, because it