diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-12-09 01:15:39 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-12-09 01:15:39 +0100 |
commit | 580afd76e451deb6772d0507de580fb1df14da6c (patch) | |
tree | ea112be78807b07f617efffefb532e19778dc9bb /fs/btrfs/file.c | |
parent | Btrfs: Add inode sequence number for NFS and reserved space in a few structs (diff) | |
download | linux-580afd76e451deb6772d0507de580fb1df14da6c.tar.xz linux-580afd76e451deb6772d0507de580fb1df14da6c.zip |
Btrfs: Fix compressed checksum fsync log copies
The fsync logging code makes sure to onl copy the relevant checksum for each
extent based on the file extent pointers it finds.
But for compressed extents, it needs to copy the checksum for the
entire extent.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index b5a6a2b6f668..71bfe3a6a444 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1228,7 +1228,8 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) mutex_unlock(&root->fs_info->trans_mutex); root->fs_info->tree_log_batch++; - filemap_fdatawait(inode->i_mapping); + filemap_fdatawrite(inode->i_mapping); + btrfs_wait_ordered_range(inode, 0, (u64)-1); root->fs_info->tree_log_batch++; /* |