Re: [PATCH RFC 1/3] block: Add support for REQ_OP_ASSIGN_RANGE operation
From: Chaitanya Kulkarni
Date: Thu Dec 19 2019 - 17:04:06 EST
> 1)Introduce a new flag BLKDEV_ZERO_ALLOCATE for blkdev_issue_write_zeroes().
> 2)Introduce a new flag REQ_NOZERO in enum req_opf.
>
> Won't this confuse a reader that we have blkdev_issue_write_zeroes(),
> which does not write zeroes sometimes? Maybe we should rename
> blkdev_issue_write_zeroes() in some more generic name?
Yes it will be confusing, I can see that the code for
__blkdev_issue_write_zeroes() & __blkdev_issue_assign_range()
is very similar except op = REQ_OP_WRITE_ZEROES and
op = REQ_OP_ASSIGN_RANGE (and some minor details).
What we need is a prep patch which moves the payload less bio
code into the helper function which can accept op as an argument
based on that it will branch out and execute right code path.
If we decide to get this in then I'll be happy to create required
prep patch.
>
> Thanks,
> Kirill
>
>