Skip to content

[cephfs] add subvolumegroup info#1243

Merged
phlogistonjohn merged 1 commit intoceph:masterfrom
enix:feat/add-subvolumegroup-info
Apr 17, 2026
Merged

[cephfs] add subvolumegroup info#1243
phlogistonjohn merged 1 commit intoceph:masterfrom
enix:feat/add-subvolumegroup-info

Conversation

@lcaflc
Copy link
Copy Markdown
Contributor

@lcaflc lcaflc commented Mar 25, 2026

Add SubVolumeGroupInfo into the cephfs/admin api.

This is mainly usefull for subvolumegroup size and quota informations.

@lcaflc lcaflc marked this pull request as ready for review March 25, 2026 16:09
@phlogistonjohn
Copy link
Copy Markdown
Collaborator

phlogistonjohn commented Mar 25, 2026

Thanks for the contribution. Please update the commit messages to use the same style previous commits in this project use for that package (see also the ceph/ceph docs https://github.com/ceph/ceph/blob/main/SubmittingPatches.rst#commit-title which we share).

@lcaflc lcaflc force-pushed the feat/add-subvolumegroup-info branch from e49fb7a to 55d2145 Compare March 26, 2026 17:14
@lcaflc
Copy link
Copy Markdown
Contributor Author

lcaflc commented Mar 26, 2026

Hi, Sorry for the commit messages I'm so used that I forgot it after reading the development documentation of the project.

I'm not also fully sure about docs/api-status.json and setting the new API as preview. It was not completely clear in my mind, if it must be done for new API for next / dev versions of ceph upstream, and so not applicable to current ceph releases and tests, or for new apis in the project. I've updated it by hand as adding //go:build ceph_preview into the file set the complete subvolumegroup.go apis as preview.

And congrats for the builtin tests that spawn a tiny cluster, this is really awesome.

@phlogistonjohn
Copy link
Copy Markdown
Collaborator

Hi, Sorry for the commit messages I'm so used that I forgot it after reading the development documentation of the project.

Thanks for updating.

I'm not also fully sure about docs/api-status.json and setting the new API as preview. It was not completely clear in my mind, if it must be done for new API for next / dev versions of ceph upstream, and so not applicable to current ceph releases and tests, or for new apis in the project. I've updated it by hand as adding //go:build ceph_preview into the file set the complete subvolumegroup.go apis as preview.

Let me try and explain - the ideal is that when a new function or type is added it should be added to a new file. The new file then contains the preview build tag. This goes for new tests as well, create a new file. Go has no restriction on adding "methods" to a type defined in a different file.

When I enable the CI workflows there's a good chance it will flag the new apis as not first going through preview. Regardless, even if the CI doesn't detect it we'll want to move the new code to new files properly tagged.

And congrats for the builtin tests that spawn a tiny cluster, this is really awesome.

It is nice. I credit the previous maintainers of the project for setting that up.

@anoopcs9 anoopcs9 added the API This PR includes a change to the public API of a go-ceph package label Mar 27, 2026
@lcaflc lcaflc force-pushed the feat/add-subvolumegroup-info branch from 55d2145 to d10446c Compare April 3, 2026 14:10
@lcaflc
Copy link
Copy Markdown
Contributor Author

lcaflc commented Apr 3, 2026

Thanks @phlogistonjohn,

I've update the PR to reflect your explanations. new API is now moved to admin/cephfs/subvolumegroup_info.go.

I've added the //go:build ceph_preview tag to the file and rebuilt the api documentation.

Thanks.

@phlogistonjohn
Copy link
Copy Markdown
Collaborator

@Mergifyio rebase

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 13, 2026

rebase

❌ Pull request can't be updated with latest base branch changes

Details

Mergify needs the author permission to update the base branch of the pull request.
@lcaflc needs to authorize modification on its head branch.

@phlogistonjohn
Copy link
Copy Markdown
Collaborator

Hi @lcaflc can you please rebase this PR? Or grant authorizaion for others to do so? The mergify bot is unable to work it's magic.

Add SubVolumeGroupInfo into the cephfs/admin api.

This is mainly usefull for subvolumegroup size and quota informations.

Signed-off-by: Laurent Corbes <laurent.corbes@enix.fr>
@lcaflc lcaflc force-pushed the feat/add-subvolumegroup-info branch from d10446c to 98b693c Compare April 17, 2026 15:09
@lcaflc
Copy link
Copy Markdown
Contributor Author

lcaflc commented Apr 17, 2026

@phlogistonjohn Should be ok now. Thanks.

@phlogistonjohn phlogistonjohn requested a review from anoopcs9 April 17, 2026 18:46
Comment on lines +7 to +18
Uid int `json:"uid"`
Gid int `json:"gid"`
Mode int `json:"mode"`
BytesPercent string `json:"bytes_pcent"`
BytesUsed ByteCount `json:"bytes_used"`
BytesQuota QuotaSize `json:"-"`
DataPool string `json:"data_pool"`
Atime TimeStamp `json:"atime"`
Mtime TimeStamp `json:"mtime"`
Ctime TimeStamp `json:"ctime"`
CreatedAt TimeStamp `json:"created_at"`
MonAddrs []string `json:"mon_addrs"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have casesensitive and normalization fields in addition to the above from tentacle. But I guess those can wait a little more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Yeah, I don't think it's needed to do everything in one PR.

@phlogistonjohn phlogistonjohn merged commit e848775 into ceph:master Apr 17, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API This PR includes a change to the public API of a go-ceph package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants