]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
24 hours agodoc/rbd/rbd-config-ref: add clone settings section 66172/head
Ilya Dryomov [Fri, 7 Nov 2025 19:05:22 +0000 (20:05 +0100)]
doc/rbd/rbd-config-ref: add clone settings section

Expose rbd_default_clone_format option which has a fairly comprehensive
description (much more verbose than most other options, anyway).  This
should help with understanding the difference between clone v1 and v2.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
29 hours agoMerge pull request #65795 from cbodley/wip-cmake-rgw-posix-dbstore
Casey Bodley [Fri, 7 Nov 2025 14:14:47 +0000 (09:14 -0500)]
Merge pull request #65795 from cbodley/wip-cmake-rgw-posix-dbstore

cmake/rgw: WITH_RADOSGW_POSIX depends on WITH_RADOSGW_DBSTORE

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
32 hours agoMerge pull request #66159 from rhcs-dashboard/73753-about-component-close-modal-tooltip
Nizamudeen A [Fri, 7 Nov 2025 11:33:30 +0000 (17:03 +0530)]
Merge pull request #66159 from rhcs-dashboard/73753-about-component-close-modal-tooltip

mgr/dashboard : fix - about model tooltip issue

Reviewed-by: Nizamudeen A <nia@redhat.com>
37 hours agomgr/dashboard : fix - about model tooltip issue 66159/head
Devika Babrekar [Fri, 7 Nov 2025 06:51:37 +0000 (12:21 +0530)]
mgr/dashboard : fix - about model tooltip issue
fixes : https://tracker.ceph.com/issues/73753
Signed-off-by: Devika Babrekar <devika.babrekar@ibm.com>
2 days agoMerge pull request #66123 from ivancich/wip-fix-unlink-old-shard
J. Eric Ivancich [Thu, 6 Nov 2025 16:00:11 +0000 (11:00 -0500)]
Merge pull request #66123 from ivancich/wip-fix-unlink-old-shard

rgw: fix `radosgw-admin object unlink ...`

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 days agoMerge pull request #66107 from yuvalif/wip-yuval-fix-typo
Casey Bodley [Thu, 6 Nov 2025 14:48:14 +0000 (09:48 -0500)]
Merge pull request #66107 from yuvalif/wip-yuval-fix-typo

rgw/frontend: fix typo in function name

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 days agoMerge pull request #65465 from knrt10/wip-kautilya-renable-testmigration
Matan Breizman [Thu, 6 Nov 2025 14:36:58 +0000 (16:36 +0200)]
Merge pull request #65465 from knrt10/wip-kautilya-renable-testmigration

crimson/osd: fix assertion fail in prepare_clone

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
2 days agoMerge PR #66036 into main
Venky Shankar [Thu, 6 Nov 2025 14:25:03 +0000 (19:55 +0530)]
Merge PR #66036 into main

* refs/pull/66036/head:

Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
Reviewed-by: Christopher Hoffman <choffman@redhat.com>
2 days agoMerge PR #66025 into main
Venky Shankar [Thu, 6 Nov 2025 14:23:57 +0000 (19:53 +0530)]
Merge PR #66025 into main

* refs/pull/66025/head:

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
2 days agoMerge pull request #61137 from chrisphoffman/wip-fscrypt
Venky Shankar [Thu, 6 Nov 2025 14:18:41 +0000 (19:48 +0530)]
Merge pull request #61137 from chrisphoffman/wip-fscrypt

libcephfs: FSCrypt userspace implementation

Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2 days agoMerge pull request #66147 from chungfengz-syno/fix-bluefs-bytes-written-slow-counter
Igor Fedotov [Thu, 6 Nov 2025 14:15:49 +0000 (17:15 +0300)]
Merge pull request #66147 from chungfengz-syno/fix-bluefs-bytes-written-slow-counter

bluestore/BlueFS: fix bytes_written_slow counter with aio_write

Reviewed-by: Igor Fedotov <igor.fedotov@clyso.com>
2 days agotest/librbd: Remove crimson skip from TestDeepCopy 65465/head
Kautilya Tripathi [Wed, 24 Sep 2025 05:20:06 +0000 (05:20 +0000)]
test/librbd: Remove crimson skip from TestDeepCopy

The TestDeepCopy.Stress and TestDeepCopy.Stress_SmallerDstObjSize tests
were previously skipped for the crimson store. This commit removes the
SKIP_IF_CRIMSON() calls, indicating that the tests should now pass with
the crimson osd.

