]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Btrfs: fix inode cache waiters hanging on failure to start caching thread
authorFilipe Manana <fdmanana@suse.com>
Thu, 4 Jul 2019 15:24:32 +0000 (16:24 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit6d3e095588e33505be23ccf8f65aa3711b9a6f0e
tree9a13e722c4239431e353aaec4e867a20ab898a31
parent496bd396aa900cce3e5f1654441d2ae194e92c4d
Btrfs: fix inode cache waiters hanging on failure to start caching thread

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit a68ebe0790fc88b4314d17984a2cf99ce2361901 ]

If we fail to start the inode caching thread, we print an error message
and disable the inode cache, however we never wake up any waiters, so they
hang forever waiting for the caching to finish. Fix this by waking them
up and have them fallback to a call to btrfs_find_free_objectid().

Fixes: e60efa84252c05 ("Btrfs: avoid triggering bug_on() when we fail to start inode caching task")
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
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>
fs/btrfs/inode-map.c