diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-06-10 13:30:23 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-12 13:40:28 -0400 |
commit | e885de1a5bc9f46ef8f934c5a7602c89d2d51e8d (patch) | |
tree | fec97da658ce241c055f5fc8bb7e2e84ee1cc259 /fs/nfs/pnfs.c | |
parent | d8007d4dd6ff8749cc8a4063c3ec87442db76d82 (diff) |
NFSv4.1: Fall back to ordinary i/o through the mds if we have no layout segment
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 69a0c3f1e462..cc807fe46953 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -1066,6 +1066,10 @@ pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *r | |||
1066 | req->wb_bytes, | 1066 | req->wb_bytes, |
1067 | IOMODE_READ, | 1067 | IOMODE_READ, |
1068 | GFP_KERNEL); | 1068 | GFP_KERNEL); |
1069 | /* If no lseg, fall back to read through mds */ | ||
1070 | if (pgio->pg_lseg == NULL) | ||
1071 | nfs_pageio_init_read_mds(pgio, pgio->pg_inode); | ||
1072 | |||
1069 | } | 1073 | } |
1070 | EXPORT_SYMBOL_GPL(pnfs_generic_pg_init_read); | 1074 | EXPORT_SYMBOL_GPL(pnfs_generic_pg_init_read); |
1071 | 1075 | ||
@@ -1080,6 +1084,9 @@ pnfs_generic_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page * | |||
1080 | req->wb_bytes, | 1084 | req->wb_bytes, |
1081 | IOMODE_RW, | 1085 | IOMODE_RW, |
1082 | GFP_NOFS); | 1086 | GFP_NOFS); |
1087 | /* If no lseg, fall back to write through mds */ | ||
1088 | if (pgio->pg_lseg == NULL) | ||
1089 | nfs_pageio_init_write_mds(pgio, pgio->pg_inode, pgio->pg_ioflags); | ||
1083 | } | 1090 | } |
1084 | EXPORT_SYMBOL_GPL(pnfs_generic_pg_init_write); | 1091 | EXPORT_SYMBOL_GPL(pnfs_generic_pg_init_write); |
1085 | 1092 | ||