meta_io.c (11e4afb49b7fa1fc8e1ffd850c1806dd86a08204) meta_io.c (7b6d91daee5cac6402186ff224c3af39d79f4a0e)
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2008 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 */

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

31#include "rgrp.h"
32#include "trans.h"
33#include "util.h"
34
35static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wbc)
36{
37 struct buffer_head *bh, *head;
38 int nr_underway = 0;
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2008 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 */

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

31#include "rgrp.h"
32#include "trans.h"
33#include "util.h"
34
35static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wbc)
36{
37 struct buffer_head *bh, *head;
38 int nr_underway = 0;
39 int write_op = (1 << BIO_RW_META) | ((wbc->sync_mode == WB_SYNC_ALL ?
40 WRITE_SYNC_PLUG : WRITE));
39 int write_op = REQ_META |
40 (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC_PLUG : WRITE);
41
42 BUG_ON(!PageLocked(page));
43 BUG_ON(!page_has_buffers(page));
44
45 head = page_buffers(page);
46 bh = head;
47
48 do {

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

220
221 lock_buffer(bh);
222 if (buffer_uptodate(bh)) {
223 unlock_buffer(bh);
224 return 0;
225 }
226 bh->b_end_io = end_buffer_read_sync;
227 get_bh(bh);
41
42 BUG_ON(!PageLocked(page));
43 BUG_ON(!page_has_buffers(page));
44
45 head = page_buffers(page);
46 bh = head;
47
48 do {

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

220
221 lock_buffer(bh);
222 if (buffer_uptodate(bh)) {
223 unlock_buffer(bh);
224 return 0;
225 }
226 bh->b_end_io = end_buffer_read_sync;
227 get_bh(bh);
228 submit_bh(READ_SYNC | (1 << BIO_RW_META), bh);
228 submit_bh(READ_SYNC | REQ_META, bh);
229 if (!(flags & DIO_WAIT))
230 return 0;
231
232 wait_on_buffer(bh);
233 if (unlikely(!buffer_uptodate(bh))) {
234 struct gfs2_trans *tr = current->journal_info;
235 if (tr && tr->tr_touched)
236 gfs2_io_error_bh(sdp, bh);

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

427 if (extlen > max_ra)
428 extlen = max_ra;
429
430 first_bh = gfs2_getbuf(gl, dblock, CREATE);
431
432 if (buffer_uptodate(first_bh))
433 goto out;
434 if (!buffer_locked(first_bh))
229 if (!(flags & DIO_WAIT))
230 return 0;
231
232 wait_on_buffer(bh);
233 if (unlikely(!buffer_uptodate(bh))) {
234 struct gfs2_trans *tr = current->journal_info;
235 if (tr && tr->tr_touched)
236 gfs2_io_error_bh(sdp, bh);

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

427 if (extlen > max_ra)
428 extlen = max_ra;
429
430 first_bh = gfs2_getbuf(gl, dblock, CREATE);
431
432 if (buffer_uptodate(first_bh))
433 goto out;
434 if (!buffer_locked(first_bh))
435 ll_rw_block(READ_SYNC | (1 << BIO_RW_META), 1, &first_bh);
435 ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh);
436
437 dblock++;
438 extlen--;
439
440 while (extlen) {
441 bh = gfs2_getbuf(gl, dblock, CREATE);
442
443 if (!buffer_uptodate(bh) && !buffer_locked(bh))

--- 13 unchanged lines hidden ---
436
437 dblock++;
438 extlen--;
439
440 while (extlen) {
441 bh = gfs2_getbuf(gl, dblock, CREATE);
442
443 if (!buffer_uptodate(bh) && !buffer_locked(bh))

--- 13 unchanged lines hidden ---