diff options
author | Andy Adamson <andros@netapp.com> | 2011-06-13 18:22:38 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-12 13:40:28 -0400 |
commit | 7c24d9489fe57d67cb56c6bdad58d89806e7fd97 (patch) | |
tree | 4df86fc0437ac2ed2c90123060d4676422fbd95e /fs/nfs/pnfs.c | |
parent | 47cb498e9316314e7e681f417135589195ad78a7 (diff) |
NFSv4.1: File layout only supports whole file layouts
Ask for whole file layouts. Until support for layout segments is fully
supported in the file layout code, discard non-whole file layouts.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index cc807fe46953..a7dc3367a857 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -911,7 +911,7 @@ pnfs_find_lseg(struct pnfs_layout_hdr *lo, | |||
911 | * Layout segment is retreived from the server if not cached. | 911 | * Layout segment is retreived from the server if not cached. |
912 | * The appropriate layout segment is referenced and returned to the caller. | 912 | * The appropriate layout segment is referenced and returned to the caller. |
913 | */ | 913 | */ |
914 | static struct pnfs_layout_segment * | 914 | struct pnfs_layout_segment * |
915 | pnfs_update_layout(struct inode *ino, | 915 | pnfs_update_layout(struct inode *ino, |
916 | struct nfs_open_context *ctx, | 916 | struct nfs_open_context *ctx, |
917 | loff_t pos, | 917 | loff_t pos, |
@@ -980,7 +980,8 @@ pnfs_update_layout(struct inode *ino, | |||
980 | arg.offset -= pg_offset; | 980 | arg.offset -= pg_offset; |
981 | arg.length += pg_offset; | 981 | arg.length += pg_offset; |
982 | } | 982 | } |
983 | arg.length = PAGE_CACHE_ALIGN(arg.length); | 983 | if (arg.length != NFS4_MAX_UINT64) |
984 | arg.length = PAGE_CACHE_ALIGN(arg.length); | ||
984 | 985 | ||
985 | lseg = send_layoutget(lo, ctx, &arg, gfp_flags); | 986 | lseg = send_layoutget(lo, ctx, &arg, gfp_flags); |
986 | if (!lseg && first) { | 987 | if (!lseg && first) { |
@@ -998,6 +999,7 @@ out_unlock: | |||
998 | spin_unlock(&ino->i_lock); | 999 | spin_unlock(&ino->i_lock); |
999 | goto out; | 1000 | goto out; |
1000 | } | 1001 | } |
1002 | EXPORT_SYMBOL_GPL(pnfs_update_layout); | ||
1001 | 1003 | ||
1002 | int | 1004 | int |
1003 | pnfs_layout_process(struct nfs4_layoutget *lgp) | 1005 | pnfs_layout_process(struct nfs4_layoutget *lgp) |