From e5e940170b2136ad4d5483ef293ae284b9cc8d53 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Wed, 20 Oct 2010 00:18:01 -0400 Subject: NFS: create and destroy inode's layout cache At the start of the io paths, try to grab the relevant layout information. This will initiate the inode's layout cache, but stubs ensure the cache stays empty. Signed-off-by: Benny Halevy Signed-off-by: Dean Hildebrand Signed-off-by: Marc Eshel Signed-off-by: Tao Guo Signed-off-by: Ricardo Labiaga Signed-off-by: Boaz Harrosh Signed-off-by: Andy Adamson Signed-off-by: Fred Isaman Signed-off-by: Trond Myklebust --- fs/nfs/file.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/nfs/file.c') diff --git a/fs/nfs/file.c b/fs/nfs/file.c index c3f2477c16c1..91d019d39122 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -36,6 +36,7 @@ #include "internal.h" #include "iostat.h" #include "fscache.h" +#include "pnfs.h" #define NFSDBG_FACILITY NFSDBG_FILE @@ -386,6 +387,10 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping, file->f_path.dentry->d_name.name, mapping->host->i_ino, len, (long long) pos); + pnfs_update_layout(mapping->host, + nfs_file_open_context(file), + IOMODE_RW); + start: /* * Prevent starvation issues if someone is doing a consistency -- cgit v1.2.3