rpdfs: Flush dirty blocks on sync
PATCH 1/1 rpdfs: Flush dirty blocks on sync
Write out dirty blocks when the VFS wants to sync, e.g. when unmounting.
Signed-off-by Valerie Aurora <[email protected]>
--- fs/rpdfs/super.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
fs/rpdfs/super.c +12 -0
@@ -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, };
Signature · 1 line
2.49.0
Zach Brown
AppliedQuoted 3 lines · Valerie Aurora
Write out dirty blocks when the VFS wants to sync, e.g. when unmounting.
Signed-off-by Valerie Aurora <[email protected]>
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