Re: [PATCH 0/2] Fix blkdev_issue_discard()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 15, 2015 at 06:10:54PM +0100, Bart Van Assche wrote:
> Maybe I should explain why I started looking into this. If LIO exports a 
> block device for which the discard_zeroes_data flag has been set then it 
> would be possible for LIO to set the LBPRZ bit in the READ CAPACITY(16) 
> response (something it does not yet do today).

This sounds like a useful goal.

> If the granularity of 
> discard requests of the block device is larger than the block size of the 
> SCSI device, which layer should then handle the start and end blocks of the 
> SCSI UNMAP command if the start and/or end are not aligned on a discard 
> boundary ? Should the caller of blkdev_issue_discard() implement this or 
> should this functionality be added in blkdev_issue_discard() itself ?

There is two sides to it: interface and implementation.  To implement
UNMAP / WRITE SAME with LBPRZ you should use blkdev_issue_zeroout with
the discard flag set to true.  But as-is this will have the same
issue as blkdev_issue_discard as it will end up using
blkdev_issue_discard if the functionality is supported by the device.

I'm not sure how we could communicate the split size up the stack,
so I fear the answer might be that blk_bio_discard_split might
have to create additional WRITE (ZERO) bios if it hits an alignment
mismatch.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux