]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: update sprout seed pointer when seed fs is relinquished
authorAnand Jain <Anand.Jain@oracle.com>
Wed, 13 Aug 2014 06:24:22 +0000 (14:24 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:08 +0000 (13:38 -0700)
commit39c50cb30b37d907639d78f6bd3876b3cde642f7
treec81f93040c7f437f492c739bed37e03566710eb9
parentb968e525c7cd2d1e3c193ec9648d2861213f29bf
btrfs: update sprout seed pointer when seed fs is relinquished

We are not updating sprout fs seed pointer when all seed device
is replaced. This patch will check if all seed device has been
replaced and then update the sprout pointer accordingly.

Same reproducer as in the previous patch would apply here.
And notice that btrfs_close_device will check if seed fs is
present and spits out the error with out this patch.

int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
{
::
                seed_devices = fs_devices->seed;
::
        while (seed_devices) {
                fs_devices = seed_devices;
                seed_devices = fs_devices->seed;
                __btrfs_close_devices(fs_devices);
                free_fs_devices(fs_devices);
        }

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c