* [PATCH 0/1] NFSv4.1 fix page number calulation bug for filelayout decode buffer
@ 2012-04-09 21:55 andros
2012-04-09 21:55 ` [PATCH 1/1] " andros
0 siblings, 1 reply; 2+ messages in thread
From: andros @ 2012-04-09 21:55 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
This fixes a bug when performing I/O over pNFS file layout with rsize
and/or wsize < PAGE_SIZE.
Andy Adamson (1):
NFSv4.1 fix page number calulation bug for filelayout decode buffer
fs/nfs/nfs4filelayoutdev.c | 2 +-
fs/nfs/pnfs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.7.6.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] NFSv4.1 fix page number calulation bug for filelayout decode buffer
2012-04-09 21:55 [PATCH 0/1] NFSv4.1 fix page number calulation bug for filelayout decode buffer andros
@ 2012-04-09 21:55 ` andros
0 siblings, 0 replies; 2+ messages in thread
From: andros @ 2012-04-09 21:55 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs, Andy Adamson
From: Andy Adamson <andros@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayoutdev.c | 2 +-
fs/nfs/pnfs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index a866bbd..696e448 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -699,7 +699,7 @@ get_device_info(struct inode *inode, struct nfs4_deviceid *dev_id, gfp_t gfp_fla
* GETDEVICEINFO's maxcount
*/
max_resp_sz = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
- max_pages = max_resp_sz >> PAGE_SHIFT;
+ max_pages = (max_resp_sz + PAGE_SIZE - 1) >> PAGE_SHIFT;
dprintk("%s inode %p max_resp_sz %u max_pages %d\n",
__func__, inode, max_resp_sz, max_pages);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index b5d4515..b73af2e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -587,7 +587,7 @@ send_layoutget(struct pnfs_layout_hdr *lo,
/* allocate pages for xdr post processing */
max_resp_sz = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
- max_pages = max_resp_sz >> PAGE_SHIFT;
+ max_pages = (max_resp_sz + PAGE_SIZE - 1) >> PAGE_SHIFT;
pages = kcalloc(max_pages, sizeof(struct page *), gfp_flags);
if (!pages)
--
1.7.6.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-09 21:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 21:55 [PATCH 0/1] NFSv4.1 fix page number calulation bug for filelayout decode buffer andros
2012-04-09 21:55 ` [PATCH 1/1] " andros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).