2010-10-07 21:25:42

by Benny Halevy

[permalink] [raw]
Subject: [PATCH] SQUASHME: pnfs: loga_minlength must not be greater than loga_length

Signed-off-by: Benny Halevy <[email protected]>
---
fs/nfs/pnfs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index f346533..6cc0543 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -622,6 +622,8 @@ send_layoutget(struct pnfs_layout_hdr *lo,
return NULL;
}
lgp->args.minlength = PAGE_CACHE_SIZE;
+ if (lgp->args.minlength > range->length)
+ lgp->args.minlength = range->length;
lgp->args.maxcount = PNFS_LAYOUT_MAXSIZE;
lgp->args.range = *range;
lgp->args.type = server->pnfs_curr_ld->id;
--
1.7.2.3