Thread (2 messages) 2 messages, 2 authors, 2020-01-07

Re: [PATCH RFC 1/3] block: Add support for REQ_OP_ASSIGN_RANGE operation

From: "Martin K. Petersen" <martin.petersen@oracle.com>
Date: 2020-01-07 03:24:55
Also in: linux-ext4, lkml

Possibly related (same subject, not in this thread)

Kirill,

Sorry, the holiday break got in the way.
But I also worry about NOFALLBACK case. There are possible block
devices, which support write zeroes, but they can't allocate blocks
(block allocation are just not appliable for them, say, these are all
ordinary hdd).
Correct. We shouldn't go down this path unless a device is thinly
provisioned (i.e. max_discard_sectors > 0).
But won't it be a good thing to return EOPNOTSUPP right from
__blkdev_issue_write_zeroes() in case of block device can't allocate
blocks (q->limits.write_zeroes_can_allocate in the patch below)? Here
is just a way to underline block devices, which support write zeroes,
but allocation of blocks is meant nothing for them (wasting of time).
I don't like "write_zeroes_can_allocate" because that makes assumptions
about WRITE ZEROES being the command of choice. I suggest we call it
"max_allocate_sectors" to mirror "max_discard_sectors". I.e. put
emphasis on the semantic operation and not the plumbing.

-- 
Martin K. Petersen	Oracle Linux Engineering
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help