All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] rpdfs: Add minimal statfs support
@ 2026-02-25 23:23 Chris Kirby
  2026-02-25 23:51 ` Zach Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Kirby @ 2026-02-25 23:23 UTC (permalink / raw)
  To: rpdfs-devel; +Cc: Chris Kirby

Add minimal statfs support

For now, just report f_type, f_bsize, and f_namelen.

Signed-off-by: Chris Kirby <ckirby@versity.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-25 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 23:23 [PATCH v2 1/1] rpdfs: Add minimal statfs support Chris Kirby
2026-02-25 23:51 ` Zach Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.