[PATCH v2 1/1] rpdfs: Add minimal statfs support
Chris Kirby <[email protected]> Wed, 25 Feb 2026 17:23:22 -0600
| Newsgroups | dev.linux.lists.rpdfs-devel |
|---|---|
| Message-ID | <4f0660c2aae860e2f3cdd7070f46beebbec141c7.1772061244.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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fs/rpdfs/super.c b/fs/rpdfs/super.c index 4b2d968a6767..9b18c25175b7 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" @@ -22,9 +23,19 @@ struct rpdfs_fs_context { bool mkfs; }; +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 const struct super_operations rpdfs_sop = { .alloc_inode = rpdfs_alloc_inode, .free_inode = rpdfs_free_inode, + .statfs = rpdfs_statfs, .write_inode = rpdfs_write_inode, }; -- 2.53.0