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)
commit6463fe58ea60cbcc3e799937dd0877466fc7b8d5
treeb5e43aa6c429eed30b2ff020ca425e636ebda524
parent5fbf83c10c323cbee61483a06ea61883e3c83e6b
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