]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: keep device list sorted
authorAnand Jain <anand.jain@oracle.com>
Mon, 22 Jan 2018 22:49:36 +0000 (14:49 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:36 +0000 (15:09 +0200)
commitdca07aa2a5ef9ddf93f63ada47b9b8486181c69f
treec81c02d063c231d74f167b994504ba7e0b331389
parent6a60a0f0181c7475f76d96acf3f3b0fb39e15111
btrfs: keep device list sorted

By maintaining the device list sorted lets us reproduce the problems
related to missing chunk in the degraded mode much more consistent. So
fix this by sorting the devices by devid within the kernel. So that we
know which device is assigned to the struct fs_info::latest_bdev when
all the devices are having and same SB generation.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c