Message ID | 1389702712-26638-5-git-send-email-miaox@cn.fujitsu.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 251e6f4..944701b 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3470,7 +3470,11 @@ static int log_one_extent(struct btrfs_trans_handle *trans, &ordered->flags)) continue; - wait_event(ordered->wait, ordered->csum_bytes_left == 0); + if (ordered->csum_bytes_left) { + btrfs_start_ordered_extent(inode, ordered, 0); + wait_event(ordered->wait, + ordered->csum_bytes_left == 0); + } list_for_each_entry(sum, &ordered->list, list) { ret = btrfs_csum_file_blocks(trans, log, sum);