log.c (41f2df62894bfcd3bf868af916b32b90aa7168dc) log.c (7b6d91daee5cac6402186ff224c3af39d79f4a0e)
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
7 * of the GNU General Public License version 2.
8 */

--- 581 unchanged lines hidden (view full) ---

590 lh->lh_blkno = cpu_to_be32(sdp->sd_log_flush_head);
591 hash = gfs2_disk_hash(bh->b_data, sizeof(struct gfs2_log_header));
592 lh->lh_hash = cpu_to_be32(hash);
593
594 bh->b_end_io = end_buffer_write_sync;
595 if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
596 goto skip_barrier;
597 get_bh(bh);
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
7 * of the GNU General Public License version 2.
8 */

--- 581 unchanged lines hidden (view full) ---

590 lh->lh_blkno = cpu_to_be32(sdp->sd_log_flush_head);
591 hash = gfs2_disk_hash(bh->b_data, sizeof(struct gfs2_log_header));
592 lh->lh_hash = cpu_to_be32(hash);
593
594 bh->b_end_io = end_buffer_write_sync;
595 if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
596 goto skip_barrier;
597 get_bh(bh);
598 submit_bh(WRITE_BARRIER | (1 << BIO_RW_META), bh);
598 submit_bh(WRITE_BARRIER | REQ_META, bh);
599 wait_on_buffer(bh);
600 if (buffer_eopnotsupp(bh)) {
601 clear_buffer_eopnotsupp(bh);
602 set_buffer_uptodate(bh);
603 fs_info(sdp, "barrier sync failed - disabling barriers\n");
604 set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
605 lock_buffer(bh);
606skip_barrier:
607 get_bh(bh);
599 wait_on_buffer(bh);
600 if (buffer_eopnotsupp(bh)) {
601 clear_buffer_eopnotsupp(bh);
602 set_buffer_uptodate(bh);
603 fs_info(sdp, "barrier sync failed - disabling barriers\n");
604 set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
605 lock_buffer(bh);
606skip_barrier:
607 get_bh(bh);
608 submit_bh(WRITE_SYNC | (1 << BIO_RW_META), bh);
608 submit_bh(WRITE_SYNC | REQ_META, bh);
609 wait_on_buffer(bh);
610 }
611 if (!buffer_uptodate(bh))
612 gfs2_io_error_bh(sdp, bh);
613 brelse(bh);
614
615 if (sdp->sd_log_tail != tail)
616 log_pull_tail(sdp, tail);

--- 332 unchanged lines hidden ---
609 wait_on_buffer(bh);
610 }
611 if (!buffer_uptodate(bh))
612 gfs2_io_error_bh(sdp, bh);
613 brelse(bh);
614
615 if (sdp->sd_log_tail != tail)
616 log_pull_tail(sdp, tail);

--- 332 unchanged lines hidden ---