diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 05:05:02 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 05:05:02 -0400 |
commit | fd5d806266935179deda1502101624832eacd01f (patch) | |
tree | b0d01c2ed7d754f2a6daef6c77d108a81d8a470e /drivers/scsi/sd.c | |
parent | bf2de6f5a4faf0197268f18d08969b003b87b6e8 (diff) |
block: convert blkdev_issue_flush() to use empty barriers
Then we can get rid of ->issue_flush_fn() and all the driver private
implementations of that.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 0a3a528212c2..69f542c4923c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -826,27 +826,6 @@ static int sd_sync_cache(struct scsi_disk *sdkp) | |||
826 | return 0; | 826 | return 0; |
827 | } | 827 | } |
828 | 828 | ||
829 | static int sd_issue_flush(struct request_queue *q, struct gendisk *disk, | ||
830 | sector_t *error_sector) | ||
831 | { | ||
832 | int ret = 0; | ||
833 | struct scsi_device *sdp = q->queuedata; | ||
834 | struct scsi_disk *sdkp; | ||
835 | |||
836 | if (sdp->sdev_state != SDEV_RUNNING) | ||
837 | return -ENXIO; | ||
838 | |||
839 | sdkp = scsi_disk_get_from_dev(&sdp->sdev_gendev); | ||
840 | |||
841 | if (!sdkp) | ||
842 | return -ENODEV; | ||
843 | |||
844 | if (sdkp->WCE) | ||
845 | ret = sd_sync_cache(sdkp); | ||
846 | scsi_disk_put(sdkp); | ||
847 | return ret; | ||
848 | } | ||
849 | |||
850 | static void sd_prepare_flush(struct request_queue *q, struct request *rq) | 829 | static void sd_prepare_flush(struct request_queue *q, struct request *rq) |
851 | { | 830 | { |
852 | memset(rq->cmd, 0, sizeof(rq->cmd)); | 831 | memset(rq->cmd, 0, sizeof(rq->cmd)); |
@@ -1697,7 +1676,6 @@ static int sd_probe(struct device *dev) | |||
1697 | sd_revalidate_disk(gd); | 1676 | sd_revalidate_disk(gd); |
1698 | 1677 | ||
1699 | blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); | 1678 | blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); |
1700 | blk_queue_issue_flush_fn(sdp->request_queue, sd_issue_flush); | ||
1701 | 1679 | ||
1702 | gd->driverfs_dev = &sdp->sdev_gendev; | 1680 | gd->driverfs_dev = &sdp->sdev_gendev; |
1703 | gd->flags = GENHD_FL_DRIVERFS; | 1681 | gd->flags = GENHD_FL_DRIVERFS; |