]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: account for header size during omap commit 58645/head
authorVenky Shankar <vshankar@redhat.com>
Wed, 17 Jul 2024 10:05:45 +0000 (10:05 +0000)
committerIgor Golikov <igolikov@ibm.com>
Mon, 18 Nov 2024 10:29:40 +0000 (12:29 +0200)
fnode_t is set in the omap header during directory commit
operation which isn't accounted when tracking operation
size.

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

index af9f8edfffa5bb27beeacf68e442309940d61c6e..7d28e039d9c017a2b4f71ed4aff2edbbb582df16 100644 (file)
@@ -2494,6 +2494,10 @@ void CDir::_omap_commit_ops(int r, int op_prio, int64_t metapool, version_t vers
       mdcache->mds->heartbeat_reset();
   }
 
+  // the last omap commit includes the omap header, so account for
+  // that size early on so that when we reach `commit_one(true)`,
+  // there is enough space for the header.
+  write_size += sizeof(fnode_t);
   using ceph::encode;
   for (auto &item : to_set) {
     bufferlist bl;