Fixes: https://tracker.ceph.com/issues/72042
Signed-off-by: Kautilya Tripathi <kautilya.tripathi@ibm.com>
2 days agotest/librbd: Reenable tests for Migration
Kautilya Tripathi [Tue, 16 Sep 2025 11:14:09 +0000 (11:14 +0000)]
test/librbd: Reenable tests for Migration

This removes the SKIP_IF_CRIMSON and reenables the test.

Signed-off-by: Kautilya Tripathi <kautilya.tripathi@ibm.com>
2 days agocrimson/osd: fix assertion fail in prepare_clone
Kautilya Tripathi [Tue, 9 Sep 2025 10:22:52 +0000 (10:22 +0000)]
crimson/osd: fix assertion fail in prepare_clone

Ops like rbd.assert_snapc_seq can return -ERANGE, but we were preparing
clones in OpsExecuter constructor before guard evaluation.

On retry with sparse_copyup, this led to ceph_assert(!existed) in
prepare_clone() due to the pre-created clone OBC.

This adds precise OBC invalidation during rollback using single key
clear.

Fixes: https://tracker.ceph.com/issues/72705
Fixes: https://tracker.ceph.com/issues/72709
Fixes: https://tracker.ceph.com/issues/72041
Fixes: https://tracker.ceph.com/issues/72650
Signed-off-by: Kautilya Tripathi <kautilya.tripathi@ibm.com>
2 days agoMerge pull request #65953 from VinayBhaskar-V/wip-VinayBhaskar-V-73528
Ilya Dryomov [Thu, 6 Nov 2025 11:53:37 +0000 (12:53 +0100)]
Merge pull request #65953 from VinayBhaskar-V/wip-VinayBhaskar-V-73528

rbd-mirror: allow incomplete demote snapshot to sync after rbd-mirror daemon restart

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2 days agoMerge pull request #65849 from mohit84/lock_excl_wait
Matan Breizman [Thu, 6 Nov 2025 11:08:23 +0000 (13:08 +0200)]
Merge pull request #65849 from mohit84/lock_excl_wait

crimson: Implement a  lock_excl_wait wrapper

Reviewed-by: Radosław Zarzyński <rzarzyns@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
2 days agobluestore/BlueFS: fix bytes_written_slow counter with aio_write 66147/head
chungfengz [Thu, 6 Nov 2025 09:46:51 +0000 (09:46 +0000)]
bluestore/BlueFS: fix bytes_written_slow counter with aio_write

The bytes_written_slow performance counter was incorrectly reporting
0 when using async I/O.

When aio_write() is called with a bufferlist, it uses claim_append()
to transfer ownership of the buffer to the aio structure, leaving the
source bufferlist empty. Using t.length() after aio_write() returns 0
instead of the actual bytes written.

Fix by using the pre-calculated x_len value which contains the actual
write size and is not affected by the buffer ownership transfer.

Fixes: https://tracker.ceph.com/issues/73735
Signed-off-by: chungfengz <chungfengz@synology.com>
2 days agoclient: fix dump_mds_requests to valid json format 66025/head
haoyixing [Wed, 22 Oct 2025 11:24:18 +0000 (11:24 +0000)]
client: fix dump_mds_requests to valid json format

Usually asok command output will be valid json, but mds_requests
outputs duplicate key "request", which is not convenient for
subsequent parsing.

Fixes: http://tracker.ceph.com/issues/73639
Signed-off-by: haoyixing <haoyixing03@kuaishou.com>
2 days agoMerge pull request #66089 from rhcs-dashboard/secure-alerts-smtp
Nizamudeen A [Thu, 6 Nov 2025 03:50:08 +0000 (09:20 +0530)]
Merge pull request #66089 from rhcs-dashboard/secure-alerts-smtp

mgr/alerts: enforce ssl context to SMTP_SSL

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2 days agoMerge pull request #66103 from rhcs-dashboard/fix-cephadm-e2e
Nizamudeen A [Thu, 6 Nov 2025 03:46:22 +0000 (09:16 +0530)]
Merge pull request #66103 from rhcs-dashboard/fix-cephadm-e2e

mgr/dashboard: fix cephadm e2e failure

Reviewed-by: Naman Munet <nmunet@redhat.com>
2 days agocrimson: Move send_to_osd call outside with_obc lambda 65849/head
Mohit Agrawal [Thu, 16 Oct 2025 10:58:08 +0000 (16:28 +0530)]
crimson: Move send_to_osd call outside with_obc lambda

The with_obc() function acquires a lock before invoking the
lambda it wraps. Earlier the lambda itself called send_to_osd()
which returns a future to with_obc. If a future is not resolved
immediately and a response could arrive and trigger
handle_pull_response() which attempts to acquire an exclusive lock.

