MDS may cow dentry/inode. After COWing, batch getattr/lookup for snap
request can be attched to wrong object.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
mdr->getattr_caps = mask;
- if (!mdr->is_batch_head && mdr->is_batch_op()) {
+ if (mdr->snapid == CEPH_NOSNAP && !mdr->is_batch_head && mdr->is_batch_op()) {
if (!is_lookup) {
auto em = ref->batch_ops.emplace(std::piecewise_construct, std::forward_as_tuple(mask), std::forward_as_tuple());
if (em.second) {
return;
}
}
+ mdr->is_batch_head = true;
}
- mdr->is_batch_head = true;
/*
* if client currently holds the EXCL cap on a field, do not rdlock