Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175274
b: refs/heads/master
c: 06342cf
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Dec 11, 2009
1 parent 828689d commit 4d01314
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 033da48fda9d56e28b3fe3ef87ef6fd43290f554
refs/heads/master: 06342cf8adb23464deae0f58f8bcb87818a3bee6
17 changes: 10 additions & 7 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,9 @@ xfs_end_bio(

STATIC void
xfs_submit_ioend_bio(
xfs_ioend_t *ioend,
struct bio *bio)
struct writeback_control *wbc,
xfs_ioend_t *ioend,
struct bio *bio)
{
atomic_inc(&ioend->io_remaining);
bio->bi_private = ioend;
Expand All @@ -426,7 +427,8 @@ xfs_submit_ioend_bio(
if (xfs_ioend_new_eof(ioend))
xfs_mark_inode_dirty_sync(XFS_I(ioend->io_inode));

submit_bio(WRITE, bio);
submit_bio(wbc->sync_mode == WB_SYNC_ALL ?
WRITE_SYNC_PLUG : WRITE, bio);
ASSERT(!bio_flagged(bio, BIO_EOPNOTSUPP));
bio_put(bio);
}
Expand Down Expand Up @@ -505,6 +507,7 @@ static inline int bio_add_buffer(struct bio *bio, struct buffer_head *bh)
*/
STATIC void
xfs_submit_ioend(
struct writeback_control *wbc,
xfs_ioend_t *ioend)
{
xfs_ioend_t *head = ioend;
Expand Down Expand Up @@ -533,19 +536,19 @@ xfs_submit_ioend(
retry:
bio = xfs_alloc_ioend_bio(bh);
} else if (bh->b_blocknr != lastblock + 1) {
xfs_submit_ioend_bio(ioend, bio);
xfs_submit_ioend_bio(wbc, ioend, bio);
goto retry;
}

if (bio_add_buffer(bio, bh) != bh->b_size) {
xfs_submit_ioend_bio(ioend, bio);
xfs_submit_ioend_bio(wbc, ioend, bio);
goto retry;
}

lastblock = bh->b_blocknr;
}
if (bio)
xfs_submit_ioend_bio(ioend, bio);
xfs_submit_ioend_bio(wbc, ioend, bio);
xfs_finish_ioend(ioend, 0);
} while ((ioend = next) != NULL);
}
Expand Down Expand Up @@ -1198,7 +1201,7 @@ xfs_page_state_convert(
}

if (iohead)
xfs_submit_ioend(iohead);
xfs_submit_ioend(wbc, iohead);

return page_dirty;

Expand Down

0 comments on commit 4d01314

Please sign in to comment.