[PATCH 1/1] rpdfs: Add minimal statfs support
Chris Kirby <[email protected]> Tue, 24 Feb 2026 14:26:25 -0600
| Newsgroups | dev.linux.lists.rpdfs-devel |
|---|---|
| Message-ID | <4dd1e27d757a064c8ecb9b44876a82663231d6e9.1771964599.git.ckirby@versity.com> |
Add minimal statfs support For now, just report f_type, f_bsize, and f_namelen. Signed-off-by: Chris Kirby <[email protected]> --- fs/rpdfs/super.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fs/rpdfs/super.c b/fs/rpdfs/super.c index 4b2d968a6767..d24e0d771df8 100644 --- a/fs/rpdfs/super.c +++ b/fs/rpdfs/super.c @@ -6,6 +6,7 @@ #include <linux/fs.h> #include <linux/fs_context.h> #include <linux/fs_parser.h> +#include <linux/statfs.h> #include "balloc.h" #include "block.h" @@ -17,6 +18,8 @@ #include "parse.h" #include "pr.h" +static int rpdfs_statfs(struct dentry *dentry, struct kstatfs *kst); + struct rpdfs_fs_context { struct rpdfs_net_transport_addr source_addr; bool mkfs; @@ -25,6 +28,7 @@ struct rpdfs_fs_context { static const struct super_operations rpdfs_sop = { .alloc_inode = rpdfs_alloc_inode, .free_inode = rpdfs_free_inode, + .statfs = rpdfs_statfs, .write_inode = rpdfs_write_inode, }; @@ -42,6 +46,15 @@ static int rpdfs_set_super(struct super_block *sb, struct fs_context *fc) return set_anon_super_fc(sb, fc); } +static int rpdfs_statfs(struct dentry *dentry, struct kstatfs *buf) +{ + buf->f_type = RPDFS_SUPER_MAGIC; + buf->f_bsize = RPDFS_BLOCK_SIZE; + buf->f_namelen = RPDFS_NAME_MAX; + + return 0; +} + static void rpdfs_destroy(struct rpdfs_fs_info *rfi) { rpdfs_balloc_destroy(rfi); -- 2.53.0