This commit fixes documentation about many-to-many topic relationship for notifications. The current sentence states the same fact twice instead of clarifying.
Patrick Donnelly [Wed, 19 Mar 2025 11:59:23 +0000 (07:59 -0400)]
Merge PR #62095 into squid
* refs/pull/62095/head:
include/cephfs: dump optmetadata
mds: set alternate_name for new fullbit dentries
qa: test alternate_name recovery during mds failover
client: avoid multiple calls to path_walk
libcephfs: getcwd after chdir for API constraint
client: unwrap dentries for getcwd
client: refactor / optimize chdir
test/libcephfs: test getcwd with case insensitive dir
test/libcephfs: refactor ManyNestedDirs
include/filepath: add iterators for components
cmake/cephfs: fix options to enable client and dependencies
pybind/cephfs: use legacy noexcept for cdefs for cython 3.Y.Z
pybind/cephfs: increment ref before calling out to c++
client: skip unexpected command replies
mgr: indicate map message is acked instead of unhandled
osdc/Objecter: convert to ms_dispatch2 for ack
client: indicate maps are acked not processed
msg: add alternate statuses for ms_dispatch2 handling
tools/cephfs_mirror: do not process maps with fast dispatch
doc: add docs for volumes interface for charmap
qa: add tests for subvolume charmap settings
pybind/mgr/volumes: wire up charmap for subvol/subvolgroup
pybind/mgr: send MDS commands through cephfs client
pybind/cephfs: wire up mds_command2
mgr: add module method to send notifications
libcephfs: add mds_command2 for asynchronous commands
mgr: excise CephFS client from mgr C++ base
mgr: use std namespace
doc: add docs for CephFS charmap config
qa: add charmap tests
qa: add helpful exceptions for attr changes
qa: ignore libicu leaks
client: add wrappings for charmap manipuluation of dentry names
client: add dir_result_t::dentry::print
win32: add libicu Windows build
CMakeLists: add boost::locale dependency for client
install-deps: unconditionally install boost libraries
test/libcephfs: update root operation return values
client: refactor all path traversals through path_walk
test/libcephfs: test parallel creates
test/libcephfs: add test for lookup failure after readdir
client: init dentry shared_gen with invalid value
client: add _lookup debugging
client: remove redundant check
client: dump InodeStat from mds
mds: encode optmetadata in InodeStat sent to clients
mds: check client features for charmap
mds: add client feature bit for charmap
mds: wire up vxattr for changing charmap
mds: inherit charmap on mkdir
mds,include: add charmap optmetadata
mds,include: add inode_t optional metadata
client: hide alternate_name from API
client: move alternate_name once
client: optimize alternate_name passing to helper
client: relocate definition
client: print dentry with alternate_name on dump
client: move inode dump to print method
mds: add debugging for encoding lease stat
mds: make encode_lease a proper method
mds: add fscrypt metadata for inode stat size
client: use DentryRef for ref counting in MetaRequest
client: add DentryRef
client: add helper for determining if a perm check is necessary
client: cache client_permissions config
client: add debugging for conf changes
client: sort configs
client/UserPerm: add print method
client: note mount parameters in debug log
client: print stat mode in octal
common: add missing op string
include/filepath: add empty path check
python-common: add a utils function to replace distutils.util.strtobool
Reviewed-by: Anthony D Atri <anthony.datri@gmail.com>
Conflicts:
src/pybind/mgr/dashboard/frontend/package-lock.json (conflicts
with typescript package version, kept the existing one)
src/pybind/mgr/dashboard/frontend/package.json (conflicts with
typescript package version, kept the existing one)
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-migrate/rgw-multisite-migrate.component.ts (conflicts with automated system user creation in main)
src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts (conflicts with oauthAddressTest validator)
Patrick Donnelly [Tue, 11 Mar 2025 14:28:01 +0000 (10:28 -0400)]
client: avoid multiple calls to path_walk
When we wrap a dname after a path walk, we cannot do another path walk.
Originally this method was setup to permit that but with (upcoming) encryption
it cannot work. The dname from the path_walk is in the encrypted namespace so
we cannot do another lookup in a second path_walk.
Patrick Donnelly [Tue, 11 Mar 2025 16:13:33 +0000 (12:13 -0400)]
test/libcephfs: test getcwd with case insensitive dir
Unfortunately, it's not easy to refactor this test into a shared method without
setting up an explicit test class which has been avoided up to this point. So
I'm going to just copy the code. Sorry.
pybind/cephfs: use legacy noexcept for cdefs for cython 3.Y.Z
For some newer versions of cython, it appears it requires explicitly specifying
noexcept but old versions of Cython 0.29.Z do not understand that attribute.
pybind/cephfs: increment ref before calling out to c++
At the time this construction seemed safe since the caller should have a
reference but it could conveivably be the only ref. We don't want the ref count
to reach 0.
Additionally, catch errors so this callback is genuinely noexcept.
Patrick Donnelly [Tue, 18 Feb 2025 17:41:52 +0000 (12:41 -0500)]
msg: add alternate statuses for ms_dispatch2 handling
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:
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.
Patrick Donnelly [Thu, 30 Jan 2025 22:08:07 +0000 (17:08 -0500)]
mgr: excise CephFS client from mgr C++ base
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.
Patrick Donnelly [Thu, 30 Jan 2025 22:05:25 +0000 (17:05 -0500)]
mgr: use std namespace
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.
If we add a new Boost component, the install-deps.sh script will not install it
because other Boost libraries are installed with the desired version. Just
unconditionally install. The package manager is smart enough to skip already
installed packages.
Switch from EBUSY to reasonable and normal errors for operations on the root
directory. Use the Client::path_walk machinery changes from the previous commit
to catch most of them, otherwise return EINVAL (which is normal for other POSIX
fs).
Fixes: 6ed7f2364ae5507bab14c60b582929aa7b0ba400 Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 292f5ac45b8190223e97b3f9ae5904605de7a888)
Patrick Donnelly [Thu, 14 Nov 2024 18:28:20 +0000 (13:28 -0500)]
client: refactor all path traversals through path_walk
This is groundwork to ensure that all code paths properly apply dentry name
transformations during traversal, specifically for casefolding.
Note some ancillary changes:
* readlink now correctly does lookup permission checks during path walk (previously a TODO).
* There has been some tweaking of the method signatures to accept an `const
InodeRef&`. This was convenient when passing walk_dentry_result::diri around
but the cascade in changes prompted me to leave it partially done to avoid
blowing up this changeset.
It's worth noting that this change is somewhat "half done". I had made an
effort to have all operations (whether fuse or libcephfs) call path_walk once.
This was done for Client::_mkdir and a few others. See for example:
- do_mkdirat -> _mkdir
- mksnap -> _mkdir
- ll_mkdir -> _mkdir
- mkdirs -> _mkdir (this had other significant simplification/cleanup);
however: note that we still have two calls to path_walk for any given
directory to be created. This is not a problem because:
Client::path_walk is now more tolerant of being called in a openat-style way.
The method now accepts an anchor directory and relative path (which may be a
single dentry name for ll_* calls). It is also tolerant of the directory inode
in fact referencing the target inode with relative path == "". That is a useful
property for many openat-style APIs (although largely unofficially). It also
means that if we resolve a path then we can pass the resolved Inode (directory)
/ string (Dentry name) pair to another method which may also call path_walk
with minimal replication of path walk work. This is done a few times in this
changeset.
Fixes: https://tracker.ceph.com/issues/66373 Fixes: https://tracker.ceph.com/issues/70100 Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit b8662fdb03373ed6d29c47efa94cd391a7c9e740)
Conflicts:
src/client/Client.cc: minor code differences
Patrick Donnelly [Wed, 19 Feb 2025 17:49:09 +0000 (12:49 -0500)]
client: init dentry shared_gen with invalid value
Directories and dentries are initialized with value 0 which makes detecting a
null (or placeholder) dentry created via Client::get_or_create difficult. We
already do checks to see if a dentry is invalid when the directory's shared_gen
changes so use an invalid value for these synthetic dentries until they can be
appropriately updated from Client::update_dentry_lease.
Patrick Donnelly [Tue, 10 Sep 2024 20:47:39 +0000 (16:47 -0400)]
client: hide alternate_name from API
The dentry alternate_name was exposed primarily to facilitate testing. Instead,
put these methods in the TestClient scaffolding to allow reading/manipulating
alternate_name.
Because we will be using alternate_name to handle encrypted names and the
normalized / case folded name, we do not want the application to change the
meaning of the metadata out-of-band.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com> Fixes: https://tracker.ceph.com/issues/66373
(cherry picked from commit 1e34963af11210ebd940e20219728b91031e720f)