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.
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
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
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
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
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
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
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