From b165d60145b717261a0234f989c442c2b68b6ec0 Mon Sep 17 00:00:00 2001 From: "Venkateswararao Jujjuri (JV)" Date: Fri, 22 Oct 2010 10:13:12 -0700 Subject: 9p: Add datasync to client side TFSYNC/RFSYNC for dotl SYNOPSIS size[4] Tfsync tag[2] fid[4] datasync[4] size[4] Rfsync tag[2] DESCRIPTION The Tfsync transaction transfers ("flushes") all modified in-core data of file identified by fid to the disk device (or other permanent storage device) where that file resides. If datasync flag is specified data will be fleshed but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled. Signed-off-by: Venkateswararao Jujjuri Signed-off-by: Eric Van Hensbergen --- fs/9p/v9fs_vfs.h | 1 + fs/9p/vfs_dir.c | 1 + fs/9p/vfs_file.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'fs/9p') diff --git a/fs/9p/v9fs_vfs.h b/fs/9p/v9fs_vfs.h index d26db19..bab0eac 100644 --- a/fs/9p/v9fs_vfs.h +++ b/fs/9p/v9fs_vfs.h @@ -65,5 +65,6 @@ int v9fs_uflags2omode(int uflags, int extended); ssize_t v9fs_file_readn(struct file *, char *, char __user *, u32, u64); void v9fs_blank_wstat(struct p9_wstat *wstat); int v9fs_vfs_setattr_dotl(struct dentry *, struct iattr *); +int v9fs_file_fsync_dotl(struct file *filp, int datasync); #define P9_LOCK_TIMEOUT (30*HZ) diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 170f5bb..b84ebe8 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -315,4 +315,5 @@ const struct file_operations v9fs_dir_operations_dotl = { .readdir = v9fs_dir_readdir_dotl, .open = v9fs_file_open, .release = v9fs_dir_release, + .fsync = v9fs_file_fsync_dotl, }; diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 3a4352f..240c306 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -491,7 +491,7 @@ static int v9fs_file_fsync(struct file *filp, int datasync) return retval; } -static int v9fs_file_fsync_dotl(struct file *filp, int datasync) +int v9fs_file_fsync_dotl(struct file *filp, int datasync) { struct p9_fid *fid; int retval; @@ -501,7 +501,7 @@ static int v9fs_file_fsync_dotl(struct file *filp, int datasync) fid = filp->private_data; - retval = p9_client_fsync(fid); + retval = p9_client_fsync(fid, datasync); return retval; } -- cgit v1.1