From 03a5743a12b58e10eaa936a02498539db645ba4e Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 3 Aug 2007 16:41:11 -0500 Subject: [SCSI] sd: disentangle barriers in SCSI Our current implementation has a generic set of barrier functions that go through the SCSI driver model. Realistically, this is unnecessary, because the only device that can use barriers (sd) can set the flush functions up at probe or revalidate time. This patch pulls the barrier functions out of the mid layer and scsi driver model and relocates them directly in sd. Acked-by: Tejun Heo Signed-off-by: James Bottomley --- drivers/scsi/scsi_lib.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'drivers/scsi/scsi_lib.c') diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 21c075d44db..a417a6ff9f9 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1038,22 +1038,6 @@ static int scsi_init_io(struct scsi_cmnd *cmd) return BLKPREP_KILL; } -static int scsi_issue_flush_fn(struct request_queue *q, struct gendisk *disk, - sector_t *error_sector) -{ - struct scsi_device *sdev = q->queuedata; - struct scsi_driver *drv; - - if (sdev->sdev_state != SDEV_RUNNING) - return -ENXIO; - - drv = *(struct scsi_driver **) disk->private_data; - if (drv->issue_flush) - return drv->issue_flush(&sdev->sdev_gendev, error_sector); - - return -EOPNOTSUPP; -} - static struct scsi_cmnd *scsi_get_cmd_from_req(struct scsi_device *sdev, struct request *req) { @@ -1596,7 +1580,6 @@ struct request_queue *scsi_alloc_queue(struct scsi_device *sdev) return NULL; blk_queue_prep_rq(q, scsi_prep_fn); - blk_queue_issue_flush_fn(q, scsi_issue_flush_fn); blk_queue_softirq_done(q, scsi_softirq_done); return q; } -- cgit v1.2.3