Because a future is not returned yet to with_obc() so the original
lock is still holding by with_obc and handle_pull_response() throw
an assertion failure due to that osd is crashed.

Solution: Move send_to_osd() call outside with_obc lambda so that
the lock is released before handle_pull_response() is triggered.

Fixed: https://tracker.ceph.com/issues/71861
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
3 days agoMerge PR #66130 into main
Patrick Donnelly [Wed, 5 Nov 2025 14:59:16 +0000 (09:59 -0500)]
Merge PR #66130 into main

* refs/pull/66130/head:
.github/workflow: Disable cron based github actions on forks

Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
3 days agodoc: Add fscrypt documentation 61137/head
Christopher Hoffman [Mon, 3 Nov 2025 16:47:55 +0000 (16:47 +0000)]
doc: Add fscrypt documentation

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agocephfs: Only build client with fscrypt on linux
Christopher Hoffman [Thu, 16 Oct 2025 17:33:05 +0000 (17:33 +0000)]
cephfs: Only build client with fscrypt on linux

Do not build client with fscrypt on non-linux distros.

Fixes: https://tracker.ceph.com/issues/70324
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agopython-common/ceph: Fix lint and various python errors
Christopher Hoffman [Thu, 23 Oct 2025 15:16:25 +0000 (15:16 +0000)]
python-common/ceph: Fix lint and various python errors

Fix various python bindings and linting issues that
arose from libcephfs fscrypt testing in pipeline.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Do not check file size during trim read
Christopher Hoffman [Tue, 28 Oct 2025 12:46:34 +0000 (12:46 +0000)]
client: Do not check file size during trim read

The commit 154b86743b52 reverted part of the fix seen in 2b74598afc.
This commit will reapply any missing changes of the fix.

Fixes: https://tracker.ceph.com/issues/73416
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agotest/client: When testing large io, consider fscrypt
Christopher Hoffman [Mon, 20 Oct 2025 18:33:17 +0000 (18:33 +0000)]
test/client: When testing large io, consider fscrypt

When testing large io sizes and clamping that io, consider
fscrypt max io size. This max io size should be a multiple
of 4K (fscrypt block size), but not to exceed INT_MAX.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Use nearest fscrypt block when clamping max io size
Christopher Hoffman [Mon, 20 Oct 2025 18:15:11 +0000 (18:15 +0000)]
client: Use nearest fscrypt block when clamping max io size

A max io size can currently be up to INT_MAX. If it is greater,
then clamp the size to INT_MAX. This conflicts with fscrypt io
operations. An fscrypt, op needs to read a whole fscrypt block.
The size of fscrypt block size is 4K, INT_MAX % 4K is not equal
to 0. Therefore, get the nearest multiple of 4K to INT_MAX that
does not go over. In the fscrypt case, this value will be used
for clamping max io size.

Fixes: https://tracker.ceph.com/issues/73346
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa: Do not use ec_profile with fscrypt dummy
Christopher Hoffman [Tue, 14 Oct 2025 14:33:47 +0000 (14:33 +0000)]
qa: Do not use ec_profile with fscrypt dummy

Once a volume/filesystem is set to use fscrypt encryption, layout
cannot be changed. The configurable ec_profile, sets layout and
will fail.

Fixes: https://tracker.ceph.com/issues/73461
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Do not expose ceph_fscrypt_key_identifier in api
Christopher Hoffman [Thu, 2 Oct 2025 14:12:32 +0000 (14:12 +0000)]
client: Do not expose ceph_fscrypt_key_identifier in api

The libcephfs API call add_fscrypt_key exposes an internal fscrypt
data structure. This is because a hash keyid (of the master key) is used
for calls such as remove_fscrypt_key. Instead of using this structure,
use a char array to obtain keyid.

Fixes: https://tracker.ceph.com/issues/63293
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa: Grant ALL caps fscrypt integration tests
Christopher Hoffman [Wed, 1 Oct 2025 14:02:40 +0000 (14:02 +0000)]
qa: Grant ALL caps fscrypt integration tests

ALL caps are now needed for when setting fscrypt policy

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agomds: When setting fscrypt attrs ensure client has ALL caps
Christopher Hoffman [Mon, 29 Sep 2025 13:14:01 +0000 (13:14 +0000)]
mds: When setting fscrypt attrs ensure client has ALL caps

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: During fscrypt get policy do not display inbuf
Christopher Hoffman [Mon, 29 Sep 2025 14:02:32 +0000 (14:02 +0000)]
client: During fscrypt get policy do not display inbuf

