]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: account for snapshot items when deciding to split or merge a directory
authorVenky Shankar <vshankar@redhat.com>
Wed, 16 Nov 2022 10:03:08 +0000 (05:03 -0500)
committerVenky Shankar <vshankar@redhat.com>
Thu, 22 Dec 2022 14:31:02 +0000 (20:01 +0530)
commit47cdb3eff519b9ea69c51a2fbc86c20da155f439
treef2c9077a0cdc67e4373a79fae019a6bec7ed7aec
parent9eb56d56b393c01bdf501a052769b876b08a9140
mds: account for snapshot items when deciding to split or merge a directory

Its easy to "overload" a directory object with large number of omap entries by
doing the following (one shot or over and over again):

      - touch dir/file{0..11000} ; create 11000 files (> mds_bal_split_size)
      - mkdir dir/.snap/snap_a
      - rm -f dir/file{0..11000}

End result - the directory object would have 11000 omap entries since the MDS
does not fragment directory snapshots. If the number of such entries exceed
`osd_deep_scrub_large_omap_object_key_threshold` (default: 200000), a cluster
health warning is generated:

       Large Omap objects found in pool...

CDir::should_merge() does not take into account COW'd inodes and the frags
get merged.

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