block: better op and flags encoding
Now that we don't need the common flags to overflow outside the range of a 32-bit type we can encode them the same way for both the bio and request fields. This in addition allows us to place the operation first (and make some room for more ops while we're at it) and to stop having to shift around the operation values. In addition this allows passing around only one value in the block layer instead of two (and eventuall also in the file systems, but we can do that later) and thus clean up a lot of code. Last but not least this allows decreasing the size of the cmd_flags field in struct request to 32-bits. Various functions passing this value could also be updated, but I'd like to avoid the churn for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
e806402130
commit
ef295ecf09
@@ -58,7 +58,7 @@ struct dm_io_notify {
|
||||
struct dm_io_client;
|
||||
struct dm_io_request {
|
||||
int bi_op; /* REQ_OP */
|
||||
int bi_op_flags; /* rq_flag_bits */
|
||||
int bi_op_flags; /* req_flag_bits */
|
||||
struct dm_io_memory mem; /* Memory to use for io */
|
||||
struct dm_io_notify notify; /* Synchronous if notify.fn is NULL */
|
||||
struct dm_io_client *client; /* Client memory handler */
|
||||
|
Reference in New Issue
Block a user