]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
block: rename REQ_TYPE_SPECIAL to REQ_TYPE_DRV_PRIV
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Apr 2015 20:37:16 +0000 (22:37 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 5 May 2015 19:40:03 +0000 (13:40 -0600)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
15 files changed:
drivers/block/nbd.c
drivers/block/paride/pd.c
drivers/block/sx8.c
drivers/block/virtio_blk.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-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-tape.c
include/linux/blkdev.h

index 39e5f7fae3efb76ab888ec19b2b8a8fdb4b258b4..9cf52ac328fede52c1cb4a75caee945a9d9d7cff 100644 (file)
@@ -592,7 +592,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
                fsync_bdev(bdev);
                mutex_lock(&nbd->tx_lock);
                blk_rq_init(NULL, &sreq);
-               sreq.cmd_type = REQ_TYPE_SPECIAL;
+               sreq.cmd_type = REQ_TYPE_DRV_PRIV;
                nbd_cmd(&sreq) = NBD_CMD_DISC;
 
                /* Check again after getting mutex back.  */
index d48715b287e667bea5205ec75f6e6c40792149a4..dbb4da1cdca8b2f91ed50a4527824dd21bd5bfab 100644 (file)
@@ -442,7 +442,7 @@ static char *pd_buf;                /* buffer for request in progress */
 
 static enum action do_pd_io_start(void)
 {
-       if (pd_req->cmd_type == REQ_TYPE_SPECIAL) {
+       if (pd_req->cmd_type == REQ_TYPE_DRV_PRIV) {
                phase = pd_special;
                return pd_special();
        }
@@ -725,7 +725,7 @@ static int pd_special_command(struct pd_unit *disk,
        if (IS_ERR(rq))
                return PTR_ERR(rq);
 
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->special = func;
 
        err = blk_execute_rq(disk->gd->queue, disk->gd, rq, 0);
index 5d552857de412e32864ba4378a2313014c7b3564..59c91d49b14b649f839f8af5951772436d959da8 100644 (file)
@@ -620,7 +620,7 @@ static int carm_array_info (struct carm_host *host, unsigned int array_idx)
        spin_unlock_irq(&host->lock);
 
        DPRINTK("blk_execute_rq_nowait, tag == %u\n", idx);
-       crq->rq->cmd_type = REQ_TYPE_SPECIAL;
+       crq->rq->cmd_type = REQ_TYPE_DRV_PRIV;
        crq->rq->special = crq;
        blk_execute_rq_nowait(host->oob_q, NULL, crq->rq, true, NULL);
 
@@ -661,7 +661,7 @@ static int carm_send_special (struct carm_host *host, carm_sspc_t func)
        crq->msg_bucket = (u32) rc;
 
        DPRINTK("blk_execute_rq_nowait, tag == %u\n", idx);
-       crq->rq->cmd_type = REQ_TYPE_SPECIAL;
+       crq->rq->cmd_type = REQ_TYPE_DRV_PRIV;
        crq->rq->special = crq;
        blk_execute_rq_nowait(host->oob_q, NULL, crq->rq, true, NULL);
 
index 5ea2f0bbbc7c3d6e62a016bcce22ff5a8ce46c1b..d4d05f064d390772a2f99acbf882eaa983788511 100644 (file)
@@ -124,7 +124,7 @@ static inline void virtblk_request_done(struct request *req)
                req->resid_len = virtio32_to_cpu(vblk->vdev, vbr->in_hdr.residual);
                req->sense_len = virtio32_to_cpu(vblk->vdev, vbr->in_hdr.sense_len);
                req->errors = virtio32_to_cpu(vblk->vdev, vbr->in_hdr.errors);
-       } else if (req->cmd_type == REQ_TYPE_SPECIAL) {
+       } else if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
                req->errors = (error != 0);
        }
 
@@ -188,7 +188,7 @@ static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx,
                        vbr->out_hdr.sector = 0;
                        vbr->out_hdr.ioprio = cpu_to_virtio32(vblk->vdev, req_get_ioprio(vbr->req));
                        break;
-               case REQ_TYPE_SPECIAL:
+               case REQ_TYPE_DRV_PRIV:
                        vbr->out_hdr.type = cpu_to_virtio32(vblk->vdev, VIRTIO_BLK_T_GET_ID);
                        vbr->out_hdr.sector = 0;
                        vbr->out_hdr.ioprio = cpu_to_virtio32(vblk->vdev, req_get_ioprio(vbr->req));
@@ -251,7 +251,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
                return PTR_ERR(req);
        }
 
-       req->cmd_type = REQ_TYPE_SPECIAL;
+       req->cmd_type = REQ_TYPE_DRV_PRIV;
        err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false);
        blk_put_request(req);
 
