diff options
author | Christoph Hellwig <hch@lst.de> | 2010-08-07 12:17:56 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:17:56 -0400 |
commit | 33659ebbae262228eef4e0fe990f393d1f0ed941 (patch) | |
tree | fcb537f09359c8dad3a6f6e16dc4319562dc42cc /drivers/block/ub.c | |
parent | 7e005f79791dcd58436c88ded4a7f5aed1b82147 (diff) |
block: remove wrappers for request type/flags
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
struct requests. This allows much easier grepping for different request
types instead of unwinding through macros.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/ub.c')
-rw-r--r-- | drivers/block/ub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 0536b5b29adc..034b34440ffa 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -648,7 +648,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) | |||
648 | return 0; | 648 | return 0; |
649 | } | 649 | } |
650 | 650 | ||
651 | if (lun->changed && !blk_pc_request(rq)) { | 651 | if (lun->changed && rq->cmd_type != REQ_TYPE_BLOCK_PC) |
652 | blk_start_request(rq); | 652 | blk_start_request(rq); |
653 | ub_end_rq(rq, SAM_STAT_CHECK_CONDITION); | 653 | ub_end_rq(rq, SAM_STAT_CHECK_CONDITION); |
654 | return 0; | 654 | return 0; |
@@ -684,7 +684,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) | |||
684 | } | 684 | } |
685 | urq->nsg = n_elem; | 685 | urq->nsg = n_elem; |
686 | 686 | ||
687 | if (blk_pc_request(rq)) { | 687 | if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { |
688 | ub_cmd_build_packet(sc, lun, cmd, urq); | 688 | ub_cmd_build_packet(sc, lun, cmd, urq); |
689 | } else { | 689 | } else { |
690 | ub_cmd_build_block(sc, lun, cmd, urq); | 690 | ub_cmd_build_block(sc, lun, cmd, urq); |
@@ -781,7 +781,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) | |||
781 | rq = urq->rq; | 781 | rq = urq->rq; |
782 | 782 | ||
783 | if (cmd->error == 0) { | 783 | if (cmd->error == 0) { |
784 | if (blk_pc_request(rq)) { | 784 | if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { |
785 | if (cmd->act_len >= rq->resid_len) | 785 | if (cmd->act_len >= rq->resid_len) |
786 | rq->resid_len = 0; | 786 | rq->resid_len = 0; |
787 | else | 787 | else |
@@ -795,7 +795,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd) | |||
795 | } | 795 | } |
796 | } | 796 | } |
797 | } else { | 797 | } else { |
798 | if (blk_pc_request(rq)) { | 798 | if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { |
799 | /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */ | 799 | /* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */ |
800 | memcpy(rq->sense, sc->top_sense, UB_SENSE_SIZE); | 800 | memcpy(rq->sense, sc->top_sense, UB_SENSE_SIZE); |
801 | rq->sense_len = UB_SENSE_SIZE; | 801 | rq->sense_len = UB_SENSE_SIZE; |