All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rpdfs: Flush dirty blocks on sync
@ 2026-03-17 18:42 Valerie Aurora
  2026-03-25 21:39 ` Zach Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Valerie Aurora @ 2026-03-17 18:42 UTC (permalink / raw)
  To: rpdfs-devel; +Cc: Valerie Aurora

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


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

* Re: [PATCH] rpdfs: Flush dirty blocks on sync
  2026-03-17 18:42 [PATCH] rpdfs: Flush dirty blocks on sync Valerie Aurora
@ 2026-03-25 21:39 ` Zach Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Zach Brown @ 2026-03-25 21:39 UTC (permalink / raw)
  To: Valerie Aurora; +Cc: rpdfs-devel

On Tue, Mar 17, 2026 at 07:42:03PM +0100, Valerie Aurora wrote:
> Write out dirty blocks when the VFS wants to sync, e.g. when unmounting.
> 
> Signed-off-by: Valerie Aurora <val@versity.com>

Applied, thanks!

I'm taking bets on whether we remember to fix up the return 0 once we
wire up io errors through write completion up to the block flush waiters
:).

- z

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

end of thread, other threads:[~2026-03-25 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 18:42 [PATCH] rpdfs: Flush dirty blocks on sync Valerie Aurora
2026-03-25 21:39 ` 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.