Re: [PATCH 2/5] block: add function to issue compare and write

Christoph Hellwig
2014-10-18T15:16:43Z

On Fri, Oct 17, 2014 at 07:38:37PM -0400, Martin K. Petersen wrote:
> The problem with this is that, as it stands, a bio has no type. And it
> would suck if we couldn't keep bio rw and request flags in sync.
>
> I wonder if it would make more sense to move the remaining rq types to
> cmd_flags after I'm done with the 64-bit conversion?

I'd prefer adding a cmd_type to the bio as well and avoid the 64-bit
flag conversion. While we'll probably grow more types of I/Os (e.g.
copy offload) I hope we can actually reduce the number of real flags,
and it's easier to read for sure if we can switch on the command type
in the driver.