mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
Merge PR #68793 into main
* refs/pull/68793/head: mds: prevent CDir omap commit with empty updates/removals/header Reviewed-by: Igor Golikov <igolikov@ibm.com> Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
This commit is contained in:
commit
197d4537e2
@ -212,3 +212,4 @@ mkogan1 Mark Kogan <mkogan@redhat.com>
|
||||
smanjara Shilpa Jagannath <smanjara@redhat.com>
|
||||
arbtfnf anuragbandhu <anuragbandhu007@gmail.com>
|
||||
aainscow Alex Ainscow <aainscow@uk.ibm.com>
|
||||
salieri11 Igor Golikov <igolikov@ibm.com>
|
||||
|
||||
@ -2528,8 +2528,14 @@ void CDir::_omap_commit_ops(int r, int op_prio, int64_t metapool, version_t vers
|
||||
}
|
||||
|
||||
unsigned size = item.key.length() + bl.length() + 2 * sizeof(__u32);
|
||||
if (write_size > 0 && write_size + size > max_write_size)
|
||||
commit_one();
|
||||
if (write_size > 0 && write_size + size > max_write_size) {
|
||||
if (!_set.empty() || !_rm.empty()) {
|
||||
commit_one();
|
||||
} else {
|
||||
dout(1) << "skipping empty commit, inode size exceeded max_dir_commit_size ("
|
||||
<< size << " vs. " << max_write_size << ")" << dendl;
|
||||
}
|
||||
}
|
||||
|
||||
write_size += size;
|
||||
_set[std::move(item.key)] = std::move(bl);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user