When calling get encryption policy via ioctl, do not display
the hex str of inbuf. This buffer is not used/uninitialized
so no need to display.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: clean up warnings in client
Christopher Hoffman [Tue, 23 Sep 2025 14:58:32 +0000 (14:58 +0000)]
client: clean up warnings in client

Fix warnings/errors in ceph API tests that are present in various files
that were introduced by fscrypt feature

src/client/FSCrypt.cc:90:6: error: variable 'olen' set but not used [-Werror,-Wunused-but-set-variable]
   90 |         int olen = 0;
      |             ^
src/client/FSCrypt.cc:91:6: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
   91 |         int line = 0;
      |             ^
src/client/FSCrypt.cc:945:2: error: is this the way to do it? [-Werror,-W#warnings]
  945 | #warning is this the way to do it?
src/client/Client.cc:11850:2: error: read holes [-Werror,-W#warnings]
 11850 | #warning read holes
       |  ^
src/client/Client.cc:11855:2: error: implement file read here [-Werror,-W#warnings]
 11855 | #warning implement file read here
       |  ^
src/client/Inode.cc:847:2: error: need to make sure that we do not skip entire subtree somehow [-Werror,-W#warnings]
  847 | #warning need to make sure that we do not skip entire subtree somehow
      |  ^

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: clean up warnings in fscrypt
Christopher Hoffman [Tue, 23 Sep 2025 14:58:32 +0000 (14:58 +0000)]
client: clean up warnings in fscrypt

Fix warnings/errors in ceph API tests that are present in FSCrypt.cc

src/client/FSCrypt.cc:90:6: error: variable 'olen' set but not used [-Werror,-Wunused-but-set-variable]
   90 |         int olen = 0;
      |             ^
src/client/FSCrypt.cc:91:6: error: variable 'line' set but not used [-Werror,-Wunused-but-set-variable]
   91 |         int line = 0;
      |             ^
src/client/FSCrypt.cc:945:2: error: is this the way to do it? [-Werror,-W#warnings]
  945 | #warning is this the way to do it?

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa: Add fscrypt dummy encryption to fs workloads
Christopher Hoffman [Wed, 17 Sep 2025 16:48:48 +0000 (16:48 +0000)]
qa: Add fscrypt dummy encryption to fs workloads

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agotest: Add test for fscrypt dummy encryption
Christopher Hoffman [Wed, 17 Sep 2025 15:47:44 +0000 (15:47 +0000)]
test: Add test for fscrypt dummy encryption

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Add fscrypt dummy encryption
Christopher Hoffman [Tue, 2 Sep 2025 14:31:52 +0000 (14:31 +0000)]
client: Add fscrypt dummy encryption

Add fscrypt dummy encryption to client. This will allow
for mounting a cephfs volume without providing any fscrypt
information. This will allow for more straightforward setup
for development and test suites.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agotest: Clean up after fscrypt unit tests
Christopher Hoffman [Fri, 29 Aug 2025 14:29:24 +0000 (14:29 +0000)]
test: Clean up after fscrypt unit tests

After each fscrypt unit test clean up after each
unit test.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agolibcephfs: ll_set_fscrypt_policy_v2 - use in->dirstat
Marcus Watts [Sat, 28 Jun 2025 00:56:05 +0000 (20:56 -0400)]
libcephfs: ll_set_fscrypt_policy_v2 - use in->dirstat

Better check for empty direcotry.
It turns out in->dirstat contains a count of files and subdirectories
from a directory, so all we have to do is make sure that's valid.

Resolves: rhbz#2376757
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit ba233f2dda3cf30c67b653b065e9ed47d42cb9d6)

3 days agoclient: ll_set_fscrypt_policy_v2 separate "directory empty" logic
Marcus Watts [Sat, 28 Jun 2025 00:56:05 +0000 (20:56 -0400)]
client: ll_set_fscrypt_policy_v2 separate "directory empty" logic

Move "directory empty" logic to new method "_is_empty_directory".
Future logic will not be a one-liner, so let's keep it separate.

Resolves: rhbz#2376757
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit f0cf85a595876165e2c0eb2ca584e97f44971f9d)

3 days agotest/pybind/cephfs: add tests for fcopyfile()
Rishabh Dave [Mon, 21 Jul 2025 11:34:56 +0000 (17:04 +0530)]
test/pybind/cephfs: add tests for fcopyfile()

Signed-off-by: Rishabh Dave <ridave@redhat.com>
3 days agoclient: in fcopyfile(), update len to read only leftover fragment
Rishabh Dave [Wed, 16 Jul 2025 16:04:18 +0000 (21:34 +0530)]
client: in fcopyfile(), update len to read only leftover fragment

fcopyfile() reads 1 MiB of data every time but when a fragment smaller
than 1 MiB is left, it still reads 1 MiB of data, causing to never meet
the condition of "off == size". This leads to an infinity loop which
continues to write until CephFS becomes full.

Resolves: rhbz#2379716
Fixes: https://tracker.ceph.com/issues/72238
Signed-off-by: Rishabh Dave <ridave@redhat.com>
3 days agotest: Test unsupported fscrypt policy
Christopher Hoffman [Thu, 21 Aug 2025 19:24:48 +0000 (19:24 +0000)]
test: Test unsupported fscrypt policy

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Check for supported fscrypt policy
Christopher Hoffman [Thu, 21 Aug 2025 19:23:44 +0000 (19:23 +0000)]
client: Check for supported fscrypt policy

When setting a policy on a directory, check to make sure
policy is supported.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa/cephfs: Add test case for enctag too long
Christopher Hoffman [Wed, 20 Aug 2025 19:57:39 +0000 (19:57 +0000)]
qa/cephfs: Add test case for enctag too long

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agomgr/volumes: Enforce enctag max size
Christopher Hoffman [Wed, 20 Aug 2025 19:36:14 +0000 (19:36 +0000)]
mgr/volumes: Enforce enctag max size

Introduce enctag max length. Include error messages when
outside of range.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa: Add interop testing between fscrypt fuse and kclient
Christopher Hoffman [Thu, 19 Jun 2025 13:01:46 +0000 (13:01 +0000)]
qa: Add interop testing between fscrypt fuse and kclient

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: make FSCryptDecryptedInodes std::shared_ptr
Christopher Hoffman [Mon, 18 Aug 2025 19:39:07 +0000 (19:39 +0000)]
client: make FSCryptDecryptedInodes std::shared_ptr

To help eliminate memory leaks, use std::shared_ptr
for keeping track of FSCryptDecryptedInodes instances.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agolibcephfs: Include libcephfs.h def for ceph_get_fscrypt_key_status
Christopher Hoffman [Wed, 13 Aug 2025 15:45:37 +0000 (15:45 +0000)]
libcephfs: Include libcephfs.h def for ceph_get_fscrypt_key_status

The libcephfs api header definition for call ceph_get_fscrypt_key_status
was not defined. Define this api call in libcephfs.h.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agodoc/cephfs, qa/cephfs: Reword some documentation.
Christopher Hoffman [Wed, 13 Aug 2025 16:10:12 +0000 (16:10 +0000)]
doc/cephfs, qa/cephfs: Reword some documentation.

Reword some documentation for enctag and mount.py
function descriptions.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: During fscrypt write skip unneeded reads
Christopher Hoffman [Tue, 12 Aug 2025 13:14:57 +0000 (13:14 +0000)]
client: During fscrypt write skip unneeded reads

During an fscrypt write a read may be needed to ensure changed
portion of file is merged with an existing data block. No need
to read unnecessarily when writes line up to fscrypt block and
span a whole block or more.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa/tasks/vstart_runner.py: remove write_file from LocalRemote
Christopher Hoffman [Fri, 8 Aug 2025 13:36:37 +0000 (13:36 +0000)]
qa/tasks/vstart_runner.py: remove write_file from LocalRemote

Instead of defining write_file in vstart_runner.py, use write_file
included in remote.py. That way we do not have to maintain two
different versions.

Fixes: https://tracker.ceph.com/issues/72463
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Address misc comments
Christopher Hoffman [Wed, 30 Jul 2025 16:57:12 +0000 (16:57 +0000)]
client: Address misc comments

Removed ifdef for a failure we encountered during rebase against
case sensitive feature
-https://github.com/ceph/ceph/pull/61137#discussion_r2006324762w

Add debug dout when entering WriteEncMgr::read
-https://github.com/ceph/ceph/pull/61137#discussion_r2008140457

Remove FILE_RD mark_caps_dirty
-https://github.com/ceph/ceph/pull/61137#discussion_r2008192250

Add comment to various lines
-https://github.com/ceph/ceph/pull/61137#discussion_r2006301120
-https://github.com/ceph/ceph/pull/61137#discussion_r2006247613
-https://github.com/ceph/ceph/pull/61137#discussion_r2006251232

During write_success mark FILE_WR as dirty
-https://github.com/ceph/ceph/pull/61137#discussion_r2008210365

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: turn is_encrypted into helper
Christopher Hoffman [Wed, 30 Jul 2025 15:17:32 +0000 (15:17 +0000)]
client: turn is_encrypted into helper

Turn is_encrypted into helper functions. Add test to
validate is_encrypted.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: skip fscrypt decrypt_bl if data bl is empty.
Christopher Hoffman [Wed, 23 Jul 2025 19:11:31 +0000 (19:11 +0000)]
client: skip fscrypt decrypt_bl if data bl is empty.

Fixes: https://tracker.ceph.com/issues/72237
Fixes: https://tracker.ceph.com/issues/72192
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Match functionality of nonblocking_read_sync read_sync
Christopher Hoffman [Wed, 23 Jul 2025 19:08:08 +0000 (19:08 +0000)]
client: Match functionality of nonblocking_read_sync read_sync

If ENOENT is returned from OSDs, set r = 0 to match read_sync
functionality.

Fixes: https://tracker.ceph.com/issues/72143
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: During fscrypt rmw (write) use correct read type
Christopher Hoffman [Thu, 17 Jul 2025 19:40:59 +0000 (19:40 +0000)]
client: During fscrypt rmw (write) use correct read type

During fscrypt rmw use internal Client::_read to utilize
correct buffered or non buffered reads based on client wide
options. For example, if client_oc = false, use only
non-buffered reads in rmw.

Fixes: https://tracker.ceph.com/issues/72143
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: During fscrypt set policy check null dentries
Christopher Hoffman [Wed, 2 Jul 2025 13:50:25 +0000 (13:50 +0000)]
client: During fscrypt set policy check null dentries

During the dir empty check in set policy check null dentries.

Fixes: https://tracker.ceph.com/issues/71926
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: During fscrypt set policy bail if policy exists
Christopher Hoffman [Mon, 30 Jun 2025 19:25:13 +0000 (19:25 +0000)]
client: During fscrypt set policy bail if policy exists

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient, libcephfs: Expose fscrypt apis as low level
Christopher Hoffman [Wed, 25 Jun 2025 13:14:45 +0000 (13:14 +0000)]
client, libcephfs: Expose fscrypt apis as low level

Add low level versions of fscrypt apis to support
protocols such as NFS.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Breakout fscrypt get policy into method
Christopher Hoffman [Tue, 24 Jun 2025 19:09:07 +0000 (19:09 +0000)]
client: Breakout fscrypt get policy into method

Breakout fscrypt get policy into a method. Add
ceph_get_fscrypt_policy_v2 support.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Rework fscrypt set policy to match fscrypt specification
Christopher Hoffman [Tue, 24 Jun 2025 17:47:17 +0000 (17:47 +0000)]
client: Rework fscrypt set policy to match fscrypt specification

When an fscrypt policy is set to an existing fscrypt directory
it should only return EEXIST if policy being applied differs

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Fix logic in fscrypt hole optimization
Christopher Hoffman [Tue, 17 Jun 2025 16:44:08 +0000 (16:44 +0000)]
client: Fix logic in fscrypt hole optimization

In fscrypt decryption code path, ensure if a data block
is hit when there are holes present in adjacent blocks,
that we exit hole traversal and continue on to decrypt the block.

Fixes: https://tracker.ceph.com/issues/71602
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoAddress misc comments
Christopher Hoffman [Tue, 3 Jun 2025 15:13:16 +0000 (15:13 +0000)]
Address misc comments

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Cache client_fscrypt_as config value
Christopher Hoffman [Tue, 3 Jun 2025 18:12:30 +0000 (18:12 +0000)]
client: Cache client_fscrypt_as config value

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient, test: Remove FS_IOC_GETFLAGS and STATX_ATTR_ENCRYPTED
Christopher Hoffman [Mon, 2 Jun 2025 18:13:32 +0000 (18:13 +0000)]
client, test: Remove FS_IOC_GETFLAGS and STATX_ATTR_ENCRYPTED

Remove previous work done to support FSCrypt encrypted in
FS_IOC_GETFLAGS which changes the structure of statx ABI.
This is due to backward compatibility issues.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Skip fscrypt_last_block if in non-fscrypt mode
Christopher Hoffman [Wed, 28 May 2025 17:23:12 +0000 (17:23 +0000)]
client: Skip fscrypt_last_block if in non-fscrypt mode

Skip reading and sending fscrypt_last_block if client_fscrypt_as
is false during do_setattr. Without the key, fscrypt truncate is
not possible on fscrypt block boundary.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Implement cloning fscrypt subvolume snaps
Christopher Hoffman [Mon, 19 May 2025 18:56:20 +0000 (18:56 +0000)]
client: Implement cloning fscrypt subvolume snaps

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient, libcephfs: Add fcopyfile bindings
Christopher Hoffman [Fri, 16 May 2025 13:19:25 +0000 (13:19 +0000)]
client, libcephfs: Add fcopyfile bindings

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agopybind/mgr/volumes/fs: Prepare mgr to clone fscrypt snaps
Christopher Hoffman [Wed, 7 May 2025 14:45:45 +0000 (14:45 +0000)]
pybind/mgr/volumes/fs: Prepare mgr to clone fscrypt snaps

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa: Add tests for fscrypt subvolume
Christopher Hoffman [Mon, 12 May 2025 16:32:52 +0000 (16:32 +0000)]
qa: Add tests for fscrypt subvolume

Add various tests for fscrypt subvolumes such as
snapshots and verifying clones.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Allow for reading raw written data.
Christopher Hoffman [Thu, 8 May 2025 18:33:36 +0000 (18:33 +0000)]
client: Allow for reading raw written data.

When looking up the effective_size and the client_fscrypt_as
option is false show the inode size value. This will allow for
reading raw encrypted data when no key is provided.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agofuse client: map ENOKEY return value to itself
Igor Golikov [Tue, 6 May 2025 10:30:33 +0000 (10:30 +0000)]
fuse client: map ENOKEY return value to itself

Signed-off-by: Igor Golikov <igolikov@ibm.com>
3 days agoclient: do not fscrypt encrypt snapshot names
Christopher Hoffman [Tue, 6 May 2025 19:02:29 +0000 (19:02 +0000)]
client: do not fscrypt encrypt snapshot names

Snapshot names are visible within the .snap directory
as dir entries. They can be created by a client that
has an fscrypt key present and also by the manager who
does not have any key. While the client with the key
can create an encrypted name the manager cannot.
Standardize functionality of these semantics to the
common of the two.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Simplify getting decrypted fname
Christopher Hoffman [Wed, 23 Apr 2025 16:33:46 +0000 (16:33 +0000)]
client: Simplify getting decrypted fname

During unwrap name, get_decrypted_fname parameters accepts
dname/b64 name and altname. If altname holds a value, this means
that a plaintext name will be built from altname. In this
case, dname/b64 name is irrelevant. In the case of empty altname,
build name from b64 name.

Fixes: https://tracker.ceph.com/issues/70995
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Rework vxattr_cb_fscrypt_file_set to assign properly
Christopher Hoffman [Mon, 21 Apr 2025 12:28:16 +0000 (12:28 +0000)]
client: Rework vxattr_cb_fscrypt_file_set to assign properly

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: provide fscrypt vxattrs in CapSnap
Christopher Hoffman [Fri, 18 Apr 2025 20:55:02 +0000 (20:55 +0000)]
client: provide fscrypt vxattrs in CapSnap

Fixes: https://tracker.ceph.com/issues/70979
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Only run complete in read_modify_write if finish provided
Christopher Hoffman [Mon, 7 Apr 2025 18:39:20 +0000 (18:39 +0000)]
client: Only run complete in read_modify_write if finish provided

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: correctly account for Client::WriteEncMgr() ref counts
Venky Shankar [Mon, 7 Apr 2025 04:50:58 +0000 (04:50 +0000)]
client: correctly account for Client::WriteEncMgr() ref counts

Signed-off-by: Venky Shankar <vshankar@redhat.com>
3 days agoclient: remove unneeded goto jump
Venky Shankar [Mon, 7 Apr 2025 04:48:07 +0000 (04:48 +0000)]
client: remove unneeded goto jump

Signed-off-by: Venky Shankar <vshankar@redhat.com>
3 days agotest: clean up some warnings
Christopher Hoffman [Fri, 4 Apr 2025 17:51:42 +0000 (17:51 +0000)]
test: clean up some warnings

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoqa: Add fscrypt unit tests to workunits
Christopher Hoffman [Fri, 4 Apr 2025 13:11:06 +0000 (13:11 +0000)]
qa: Add fscrypt unit tests to workunits

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Add additional case for fscrypt enabled setattr
Christopher Hoffman [Fri, 28 Mar 2025 18:57:40 +0000 (18:57 +0000)]
client: Add additional case for fscrypt enabled setattr

During setattr in fscrypt case, there's two cases that happen
1. A logical size is provided and then a vector must be populated.
2. A request from setxattr is received and fscrypt_file vector
   is already set.

Also rework tests when setting fscrypt_file, to use logical sizes.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Check for dname max len before wrapping name
Christopher Hoffman [Fri, 28 Mar 2025 13:28:40 +0000 (13:28 +0000)]
client: Check for dname max len before wrapping name

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Add fscrypt enc support to C_Read_Sync_NonBlocking
Christopher Hoffman [Fri, 21 Mar 2025 16:00:16 +0000 (16:00 +0000)]
client: Add fscrypt enc support to C_Read_Sync_NonBlocking

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Address misc comments Mar 24
Christopher Hoffman [Mon, 24 Mar 2025 13:51:30 +0000 (13:51 +0000)]
client: Address misc comments Mar 24

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoFix Testclient bug
Christopher Hoffman [Mon, 24 Mar 2025 12:38:58 +0000 (12:38 +0000)]
Fix Testclient bug

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Add shared_mutex
Christopher Hoffman [Fri, 21 Mar 2025 14:44:36 +0000 (14:44 +0000)]
client: Add shared_mutex

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: When creating WriteEncMgr take into account client_oc
Christopher Hoffman [Wed, 19 Mar 2025 23:22:43 +0000 (23:22 +0000)]
client: When creating WriteEncMgr take into account client_oc

When determining if a write is buffered or not, take into account
the client_oc config. This option allows non-buffered writes when
caps normally used in buffered writes are present.

Fixes: https://tracker.ceph.com/issues/70568
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: Add client_fscrypt_as option
Christopher Hoffman [Wed, 12 Mar 2025 21:31:35 +0000 (21:31 +0000)]
client: Add client_fscrypt_as option

Add option to toggle enforcement of fscrypt access semantics.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agoclient: simplify some filepath constructions
Patrick Donnelly [Tue, 11 Mar 2025 14:49:19 +0000 (10:49 -0400)]
client: simplify some filepath constructions

And add notes where it could maybe be simplified further.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
3 days agoclient: print readable encrypted names
Patrick Donnelly [Tue, 11 Mar 2025 14:26:23 +0000 (10:26 -0400)]
client: print readable encrypted names

Replace non-printable characters with '.'.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
3 days agoclient: do not wrap ceph special names
Patrick Donnelly [Tue, 11 Mar 2025 14:18:12 +0000 (10:18 -0400)]
client: do not wrap ceph special names

This avoids encrypting .snap which prevents Client::_lookup from opening the
snapdir.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
3 days agoclient: remove remaining fscrypt conflicts
Patrick Donnelly [Mon, 10 Mar 2025 15:08:50 +0000 (11:08 -0400)]
client: remove remaining fscrypt conflicts

There also seems to be some missing calls to

    gen_inherited_fscrypt_auth

?

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
3 days agoclient: use path walk and on-the-fly enc/dec for fscrypt
Patrick Donnelly [Fri, 7 Mar 2025 15:33:55 +0000 (10:33 -0500)]
client: use path walk and on-the-fly enc/dec for fscrypt

The code before would encrypt/decrypt the dentry and store the result as the
dentry name. This would cause the client to have a different view of the dentry
names compared to the MDS. This created an unnecessary and complex divergence
that requires fixing the name in any code path involving the MDS.

Instead, maintain the same view as before with the MDS. The client uses the new
`Client::path_walk`, `Client::_wrap_name`, and `Client::_unwrap_name`
mechanisms to correctly change from the application's namespace (unencrypted /
case insensitve names) to the Client/MDS namespace.

The complication here is that the Client now needs to recompute the
encrypted/decrypted name for any path walk. This can and should be mitigated by
memoizing the results of the decryption/encryption. This is particularly
important as we can keep the decrypted names in a separate memory region that
is protected from core dump / trace inspection.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
3 days agoclient: Use correct sizes in write_success
Christopher Hoffman [Thu, 27 Feb 2025 19:11:40 +0000 (19:11 +0000)]
client: Use correct sizes in write_success

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>
3 days agoclient: Use PATH_MAX for max size of fscrypt enabled symlinks
Christopher Hoffman [Wed, 26 Feb 2025 22:24:28 +0000 (22:24 +0000)]
client: Use PATH_MAX for max size of fscrypt enabled symlinks

Fixes: https://tracker.ceph.com/issues/70194
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agocephfs/test_volumes: Create tests for enctag
Christopher Hoffman [Tue, 25 Feb 2025 15:47:10 +0000 (15:47 +0000)]
cephfs/test_volumes: Create tests for enctag

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
3 days agodoc: Add documentation for enctag in subvolume
Christopher Hoffman [Tue, 25 Feb 2025 14:15:53 +0000 (14:15 +0000)]
doc: Add documentation for enctag in subvolume

Signed-off-by: Christopher Hoffman <choffman@redhat.com>