]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix in-memory value of total_devices after seed device deletion
authorAnand Jain <anand.jain@oracle.com>
Tue, 3 Jul 2018 09:07:23 +0000 (17:07 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:45 +0000 (13:12 +0200)
commit935aa779209d4ac44fe8d854efb80656c0210388
tree8d83936371abc9a086c1b434d920467c9fb46248
parent3085f1c6919435b421cae18338326951bce35d2e
btrfs: fix in-memory value of total_devices after seed device deletion

In case of deleting the seed device the %cur_devices (seed) and the
%fs_devices (parent) are different. Now, as the parent
fs_devices::total_devices also maintains the total number of devices
including the seed device, so decrement its in-memory value for the
successful seed delete. We are already updating its corresponding
on-disk btrfs_super_block::number_devices value.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c