client,mds: case-insensitive directory trees#60746
Conversation
|
I'm aware there are some clang build failures. Will address tomorrow. |
6f9e321 to
fc5ff2e
Compare
5a78761 to
3b7e55e
Compare
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
This C++ code was relying on the Client.h header to bring in these names from the std:: namespace. A subsequent commit plans to remove that header so add namespace qualifier now. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Linking to the client causes two copies of the Client library to be linked in the ceph-mgr when modules also dynamically link to libcephfs via the "cephfs" python library. This creates problems with duplicate boost::locale. Instead, modules should just use the "cephfs" library to send commands to the MDS. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
For use by MgrModule.send_command to signal MDS command completion. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
To avoid linking to the CephFS client statically, use the dynamically-linked `cephfs` module to send commands to the MDS. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
This acquires a lock which is a no-no in the messenger. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Many dispatchers return false to allow other dispatchers also common messages
like MOSDMap or MFSMap. They implicitly depend on some dispatcher which is
always at the "tail" of the dispatcher queue to return "true" indicating the
msg was processed to avoid messages like:
2025-02-18T05:31:17.738+0000 7f5206546640 0 ms_deliver_dispatch: unhandled message 0x5632d05f0700 fsmap(e 9) from mon.0 v2:172.21.3.230:40412/0
but this cannot always happen when some libraries like the RadosClient used standalone.
So, add a variant for encapsulating other indications for how the message was
processed by dispatch2. For example, a message may be "acknowledged" but
explicitly allow other dispatchers to try processing the message.
Note: we're using a variant to avoid updating all of the ms_dispatch code to
use the sentinel classes.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Ancillary change: do not do client upkeep after map processing. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Convert ms_dispatch to ms_dispatch2 to enable indicating that a map message is acknowledged and instead of processed (or deliberately not processed). Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
This avoids messages like:
2025-02-18T05:31:17.738+0000 7f5206546640 0 ms_deliver_dispatch: unhandled message 0x5632d05f0700 fsmap(e 9) from mon.0 v2:172.21.3.230:40412/0
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Instead of marking the message as handled, give another component (or Client) a chance to process. Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
|
Adding the QA test changes added for https://tracker.ceph.com/issues/70197#note-5 |
|
jenkins test api |
|
Approved on the basic of QA runs (mostly) and implementation which I went through a while back. This is good to merge. |
Thanks Venky! |
|
|
||
| if(WITH_LIBCEPHFS) | ||
| find_package(ICU REQUIRED COMPONENTS uc i18n) | ||
| list(APPEND BOOST_COMPONENTS locale) |
There was a problem hiding this comment.
the client target depends on Boost::locale, but is not conditional on WITH_LIBCEPHFS. i raised #62108 to fix compilation when WITH_LIBCEPHFS=OFF
| with nogil: | ||
| ret = ceph_mds_command2(self.cluster, _mds_spec, |
There was a problem hiding this comment.
any idea why this doesn't build on fedora with python 3.13?
performance hint: cephfs.pyx:114:5: Exception check on 'completion_callback' will always require the GIL to be acquired.
Possible solutions:
1. Declare 'completion_callback' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
2. Use an 'int' return type on 'completion_callback' to allow an error code to be returned.
Error compiling Cython file:
------------------------------------------------------------
...
with nogil:
ret = ceph_mds_command2(self.cluster, _mds_spec,
<const char **>_cmd, _cmdlen,
<const char*>_inbuf, _inbuf_len,
_one_shot,
completion_callback,
^
------------------------------------------------------------
cephfs.pyx:2324:40: Cannot assign type 'void (int, const void *, size_t, const void *, size_t, void *) except * nogil' to 'libcephfs_c_completion_t' (alias of 'void (*)(int, const void *, size_t, const void *, size_t, void *) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'completion_callback'.
| if (struct_v >= 8) { | ||
| decode(optmetadata, p); | ||
| } |
There was a problem hiding this comment.
@batrick now that the struct version is bumped up to 8, shouldn't the decode macro at the top also reflect the bumped up version, i.e. DECODE_START(8, p);
There was a problem hiding this comment.
Yes, I think so. In this case it's a harmless omission because the compatv did not increase.
Since you found it, would you like to make the change?
This is the PR of the case-insensitive tree work in CephFS. Comments welcome.
TODO:
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e