Thread (25 messages) 25 messages, 6 authors, 2019-06-26

Re: [PATCH 1/4] block: add zone open, close and finish support

From: Javier González <hidden>
Date: 2019-06-25 16:30:43
Also in: dm-devel, linux-scsi, lkml

On 25 Jun 2019, at 17.55, Bart Van Assche [off-list ref] wrote:

On 6/25/19 3:35 AM, Matias Bjørling wrote:
quoted
On 6/25/19 12:27 AM, Chaitanya Kulkarni wrote:
quoted
On 6/24/19 12:43 PM, Bart Van Assche wrote:
quoted
static inline bool op_is_write(unsigned int op)
{
    return (op & 1);
}
The zone mgmt commands are neither write nor reads commands. I guess, one could characterize them as write commands, but they don't write any data, they update a state of a zone on a drive. One should keep it as is? and make sure the zone mgmt commands don't get categorized as either read/write.
Since the open, close and finish operations support modifying zone data I propose to characterize these as write commands. How about the following additional changes:
- Make bio_check_ro() refuse open/close/flush/reset zone operations for read-only partitions (see also commit a32e236eb93e ("Partially revert "block: fail op_is_write() requests to read-only partitions"") # v4.18).
- In submit_bio(), change op_is_write(bio_op(bio)) ? "WRITE" : "READ" into something that uses blk_op_str().
- Add open/close/flush zone support be added in blk_partition_remap().

Thanks,

Bart.
Agreed. This is also what we do with REQ_OP_DISCARD and it makes things
easier in the driver.

Apart from the return comment from Damien and Minwoo, the patch looks good to me.

Reviewed-by: Javier González <redacted>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help