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
This acquires a lock which is a no-no in the messenger. Signed-off-by: Patrick Donnelly <[email protected]>
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 <[email protected]>
Ancillary change: do not do client upkeep after map processing. Signed-off-by: Patrick Donnelly <[email protected]>
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 <[email protected]>
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 <[email protected]>
Instead of marking the message as handled, give another component (or Client) a chance to process. Signed-off-by: Patrick Donnelly <[email protected]>
|
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'.
man fchownat(2)[1] says the following:
. . .
AT_EMPTY_PATH (since Linux 2.6.39)
If pathname is an empty string, operate on the file referred to by
dirfd (which may have been obtained using the open(2) O_PATH flag).
In this case, dirfd can refer to any type of file, not just a
directory. If dirfd is AT_FDCWD, the call operates on the current
working directory.
. . .
Look out for an empty pathname and use the relative fd's inode in the
presence of AT_EMPTY_PATH flag before calling internal _setattr().
Fixes: https://tracker.ceph.com/issues/68189
Review with: git show -w
Note: path_walk() refactor from ceph#60746
incorporates the core changes required here and thus src/libcephfs.cc
changes have been removed from the cherry-pick as they conflict at the
same time.
[1] https://www.man7.org/linux/man-pages/man2/fchownat.2.html
Signed-off-by: Anoop C S <[email protected]>
(cherry picked from commit 829f388)
man statx(2)[1] says the following:
. . .
AT_EMPTY_PATH
If pathname is an empty string, operate on the file referred to by
dirfd (which may have been obtained using the open(2) O_PATH flag).
In this case, dirfd can refer to any type of file, not just a
directory.
If dirfd is AT_FDCWD, the call operates on the current working
directory.
. . .
Look out for an empty pathname and use the relative fd's inode in the
presence of AT_EMPTY_PATH flag before calling internal _getattr().
Fixes: https://tracker.ceph.com/issues/68189
Review with: git show -w
Note: path_walk() refactor from ceph#60746
incorporates the core changes required here and thus src/libcephfs.cc
changes have been removed from the cherry-pick as they conflict at the
same time.
[1] https://www.man7.org/linux/man-pages/man2/statx.2.html
Signed-off-by: Anoop C S <[email protected]>
(cherry picked from commit edd7fe7)
man fchownat(2)[1] says the following:
. . .
AT_EMPTY_PATH (since Linux 2.6.39)
If pathname is an empty string, operate on the file referred to by
dirfd (which may have been obtained using the open(2) O_PATH flag).
In this case, dirfd can refer to any type of file, not just a
directory. If dirfd is AT_FDCWD, the call operates on the current
working directory.
. . .
Look out for an empty pathname and use the relative fd's inode in the
presence of AT_EMPTY_PATH flag before calling internal _setattr().
Fixes: https://tracker.ceph.com/issues/68189
Review with: git show -w
Note: path_walk() refactor from ceph#60746
included the core changes required here and thus src/client/Client.cc
changes have been removed from the cherry-pick as they conflict at the
same time.
[1] https://www.man7.org/linux/man-pages/man2/fchownat.2.html
Signed-off-by: Anoop C S <[email protected]>
(cherry picked from commit 829f388)
man statx(2)[1] says the following:
. . .
AT_EMPTY_PATH
If pathname is an empty string, operate on the file referred to by
dirfd (which may have been obtained using the open(2) O_PATH flag).
In this case, dirfd can refer to any type of file, not just a
directory.
If dirfd is AT_FDCWD, the call operates on the current working
directory.
. . .
Look out for an empty pathname and use the relative fd's inode in the
presence of AT_EMPTY_PATH flag before calling internal _getattr().
Fixes: https://tracker.ceph.com/issues/68189
Review with: git show -w
Note: path_walk() refactor from ceph#60746
included the core changes required here and thus src/client/Client.cc
changes have been removed from the cherry-pick as they conflict at the
same time.
[1] https://www.man7.org/linux/man-pages/man2/statx.2.html
Signed-off-by: Anoop C S <[email protected]>
(cherry picked from commit edd7fe7)
| 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