Skip to content

Commit

Permalink
mds: fix count error of modified dentries
Browse files Browse the repository at this point in the history
CDir::_omap_commit counts modified dentries, for fragmenting
new dir modified dentries include head and snap items.

Fixes: https://tracker.ceph.com/issues/47981
Signed-off-by: Erqi Chen <[email protected]>
  • Loading branch information
Erqi Chen committed Oct 28, 2020
1 parent 27871ca commit e76073e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mds/CDir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ void CDir::_omap_commit(int op_prio)

size_t count = 0;
if (state_test(CDir::STATE_FRAGMENTING) && is_new()) {
count = get_num_head_items() && get_num_snap_items();
count = get_num_head_items() + get_num_snap_items();
} else {
for (elist<CDentry*>::iterator it = dirty_dentries.begin(); !it.end(); ++it)
++count;
Expand Down

0 comments on commit e76073e

Please sign in to comment.