diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-05-27 16:29:07 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 12:09:00 -0400 |
commit | 549177863bac22f23663ee9f70c4e3b9fb269f2c (patch) | |
tree | 06ced21ed11c050cbb10f552b30e8e4368ccb487 /fs/nfs | |
parent | cb3997b5a0b21864368bd1bd1d0929f9304fb6d9 (diff) |
NFS: Make nfs_fsync methods consistent
Clean up: Report the same debugging info, count function calls the same,
and use similar function naming in nfs_fsync_dir() and nfs_fsync().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 3 | ||||
-rw-r--r-- | fs/nfs/file.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 982a2064fe4c..5d73fbd67070 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -629,10 +629,11 @@ out: | |||
629 | */ | 629 | */ |
630 | static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) | 630 | static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) |
631 | { | 631 | { |
632 | dfprintk(VFS, "NFS: fsync_dir(%s/%s) datasync %d\n", | 632 | dfprintk(VFS, "NFS: fsync dir(%s/%s) datasync %d\n", |
633 | dentry->d_parent->d_name.name, dentry->d_name.name, | 633 | dentry->d_parent->d_name.name, dentry->d_name.name, |
634 | datasync); | 634 | datasync); |
635 | 635 | ||
636 | nfs_inc_stats(dentry->d_inode, NFSIOS_VFSFSYNC); | ||
636 | return 0; | 637 | return 0; |
637 | } | 638 | } |
638 | 639 | ||
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 0213c21038fa..1789de218cca 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -50,7 +50,7 @@ static ssize_t nfs_file_read(struct kiocb *, const struct iovec *iov, | |||
50 | static ssize_t nfs_file_write(struct kiocb *, const struct iovec *iov, | 50 | static ssize_t nfs_file_write(struct kiocb *, const struct iovec *iov, |
51 | unsigned long nr_segs, loff_t pos); | 51 | unsigned long nr_segs, loff_t pos); |
52 | static int nfs_file_flush(struct file *, fl_owner_t id); | 52 | static int nfs_file_flush(struct file *, fl_owner_t id); |
53 | static int nfs_fsync(struct file *, struct dentry *dentry, int datasync); | 53 | static int nfs_file_fsync(struct file *, struct dentry *dentry, int datasync); |
54 | static int nfs_check_flags(int flags); | 54 | static int nfs_check_flags(int flags); |
55 | static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); | 55 | static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); |
56 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); | 56 | static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); |
@@ -72,7 +72,7 @@ const struct file_operations nfs_file_operations = { | |||
72 | .open = nfs_file_open, | 72 | .open = nfs_file_open, |
73 | .flush = nfs_file_flush, | 73 | .flush = nfs_file_flush, |
74 | .release = nfs_file_release, | 74 | .release = nfs_file_release, |
75 | .fsync = nfs_fsync, | 75 | .fsync = nfs_file_fsync, |
76 | .lock = nfs_lock, | 76 | .lock = nfs_lock, |
77 | .flock = nfs_flock, | 77 | .flock = nfs_flock, |
78 | .splice_read = nfs_file_splice_read, | 78 | .splice_read = nfs_file_splice_read, |
@@ -181,7 +181,7 @@ static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) | |||
181 | } | 181 | } |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * Helper for nfs_file_flush() and nfs_fsync() | 184 | * Helper for nfs_file_flush() and nfs_file_fsync() |
185 | * | 185 | * |
186 | * Notice that it clears the NFS_CONTEXT_ERROR_WRITE before synching to | 186 | * Notice that it clears the NFS_CONTEXT_ERROR_WRITE before synching to |
187 | * disk, but it retrieves and clears ctx->error after synching, despite | 187 | * disk, but it retrieves and clears ctx->error after synching, despite |
@@ -296,12 +296,14 @@ nfs_file_mmap(struct file * file, struct vm_area_struct * vma) | |||
296 | * whether any write errors occurred for this process. | 296 | * whether any write errors occurred for this process. |
297 | */ | 297 | */ |
298 | static int | 298 | static int |
299 | nfs_fsync(struct file *file, struct dentry *dentry, int datasync) | 299 | nfs_file_fsync(struct file *file, struct dentry *dentry, int datasync) |
300 | { | 300 | { |
301 | struct nfs_open_context *ctx = nfs_file_open_context(file); | 301 | struct nfs_open_context *ctx = nfs_file_open_context(file); |
302 | struct inode *inode = dentry->d_inode; | 302 | struct inode *inode = dentry->d_inode; |
303 | 303 | ||
304 | dfprintk(VFS, "nfs: fsync(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); | 304 | dfprintk(VFS, "NFS: fsync file(%s/%s) datasync %d\n", |
305 | dentry->d_parent->d_name.name, dentry->d_name.name, | ||
306 | datasync); | ||
305 | 307 | ||
306 | nfs_inc_stats(inode, NFSIOS_VFSFSYNC); | 308 | nfs_inc_stats(inode, NFSIOS_VFSFSYNC); |
307 | return nfs_do_fsync(ctx, inode); | 309 | return nfs_do_fsync(ctx, inode); |