Skip to content

Commit

Permalink
Use WRITE_BARRIER in blkdev_issue_flush(), not (1<<BIO_RW_BARRIER)
Browse files Browse the repository at this point in the history
Barriers should be submitted with the WRITE flag set.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
OGAWA Hirofumi authored and Jens Axboe committed Oct 9, 2008
1 parent 35ba8f7 commit 2ebca85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector)
bio->bi_end_io = bio_end_empty_barrier;
bio->bi_private = &wait;
bio->bi_bdev = bdev;
submit_bio(1 << BIO_RW_BARRIER, bio);
submit_bio(WRITE_BARRIER, bio);

wait_for_completion(&wait);

Expand Down

0 comments on commit 2ebca85

Please sign in to comment.