mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 ...
This commit is contained in:
commit
a2887097f2
80 changed files with 845 additions and 1921 deletions
|
|
@ -592,22 +592,13 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull)
|
|||
lh->lh_hash = cpu_to_be32(hash);
|
||||
|
||||
bh->b_end_io = end_buffer_write_sync;
|
||||
if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
|
||||
goto skip_barrier;
|
||||
get_bh(bh);
|
||||
submit_bh(WRITE_BARRIER | REQ_META, bh);
|
||||
wait_on_buffer(bh);
|
||||
if (buffer_eopnotsupp(bh)) {
|
||||
clear_buffer_eopnotsupp(bh);
|
||||
set_buffer_uptodate(bh);
|
||||
fs_info(sdp, "barrier sync failed - disabling barriers\n");
|
||||
set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
|
||||
lock_buffer(bh);
|
||||
skip_barrier:
|
||||
get_bh(bh);
|
||||
if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
|
||||
submit_bh(WRITE_SYNC | REQ_META, bh);
|
||||
wait_on_buffer(bh);
|
||||
}
|
||||
else
|
||||
submit_bh(WRITE_FLUSH_FUA | REQ_META, bh);
|
||||
wait_on_buffer(bh);
|
||||
|
||||
if (!buffer_uptodate(bh))
|
||||
gfs2_io_error_bh(sdp, bh);
|
||||
brelse(bh);
|
||||
|
|
|
|||
|
|
@ -866,8 +866,7 @@ static void gfs2_rgrp_send_discards(struct gfs2_sbd *sdp, u64 offset,
|
|||
if ((start + nr_sects) != blk) {
|
||||
rv = blkdev_issue_discard(bdev, start,
|
||||
nr_sects, GFP_NOFS,
|
||||
BLKDEV_IFL_WAIT |
|
||||
BLKDEV_IFL_BARRIER);
|
||||
0);
|
||||
if (rv)
|
||||
goto fail;
|
||||
nr_sects = 0;
|
||||
|
|
@ -881,8 +880,7 @@ start_new_extent:
|
|||
}
|
||||
}
|
||||
if (nr_sects) {
|
||||
rv = blkdev_issue_discard(bdev, start, nr_sects, GFP_NOFS,
|
||||
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
|
||||
rv = blkdev_issue_discard(bdev, start, nr_sects, GFP_NOFS, 0);
|
||||
if (rv)
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue