Skip to content

Commit e70430d

Browse files
author
Trond Myklebust
committed
pNFS/flexfiles: remove requirement for whole file layouts
Remove the requirement that the server always sends whole file layouts. Signed-off-by: Trond Myklebust <[email protected]>
1 parent e1e54ab commit e70430d

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

fs/nfs/flexfilelayout/flexfilelayout.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -257,24 +257,6 @@ static void ff_layout_free_mirror_array(struct nfs4_ff_layout_segment *fls)
257257
ff_layout_put_mirror(fls->mirror_array[i]);
258258
}
259259

260-
static int ff_layout_check_layout(struct nfs4_layoutget_res *lgr)
261-
{
262-
int ret = 0;
263-
264-
dprintk("--> %s\n", __func__);
265-
266-
/* FIXME: remove this check when layout segment support is added */
267-
if (lgr->range.offset != 0 ||
268-
lgr->range.length != NFS4_MAX_UINT64) {
269-
dprintk("%s Only whole file layouts supported. Use MDS i/o\n",
270-
__func__);
271-
ret = -EINVAL;
272-
}
273-
274-
dprintk("--> %s returns %d\n", __func__, ret);
275-
return ret;
276-
}
277-
278260
static void _ff_layout_free_lseg(struct nfs4_ff_layout_segment *fls)
279261
{
280262
if (fls) {
@@ -556,9 +538,6 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh,
556538

557539
out_sort_mirrors:
558540
ff_layout_sort_mirrors(fls);
559-
rc = ff_layout_check_layout(lgr);
560-
if (rc)
561-
goto out_err_free;
562541
ret = &fls->generic_hdr;
563542
dprintk("<-- %s (success)\n", __func__);
564543
out_free_page:

0 commit comments

Comments
 (0)