block: fold cmd_type into the REQ_OP_ space
authorChristoph Hellwig <hch@lst.de>
Tue, 31 Jan 2017 15:57:31 +0000 (16:57 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 31 Jan 2017 21:00:44 +0000 (14:00 -0700)
commitaebf526b53aea164508730427597d45f3e06b376
tree98ab726d0f7feb610feee9830246c900c6919eea
parent2f5a8e80f79dc82e00f4cca557dc9ceaf064b450
block: fold cmd_type into the REQ_OP_ space

Instead of keeping two levels of indirection for requests types, fold it
all into the operations.  The little caveat here is that previously
cmd_type only applied to struct request, while the request and bio op
fields were set to plain REQ_OP_READ/WRITE even for passthrough
operations.

Instead this patch adds new REQ_OP_* for SCSI passthrough and driver
private requests, althought it has to add two for each so that we
can communicate the data in/out nature of the request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
53 files changed:
block/bio.c
block/blk-core.c
block/blk-flush.c
block/blk-map.c
block/blk-mq-debugfs.c
block/bsg.c
block/scsi_ioctl.c
drivers/block/cciss.c
drivers/block/floppy.c
drivers/block/hd.c
drivers/block/mg_disk.c
drivers/block/nbd.c
drivers/block/null_blk.c
drivers/block/osdblk.c
drivers/block/paride/pd.c
drivers/block/pktcdvd.c
drivers/block/ps3disk.c
drivers/block/rbd.c
drivers/block/sx8.c
drivers/block/virtio_blk.c
drivers/block/xen-blkfront.c
drivers/block/xsysace.c
drivers/cdrom/cdrom.c
drivers/cdrom/gdrom.c
drivers/ide/ide-atapi.c
drivers/ide/ide-cd.c
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-devsets.c
drivers/ide/ide-disk.c
drivers/ide/ide-eh.c
drivers/ide/ide-floppy.c
drivers/ide/ide-io.c
drivers/ide/ide-ioctls.c
drivers/ide/ide-park.c
drivers/ide/ide-pm.c
drivers/ide/ide-tape.c
drivers/ide/ide-taskfile.c
drivers/mtd/mtd_blkdevs.c
drivers/mtd/ubi/block.c
drivers/nvme/host/core.c
drivers/nvme/host/rdma.c
drivers/scsi/osd/osd_initiator.c
drivers/scsi/osst.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/sg.c
drivers/scsi/sr.c
drivers/scsi/st.c
drivers/target/target_core_pscsi.c
fs/nfsd/blocklayout.c
include/linux/blk_types.h
include/linux/blkdev.h
include/linux/ide.h