Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128989
b: refs/heads/master
c: 19b9bdb
h: refs/heads/master
i:
  128987: 620b59a
v: v3
  • Loading branch information
Chris Mason committed Oct 30, 2008
1 parent 1f004a4 commit 66a7d5c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: cfbc246eaae2a1089911016094b74b3055e8a906
refs/heads/master: 19b9bdb054895ba07086f0264641c9f80e0eb2c4
21 changes: 11 additions & 10 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,28 +833,29 @@ int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
{
struct btrfs_root *root = BTRFS_I(inode)->root;
int ret = 0;
int skip_sum;

ret = btrfs_bio_wq_end_io(root->fs_info, bio, 0);
BUG_ON(ret);

if (btrfs_test_opt(root, NODATASUM) ||
btrfs_test_flag(inode, NODATASUM)) {
goto mapit;
}
skip_sum = btrfs_test_opt(root, NODATASUM) ||
btrfs_test_flag(inode, NODATASUM);

if (!(rw & (1 << BIO_RW))) {
btrfs_lookup_bio_sums(root, inode, bio);
if (!skip_sum)
btrfs_lookup_bio_sums(root, inode, bio);

if (bio_flags & EXTENT_BIO_COMPRESSED) {
if (bio_flags & EXTENT_BIO_COMPRESSED)
return btrfs_submit_compressed_read(inode, bio,
mirror_num, bio_flags);
}

goto mapit;
}
return btrfs_wq_submit_bio(BTRFS_I(inode)->root->fs_info,
} else if (!skip_sum) {
/* we're doing a write, do the async checksumming */
return btrfs_wq_submit_bio(BTRFS_I(inode)->root->fs_info,
inode, rw, bio, mirror_num,
bio_flags, __btrfs_submit_bio_hook);
}

mapit:
return btrfs_map_bio(root, rw, bio, mirror_num, 0);
}
Expand Down

0 comments on commit 66a7d5c

Please sign in to comment.