nvme: explicitly update mpath disk capacity on revalidation
authorAnthony Iliopoulos <ailiop@suse.com>
Tue, 14 Jul 2020 11:11:59 +0000 (13:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:11 +0000 (09:34 +0200)
commit8313492d3aec2ce166c04999ef4a56425195ed76
treeb7d7b385f58718768f9921d9c9eeaef6b17d6f33
parent889fbfd149fcf41e01ddb35b556c18e2bb49c440
nvme: explicitly update mpath disk capacity on revalidation

[ Upstream commit 05b29021fba5e725dd385151ef00b6340229b500 ]

Commit 3b4b19721ec652 ("nvme: fix possible deadlock when I/O is
blocked") reverted multipath head disk revalidation due to deadlocks
caused by holding the bd_mutex during revalidate.

Updating the multipath disk blockdev size is still required though for
userspace to be able to observe any resizing while the device is
mounted. Directly update the bdev inode size to avoid unnecessarily
holding the bdev->bd_mutex.

Fixes: 3b4b19721ec652 ("nvme: fix possible deadlock when I/O is
blocked")

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h