On Wed, Sep 17, 2025 at 10:20 PM Al Viro viro@zeniv.linux.org.uk wrote:
On Wed, Sep 17, 2025 at 03:59:07PM +0200, Max Kellermann wrote:
After advice from Mateusz Guzik, I decided to do the latter. The implementation is simple because it piggybacks on the existing work_struct for ceph_queue_inode_work() - ceph_inode_work() calls iput() at the end which means we can donate the last reference to it.
This patch adds ceph_iput_async() and converts lots of iput() calls to it - at least those that may come through writeback and the messenger.
What would force those delayed calls through at fs shutdown time?
I was wondering the same a few days ago, but found no code to enforce wait for work completion during shutdown - but since this was pre-existing code, I thought somebody more clever than I must have thought of this at some point and I just don't understand it. Or maybe Ceph is already bugged and my patch just makes hitting the bug more likely?