]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: set UUID in root_item for created trees
authorStefan Behrens <sbehrens@giantdisaster.de>
Fri, 19 Apr 2013 15:08:05 +0000 (15:08 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:14 +0000 (15:55 -0400)
commit18b20faa16989ae29f668569801b45164af72025
treeb5e43aa6c429eed30b2ff020ca425e636ebda524
parenta7454ae8b5128b5d7d5ae4855c49578e74360238
Btrfs: set UUID in root_item for created trees

It is a rare exception that a new tree is created, like the qgroups
tree. So far these new trees have an all-zero UUID in their root
items. All trees that mkfs.btrfs has created get an UUID during the
first mount when btrfs_read_root_item() rewrites the root_item to
the v2 structure style. These UUID are never used so far, but
anyway, since it is better to have it uniform for all trees, this
commit adds some lines that generate and write an UUID for newly
created trees.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c