]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: prevent CDir omap commit with empty updates/removals/header 68793/head
authorVenky Shankar <vshankar@redhat.com>
Thu, 7 May 2026 09:47:38 +0000 (15:17 +0530)
committerVenky Shankar <vshankar@redhat.com>
Thu, 21 May 2026 06:46:11 +0000 (12:16 +0530)
commit068fab674c3bff757ea5fef86be82769ff813c29
treeb083c6750405cd9415ece70767150f75f1512367
parentfefad99380e9cb4c9be50ee071d8e659f46704de
mds: prevent CDir omap commit with empty updates/removals/header

Empty `stales` and `to_remove` causes `size` to be initialized with
sizeof(fnode_t). If the encoded inode size (plus fnode_t size) exceeds
max_dir_commit_size, commit_one() is called as a non-header update
with empty `_set` and `_rm` sets causing the MDS to assert.

While this patch prevents the assert, it is unknown at this point as
to why the encoded inode size is so large. We have seen it before
once, but there is lack of debug information to dig into. This fix
will prevent the assert, however, the MDS would go read-only due to
the large rados operation size, but at least we will have a live
system to debug at that point.

Fixes: http://tracker.ceph.com/issues/76455
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/mds/CDir.cc