Write success had some incorrect usage of sizes.
request_[size|offset] refers to logical size
toalwritten + offset refers to written to osd size
Fixes: https://tracker.ceph.com/issues/70193
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
// extend file?
if (request_size + request_offset > in->effective_size()) {
- size = request_size + request_offset;
if (encrypted) {
- in->set_effective_size(size);
+ in->set_effective_size(request_size + request_offset);
in->mark_caps_dirty(CEPH_CAP_FILE_EXCL);
- size = fscrypt_next_block_start(offset + size);
}
ldout(cct, 7) << "in->effective_size()=" << in->effective_size() << dendl;
- in->size = size;
+ in->size = totalwritten + offset;
in->mark_caps_dirty(CEPH_CAP_FILE_WR);
if (is_quota_bytes_approaching(in, f->actor_perms)) {