index fac3d9da2e07db38df577c0ed76f5f72202641ea..b367300ce47944a9668769afdffea796c488f752 100644 (file)
@@ -93,7 +93,7 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk,
        int error;
 
        rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->special = (char *)pc;
 
        if (buf && bufflen) {
@@ -477,7 +477,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
                if (uptodate == 0)
                        drive->failed_pc = NULL;
 
-               if (rq->cmd_type == REQ_TYPE_SPECIAL) {
+               if (rq->cmd_type == REQ_TYPE_DRV_PRIV) {
                        rq->errors = 0;
                        error = 0;
                } else {
index 0b510bafd90e2904d989d4f8ce06b89f50ea1f76..9a32603c6c7473557b6ed36220cc3eb1d1ce74ce 100644 (file)
@@ -799,7 +799,7 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
 
                cdrom_do_block_pc(drive, rq);
                break;
-       case REQ_TYPE_SPECIAL:
+       case REQ_TYPE_DRV_PRIV:
                /* right now this can only be a reset... */
                uptodate = 1;
                goto out_end;
index 02caa7dd51c83f99e34e05de972f67020945a2d6..066e3903651842fa31c82bc278c8f7434bf6c950 100644 (file)
@@ -304,7 +304,7 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi)
        int ret;
 
        rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->cmd_flags = REQ_QUIET;
        ret = blk_execute_rq(drive->queue, cd->disk, rq, 0);
        blk_put_request(rq);
index 9e98122f646e3190c85dc3d2813102f5a00f49ec..b05a74d78ef560deefd8f022d27f145766e094b4 100644 (file)
@@ -166,7 +166,7 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
                return setting->set(drive, arg);
 
        rq = blk_get_request(q, READ, __GFP_WAIT);
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->cmd_len = 5;
        rq->cmd[0] = REQ_DEVSET_EXEC;
        *(int *)&rq->cmd[1] = arg;
index 32970664c275448d65c44f6e8252b5de129c064c..19d809c48a8d1a84c7e70e71ad834616530d02c1 100644 (file)
@@ -147,7 +147,7 @@ static inline void ide_complete_drive_reset(ide_drive_t *drive, int err)
 {
        struct request *rq = drive->hwif->rq;
 
-       if (rq && rq->cmd_type == REQ_TYPE_SPECIAL &&
+       if (rq && rq->cmd_type == REQ_TYPE_DRV_PRIV &&
            rq->cmd[0] == REQ_DRIVE_RESET) {
                if (err <= 0 && rq->errors == 0)
                        rq->errors = -EIO;
index 8c6363cdd2084a55ae4cfc9141e08cccde03c223..3dbfa5b6db6ad3eb108824205133a03589fe432b 100644 (file)
@@ -97,7 +97,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)
                               "Aborting request!\n");
        }
 
-       if (rq->cmd_type == REQ_TYPE_SPECIAL)
+       if (rq->cmd_type == REQ_TYPE_DRV_PRIV)
                rq->errors = uptodate ? 0 : IDE_DRV_ERROR_GENERAL;
 
        return uptodate;
@@ -246,7 +246,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
                } else
                        printk(KERN_ERR PFX "%s: I/O error\n", drive->name);
 
-               if (rq->cmd_type == REQ_TYPE_SPECIAL) {
+               if (rq->cmd_type == REQ_TYPE_DRV_PRIV) {
                        rq->errors = 0;
                        ide_complete_rq(drive, 0, blk_rq_bytes(rq));
                        return ide_stopped;
@@ -265,7 +265,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
                pc = &floppy->queued_pc;
                idefloppy_create_rw_cmd(drive, pc, rq, (unsigned long)block);
                break;
-       case REQ_TYPE_SPECIAL:
+       case REQ_TYPE_DRV_PRIV:
        case REQ_TYPE_SENSE:
                pc = (struct ide_atapi_pc *)rq->special;
                break;
index 177db6d5b2f58972e5dbcf3f5cc1f99cf4f27079..8e55abd03a24026f6e58cc7b9f2b2d6d47e78ca6 100644 (file)
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(ide_complete_rq);
 
 void ide_kill_rq(ide_drive_t *drive, struct request *rq)
 {
-       u8 drv_req = (rq->cmd_type == REQ_TYPE_SPECIAL) && rq->rq_disk;
+       u8 drv_req = (rq->cmd_type == REQ_TYPE_DRV_PRIV) && rq->rq_disk;
        u8 media = drive->media;
 
        drive->failed_pc = NULL;
@@ -353,7 +353,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
                            pm->pm_step == IDE_PM_COMPLETED)
                                ide_complete_pm_rq(drive, rq);
                        return startstop;
-               } else if (!rq->rq_disk && rq->cmd_type == REQ_TYPE_SPECIAL)
+               } else if (!rq->rq_disk && rq->cmd_type == REQ_TYPE_DRV_PRIV)
                        /*
                         * TODO: Once all ULDs have been modified to
                         * check for specific op codes rather than
index 6233fa2cb8a97806490b983c8013dcee09567b39..aa2e9b77b20d39a67d3da80fd23338fcb631faf6 100644 (file)
@@ -222,7 +222,7 @@ static int generic_drive_reset(ide_drive_t *drive)
        int ret = 0;
 
        rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->cmd_len = 1;
        rq->cmd[0] = REQ_DRIVE_RESET;
        if (blk_execute_rq(drive->queue, NULL, rq, 1))
index ca958604cda21217f6d6a1bce6240fbf07fb2d7f..c808685204883db93213e80ee9516a298e1f58b1 100644 (file)
@@ -34,7 +34,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
        rq = blk_get_request(q, READ, __GFP_WAIT);
        rq->cmd[0] = REQ_PARK_HEADS;
        rq->cmd_len = 1;
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->special = &timeout;
        rc = blk_execute_rq(q, NULL, rq, 1);
        blk_put_request(rq);
@@ -51,7 +51,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout)
 
        rq->cmd[0] = REQ_UNPARK_HEADS;
        rq->cmd_len = 1;
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        elv_add_request(q, rq, ELEVATOR_INSERT_FRONT);
 
 out:
index 6eb738ca6d2f353717aac1e63bade383f763afa5..2a5d543db9f5119d51e8b1975ac2a2db45a02038 100644 (file)
@@ -576,7 +576,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
                      rq->cmd[0], (unsigned long long)blk_rq_pos(rq),
                      blk_rq_sectors(rq));
 
-       BUG_ON(!(rq->cmd_type == REQ_TYPE_SPECIAL ||
+       BUG_ON(!(rq->cmd_type == REQ_TYPE_DRV_PRIV ||
                 rq->cmd_type == REQ_TYPE_SENSE));
 
        /* Retry a failed packet command */
@@ -853,7 +853,7 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size)
        BUG_ON(size < 0 || size % tape->blk_size);
 
        rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
-       rq->cmd_type = REQ_TYPE_SPECIAL;
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
        rq->cmd[13] = cmd;
        rq->rq_disk = tape->disk;
        rq->__sector = tape->first_frame;
index 7f9a516f24dec57182f51cff3580db3904208a84..98c90272443bf9512889b3195b13c39956c8ad1e 100644 (file)
@@ -79,10 +79,10 @@ enum rq_cmd_type_bits {
        REQ_TYPE_PM_SUSPEND,            /* suspend request */
        REQ_TYPE_PM_RESUME,             /* resume request */
        REQ_TYPE_PM_SHUTDOWN,           /* shutdown request */
-       REQ_TYPE_SPECIAL,               /* driver defined type */
+       REQ_TYPE_DRV_PRIV,              /* driver defined type */
        /*
         * for ATA/ATAPI devices. this really doesn't belong here, ide should
-        * use REQ_TYPE_SPECIAL and use rq->cmd[0] with the range of driver
+        * use REQ_TYPE_DRV_PRIV and use rq->cmd[0] with the range of driver
         * private REQ_LB opcodes to differentiate what type of request this is
         */
        REQ_TYPE_ATA_TASKFILE,