diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2013-08-15 11:11:22 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 08:15:57 -0400 |
commit | 26432799c902b76e87f68f5c88f2146a78ba84af (patch) | |
tree | 42f9421a2bb76eada9778ef81d50e3f52656378b /fs/btrfs/transaction.c | |
parent | 803b2f54fb4faf6d76fca43e59bcc555d9713cd4 (diff) |
Btrfs: introduce uuid-tree-gen field
In order to be able to detect the case that a filesystem is mounted
with an old kernel, add a uuid-tree-gen field like the free space
cache is doing it. It is part of the super block and written with
each commit. Old kernels do not know this field and don't update it.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 72ab0dd31937..e76237c8802a 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1380,6 +1380,7 @@ static void update_super_roots(struct btrfs_root *root) | |||
1380 | super->root_level = root_item->level; | 1380 | super->root_level = root_item->level; |
1381 | if (btrfs_test_opt(root, SPACE_CACHE)) | 1381 | if (btrfs_test_opt(root, SPACE_CACHE)) |
1382 | super->cache_generation = root_item->generation; | 1382 | super->cache_generation = root_item->generation; |
1383 | super->uuid_tree_generation = root_item->generation; | ||
1383 | } | 1384 | } |
1384 | 1385 | ||
1385 | int btrfs_transaction_in_commit(struct btrfs_fs_info *info) | 1386 | int btrfs_transaction_in_commit(struct btrfs_fs_info *info) |