aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-09-10 19:58:36 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-09-10 19:58:36 -0400
commit011410bd859a481a335d7db1fb559542c5663fd5 (patch)
tree39b7d65352f49abe4eeb9cabd3b19d1b50faf9a2 /fs/btrfs/ctree.h
parent86479a04eef8f304a13aeb8b64bcc8e506a68268 (diff)
downloadkernel_samsung_smdk4412-011410bd859a481a335d7db1fb559542c5663fd5.zip
kernel_samsung_smdk4412-011410bd859a481a335d7db1fb559542c5663fd5.tar.gz
kernel_samsung_smdk4412-011410bd859a481a335d7db1fb559542c5663fd5.tar.bz2
Btrfs: Add more synchronization before creating a snapshot
File data checksums are only done during writepage, so we have to make sure all pages are written when the snapshot is taken. This also adds some locking so that new writes don't race in and add new dirty pages. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index cd75c90..03e1c4a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -333,6 +333,7 @@ struct btrfs_root {
struct inode *inode;
struct kobject root_kobj;
struct completion kobj_unregister;
+ struct rw_semaphore snap_sem;
u64 objectid;
u64 last_trans;
u32 blocksize;