aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2010-09-22 20:19:19 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2010-10-28 10:08:47 -0400
commit920e65dc6911da28a58e17f4b683302636fc6d8e (patch)
tree761280ee48576a45d13df5df685ea6b9da7fd775 /fs/9p
parentb04faaf3717307cd976a15667c8c24161c1d24ef (diff)
[9p] Introduce client side TFSYNC/RFSYNC for dotl.
SYNOPSIS size[4] Tfsync tag[2] fid[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. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_file.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 28db7fb1d96e..fdf303207c72 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -290,6 +290,20 @@ static int v9fs_file_fsync(struct file *filp, int datasync)
290 return retval; 290 return retval;
291} 291}
292 292
293static int v9fs_file_fsync_dotl(struct file *filp, int datasync)
294{
295 struct p9_fid *fid;
296 int retval;
297
298 P9_DPRINTK(P9_DEBUG_VFS, "v9fs_file_fsync_dotl: filp %p datasync %x\n",
299 filp, datasync);
300
301 fid = filp->private_data;
302
303 retval = p9_client_fsync(fid);
304 return retval;
305}
306
293static const struct file_operations v9fs_cached_file_operations = { 307static const struct file_operations v9fs_cached_file_operations = {
294 .llseek = generic_file_llseek, 308 .llseek = generic_file_llseek,
295 .read = do_sync_read, 309 .read = do_sync_read,
@@ -311,7 +325,7 @@ static const struct file_operations v9fs_cached_file_operations_dotl = {
311 .release = v9fs_dir_release, 325 .release = v9fs_dir_release,
312 .lock = v9fs_file_lock, 326 .lock = v9fs_file_lock,
313 .mmap = generic_file_readonly_mmap, 327 .mmap = generic_file_readonly_mmap,
314 .fsync = v9fs_file_fsync, 328 .fsync = v9fs_file_fsync_dotl,
315}; 329};
316 330
317const struct file_operations v9fs_file_operations = { 331const struct file_operations v9fs_file_operations = {
@@ -333,5 +347,5 @@ const struct file_operations v9fs_file_operations_dotl = {
333 .release = v9fs_dir_release, 347 .release = v9fs_dir_release,
334 .lock = v9fs_file_lock, 348 .lock = v9fs_file_lock,
335 .mmap = generic_file_readonly_mmap, 349 .mmap = generic_file_readonly_mmap,
336 .fsync = v9fs_file_fsync, 350 .fsync = v9fs_file_fsync_dotl,
337}; 351};