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/ide | |
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/ide')
-rw-r--r-- | drivers/ide/ide-disk.c | 13 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 13 |
2 files changed, 6 insertions, 20 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 7433e07de30e..7c5b01ce51d2 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -516,10 +516,10 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect) | |||
516 | return ide_no_data_taskfile(drive, &cmd); | 516 | return ide_no_data_taskfile(drive, &cmd); |
517 | } | 517 | } |
518 | 518 | ||
519 | static void update_ordered(ide_drive_t *drive) | 519 | static void update_flush(ide_drive_t *drive) |
520 | { | 520 | { |
521 | u16 *id = drive->id; | 521 | u16 *id = drive->id; |
522 | unsigned ordered = QUEUE_ORDERED_NONE; | 522 | unsigned flush = 0; |
523 | 523 | ||
524 | if (drive->dev_flags & IDE_DFLAG_WCACHE) { | 524 | if (drive->dev_flags & IDE_DFLAG_WCACHE) { |
525 | unsigned long long capacity; | 525 | unsigned long long capacity; |
@@ -543,13 +543,12 @@ static void update_ordered(ide_drive_t *drive) | |||
543 | drive->name, barrier ? "" : "not "); | 543 | drive->name, barrier ? "" : "not "); |
544 | 544 | ||
545 | if (barrier) { | 545 | if (barrier) { |
546 | ordered = QUEUE_ORDERED_DRAIN_FLUSH; | 546 | flush = REQ_FLUSH; |
547 | blk_queue_prep_rq(drive->queue, idedisk_prep_fn); | 547 | blk_queue_prep_rq(drive->queue, idedisk_prep_fn); |
548 | } | 548 | } |
549 | } else | 549 | } |
550 | ordered = QUEUE_ORDERED_DRAIN; | ||
551 | 550 | ||
552 | blk_queue_ordered(drive->queue, ordered); | 551 | blk_queue_flush(drive->queue, flush); |
553 | } | 552 | } |
554 | 553 | ||
555 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); | 554 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); |
@@ -572,7 +571,7 @@ static int set_wcache(ide_drive_t *drive, int arg) | |||
572 | } | 571 | } |
573 | } | 572 | } |
574 | 573 | ||
575 | update_ordered(drive); | 574 | update_flush(drive); |
576 | 575 | ||
577 | return err; | 576 | return err; |
578 | } | 577 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index a381be814070..999dac054bcc 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -441,19 +441,6 @@ void do_ide_request(struct request_queue *q) | |||
441 | struct request *rq = NULL; | 441 | struct request *rq = NULL; |
442 | ide_startstop_t startstop; | 442 | ide_startstop_t startstop; |
443 | 443 | ||
444 | /* | ||
445 | * drive is doing pre-flush, ordered write, post-flush sequence. even | ||
446 | * though that is 3 requests, it must be seen as a single transaction. | ||
447 | * we must not preempt this drive until that is complete | ||
448 | */ | ||
449 | if (blk_queue_flushing(q)) | ||
450 | /* | ||
451 | * small race where queue could get replugged during | ||
452 | * the 3-request flush cycle, just yank the plug since | ||
453 | * we want it to finish asap | ||
454 | */ | ||
455 | blk_remove_plug(q); | ||
456 | |||
457 | spin_unlock_irq(q->queue_lock); | 444 | spin_unlock_irq(q->queue_lock); |
458 | 445 | ||
459 | /* HLD do_request() callback might sleep, make sure it's okay */ | 446 | /* HLD do_request() callback might sleep, make sure it's okay */ |