]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bcache: recal cached_dev_sectors on detach
authorShenghui Wang <shhuiw@foxmail.com>
Mon, 8 Oct 2018 12:41:15 +0000 (20:41 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 28 Nov 2019 04:59:27 +0000 (23:59 -0500)
commit88ca361c7fcced370c950a0e9e62ec052739c9ad
treefb82c0df70e50ab107d35fb67ca1fd1331e2e6fa
parentfb551ed09c434e71592aa8d68d93b43d0bd61350
bcache: recal cached_dev_sectors on detach

BugLink: https://bugs.launchpad.net/bugs/1854216
[ Upstream commit 46010141da6677b81cc77f9b47f8ac62bd1cbfd3 ]

Recal cached_dev_sectors on cached_dev detached, as recal done on
cached_dev attached.

Update the cached_dev_sectors before bcache_device_detach called
as bcache_device_detach will set bcache_device->c to NULL.

Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/md/bcache/super.c