Actions
Tasks #69796
closedTasks #63293: Implement fscrypt in libcephfs and cephfs-fuse
general libcephfs unit tests fail
% Done:
100%
Reviewed:
Affected Versions:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:
Description
The following is failing:
The test suite
ceph_test_libcephfs
The tests:
OpenReadWrite MulticlientSimple MulticlientHoleEOF MulticlientRevokeCaps RecalledGetattr
Updated by Christopher Hoffman about 1 year ago
- Status changed from In Progress to Resolved
Multi-client tests and now all tests pass.
commit 4bb7c3d895960d4cffa84d172b16faa89d820edc (HEAD -> wip-fscrypt, origin/wip-fscrypt)
Author: Christopher Hoffman <choffman@redhat.com>
Date: Tue Feb 11 16:05:29 2025 +0000
client: Fix up a few things in read_sync path
Fix up a few things in read_sync path
1. File size may not be updated locally, do not check for trim read
2. Do not get_cap before RMW, each do_write takes care of having proper caps
Fixes: https://tracker.ceph.com/issues/69796
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
diff --git a/src/client/Client.cc b/src/client/Client.cc
index af8feef7d1f..8522ae35d0c 100644
--- a/src/client/Client.cc
+++ b/src/client/Client.cc
@@ -11601,12 +11601,6 @@ int Client::_read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
auto effective_size = in->effective_size();
- // trim read based on file size?
- if (off >= in->effective_size())
- return 0;
- if (len == 0)
- return 0;
-
auto target_len = std::min(len, effective_size - off);
uint64_t read_start;
uint64_t read_len;
@@ -11645,7 +11639,6 @@ int Client::_read_sync(Fh *f, uint64_t off, uint64_t len, bufferlist *bl,
left -= r;
pbl->claim_append(tbl);
}
- auto effective_size = (fscrypt_denc ? in->effective_size() : in->size);
// short read?
if (r >= 0 && r < wanted) {
@@ -12485,9 +12478,7 @@ int64_t Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf,
filer_iofinish.reset(new C_OnFinisher(new C_Lock_Client_Finisher(this, iofinish.get()), &objecter_finisher));
}
- get_cap_ref(in, CEPH_CAP_FILE_BUFFER);
-
- enc_mgr->read_modify_write(iofinish.get());
+ enc_mgr->read_modify_write(filer_iofinish.get());
if (onfinish) {
// handle non-blocking caller (onfinish != nullptr), we can now safely
Actions