]> git.baikalelectronics.ru Git - kernel.git/commit
block: better op and flags encoding
authorChristoph Hellwig <hch@lst.de>
Fri, 28 Oct 2016 14:48:16 +0000 (08:48 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 28 Oct 2016 14:48:16 +0000 (08:48 -0600)
commit43a94d680d3e5d5953c7dfbd5e77a103058ff83e
treee52e8be789b5654dfc43f626c50261f80615c03f
parentcb2bef0fb309c7cfc477abff1264bc06e2c177eb
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>
23 files changed:
Documentation/block/biodoc.txt
block/blk-core.c
block/blk-flush.c
block/blk-lib.c
block/blk-map.c
block/blk-mq.c
block/cfq-iosched.c
block/elevator.c
drivers/md/dm-crypt.c
drivers/scsi/sd.c
fs/btrfs/inode.c
fs/buffer.c
fs/f2fs/f2fs.h
fs/gfs2/lops.c
include/linux/blk-cgroup.h
include/linux/blk_types.h
include/linux/blkdev.h
include/linux/blktrace_api.h
include/linux/dm-io.h
include/linux/elevator.h
include/trace/events/bcache.h
include/trace/events/block.h
kernel/trace/blktrace.c