diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 20:07:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 20:07:18 -0400 |
commit | a2887097f25cd38cadfc11d10769e2b349fb5eca (patch) | |
tree | cd4adcb305365d6ba9acd2c02d4eb9d0125c6f8d /drivers/scsi/sd.c | |
parent | 8abfc6e7a45eb74e51904bbae676fae008b11366 (diff) | |
parent | 005a1d15f5a6b2bb4ada80349513effbf22b4588 (diff) |
Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block: (46 commits)
xen-blkfront: disable barrier/flush write support
Added blk-lib.c and blk-barrier.c was renamed to blk-flush.c
block: remove BLKDEV_IFL_WAIT
aic7xxx_old: removed unused 'req' variable
block: remove the BH_Eopnotsupp flag
block: remove the BLKDEV_IFL_BARRIER flag
block: remove the WRITE_BARRIER flag
swap: do not send discards as barriers
fat: do not send discards as barriers
ext4: do not send discards as barriers
jbd2: replace barriers with explicit flush / FUA usage
jbd2: Modify ASYNC_COMMIT code to not rely on queue draining on barrier
jbd: replace barriers with explicit flush / FUA usage
nilfs2: replace barriers with explicit flush / FUA usage
reiserfs: replace barriers with explicit flush / FUA usage
gfs2: replace barriers with explicit flush / FUA usage
btrfs: replace barriers with explicit flush / FUA usage
xfs: replace barriers with explicit flush / FUA usage
block: pass gfp_mask and flags to sb_issue_discard
dm: convey that all flushes are processed as empty
...
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index ffa0689ee84..20514c47a5a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2109,7 +2109,7 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
2109 | struct scsi_disk *sdkp = scsi_disk(disk); | 2109 | struct scsi_disk *sdkp = scsi_disk(disk); |
2110 | struct scsi_device *sdp = sdkp->device; | 2110 | struct scsi_device *sdp = sdkp->device; |
2111 | unsigned char *buffer; | 2111 | unsigned char *buffer; |
2112 | unsigned ordered; | 2112 | unsigned flush = 0; |
2113 | 2113 | ||
2114 | SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, | 2114 | SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, |
2115 | "sd_revalidate_disk\n")); | 2115 | "sd_revalidate_disk\n")); |
@@ -2151,17 +2151,15 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
2151 | 2151 | ||
2152 | /* | 2152 | /* |
2153 | * We now have all cache related info, determine how we deal | 2153 | * We now have all cache related info, determine how we deal |
2154 | * with ordered requests. Note that as the current SCSI | 2154 | * with flush requests. |
2155 | * dispatch function can alter request order, we cannot use | ||
2156 | * QUEUE_ORDERED_TAG_* even when ordered tag is supported. | ||
2157 | */ | 2155 | */ |
2158 | if (sdkp->WCE) | 2156 | if (sdkp->WCE) { |
2159 | ordered = sdkp->DPOFUA | 2157 | flush |= REQ_FLUSH; |
2160 | ? QUEUE_ORDERED_DRAIN_FUA : QUEUE_ORDERED_DRAIN_FLUSH; | 2158 | if (sdkp->DPOFUA) |
2161 | else | 2159 | flush |= REQ_FUA; |
2162 | ordered = QUEUE_ORDERED_DRAIN; | 2160 | } |
2163 | 2161 | ||
2164 | blk_queue_ordered(sdkp->disk->queue, ordered); | 2162 | blk_queue_flush(sdkp->disk->queue, flush); |
2165 | 2163 | ||
2166 | set_capacity(disk, sdkp->capacity); | 2164 | set_capacity(disk, sdkp->capacity); |
2167 | kfree(buffer); | 2165 | kfree(buffer); |