From: Valerie Aurora <val@versity.com>
To: rpdfs-devel@lists.linux.dev
Cc: Valerie Aurora <val@versity.com>
Subject: [PATCH] rpdfs: Flush dirty blocks on sync
Date: Tue, 17 Mar 2026 19:42:03 +0100 [thread overview]
Message-ID: <20260317184203.3980-1-val@versity.com> (raw)
Write out dirty blocks when the VFS wants to sync, e.g. when unmounting.
Signed-off-by: Valerie Aurora <val@versity.com>
---
fs/rpdfs/super.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/rpdfs/super.c b/fs/rpdfs/super.c
index 41df49795e2d..d842ab68839a 100644
--- a/fs/rpdfs/super.c
+++ b/fs/rpdfs/super.c
@@ -26,6 +26,17 @@ struct rpdfs_fs_context {
bool mkfs;
};
+static int rpdfs_sync_fs(struct super_block *sb, int wait)
+{
+ struct rpdfs_fs_info *rfi = RPDFS_SB_FS(sb);
+
+ rpdfs_prd("wait %d", wait);
+
+ rpdfs_block_sync(rfi, wait);
+
+ return 0;
+}
+
static int rpdfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
buf->f_type = RPDFS_SUPER_MAGIC;
@@ -38,6 +49,7 @@ static int rpdfs_statfs(struct dentry *dentry, struct kstatfs *buf)
static const struct super_operations rpdfs_sop = {
.alloc_inode = rpdfs_alloc_inode,
.free_inode = rpdfs_free_inode,
+ .sync_fs = rpdfs_sync_fs,
.statfs = rpdfs_statfs,
.write_inode = rpdfs_write_inode,
};
--
2.49.0
next reply other threads:[~2026-03-17 18:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 18:42 Valerie Aurora [this message]
2026-03-25 21:39 ` [PATCH] rpdfs: Flush dirty blocks on sync Zach Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317184203.3980-1-val@versity.com \
--to=val@versity.com \
--cc=rpdfs-devel@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.