mds: Return ceph.dir.subvolume vxattr#65104
Conversation
|
jenkins test make check |
src/mds/Server.cc
Outdated
| // can retry later. | ||
| // - On success, write ASCII "1" if the directory is a subvolume root, or "0" | ||
| // otherwise, using the srnode->is_subvolume() call. | ||
| if (!cur->is_dir()) { |
There was a problem hiding this comment.
IIUC, this is not needed since this xattr is added to is_ceph_dir_vxattr, the check at the top of this function should handle non-dir case.
This section:
Lines 7120 to 7124 in 558e59c
src/mds/Server.cc
Outdated
| r = -ENOTDIR; | ||
| } else { | ||
| // Acquire a lighter weight rdlock | ||
| if (!mdr->more()->rdonly_checks) { |
There was a problem hiding this comment.
you can skip checking and acquiring snaplock, the inode should have the snaplock from CInode *cur = rdlock_path_pin_ref(mdr, true, false);
src/mds/Server.cc
Outdated
|
|
||
| if (mdr->more()->rdonly_checks) { | ||
| const auto srnode = cur->get_projected_srnode(); | ||
| *css << (srnode->is_subvolume() ? "1"sv : "0"sv); |
There was a problem hiding this comment.
i think just srnode->is_subvolume() should suffice
There was a problem hiding this comment.
Sounds good.
c0b3f6f to
65e31c9
Compare
|
jenkins test make check arm64 |
|
jenkins test make check |
65e31c9 to
6990903
Compare
|
jenkins test api |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
6990903 to
1ac6301
Compare
src/mds/Server.cc
Outdated
| // since we only handle ceph vxattrs here | ||
| r = -ENODATA; // no such attribute | ||
| } | ||
| } else if (xattr_name.substr(0, 18) == "ceph.dir.subvolume"sv) { |
There was a problem hiding this comment.
Why substr vs explicitly matching?
There was a problem hiding this comment.
Copied from the other code for example at line 7275
There was a problem hiding this comment.
I think xattr_name == "ceph.dir.subvolume"sv should suffice.
There was a problem hiding this comment.
Sure. It seems this function mixes the 2 styles and I couldn't come up with any rationalization why.
There was a problem hiding this comment.
It looks like one uses substr to drop into a set of common xattr names and then matches them one by one. It seems like an organizational thing.
1ac6301 to
cce65a8
Compare
|
jenkins test api |
Yes please. |
|
jenkins test windows |
cce65a8 to
f497ad4
Compare
|
LGTM, just one thing - i'm not sure if it's also needed to add a test case in |
|
A test beyond what I added in |
|
jenkins test api |
|
jenkins test make check arm64 |
i think it's sufficient, yes but i'm not sure if we're maintaining |
chrisphoffman
left a comment
There was a problem hiding this comment.
All of my comments were addressed.
LGTM
|
jenkins test api |
|
jenkins test make check arm64 |
|
jenkins test api |
|
jenkins test windows |
f497ad4 to
03f752c
Compare
|
jenkins test make check arm64 |
|
@edwinzrodriguez If some many tests are failing you can comment |
| # cleanup | ||
| self.mount_a.run_shell(['rm', '-rf', 'group/subvol3']) | ||
|
|
||
|
|
There was a problem hiding this comment.
I would recommend to remove this newline since in Python we reserve 2 sequential newlines for special purpose.
There was a problem hiding this comment.
PEP 8 style guide specifies that top-level function and class definitions should be surrounded by two blank lines.
This introduces handling for the "ceph.dir.subvolume" virtual xattr on directories. - Returns ASCII "1" when the directory is a subvolume root, "0" otherwise. QA: - Extend CephFS subvolume tests to validate vxattr retrieval and behavior around setting/removal. Fixes: https://tracker.ceph.com/issues/72556 Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
03f752c to
51fb4b6
Compare
|
This PR is under test in https://tracker.ceph.com/issues/73311. |
rishabh-d-dave
left a comment
There was a problem hiding this comment.
QA run was successful - https://tracker.ceph.com/projects/cephfs/wiki/QA_main_2025#wip-rishabh-testing-20250929182116
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. Update Log: https://github.com/ceph/ceph/actions/runs/18220936287 |
This introduces handling for the "ceph.dir.subvolume" virtual xattr on directories.
QA:
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 test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition