Re: [PATCH 4/4] fix: release unused ceph cap reservation on readdir error
deepakroag <[email protected]> Wed, 15 Jul 2026 23:46:25 +0530
| Newsgroups | org.kernel.vger.ceph-devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Slava, Sorry for the confusing [PATCH 4/4] subject — that was my mistake, not an intentional ceph patch series. What happened: I batched four unrelated commits into one git send-email range. format-patch numbered them 1/4 through 4/4, but get_maintainer.pl routed each patch only to its subsystem list. ceph-devel received only patch 4. This is a standalone one-patch fix for ceph. I have resent it as [PATCH 1/1] to ceph-devel in a separate thread. The bug: in ceph_readdir_prepopulate(), ceph_fill_inode() consumes caps from req->r_caps_reservation. On error paths, unused caps were not returned to the MDS client pool (there is a FIXME: "release caps/leases if error occurs"). On success, ceph_unreserve_caps() is called in mds_client.c; on error it was skipped. The fix calls ceph_unreserve_caps() at out: when err != 0. How I found it: code review while reading fs/ceph/inode.c — not a live Ceph cluster repro. Compiled fs/ceph/inode.o locally. Thanks, Deepak Rao Gaikwad