From: Christoph Hellwig <hch@lst.de>
To: Weston Andros Adamson <dros@primarydata.com>
Cc: Peng Tao <bergwolf@primarydata.com>,
Trond Myklebust <trond.myklebust@primarydata.com>,
linux-nfs list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFS: fix subtle change in COMMIT behavior
Date: Fri, 14 Nov 2014 08:04:01 +0100 [thread overview]
Message-ID: <20141114070401.GA3944@lst.de> (raw)
In-Reply-To: <6E1CB959-CB60-4AE3-9392-65ABDF0DB2F0@primarydata.com>
[-- Attachment #1: Type: text/plain, Size: 52 bytes --]
The patch below passes block layout testing for me:
[-- Attachment #2: 0001-pnfs-blocklayout-fix-end-calculation-in-pnfs_num_con.patch --]
[-- Type: text/x-patch, Size: 1017 bytes --]
From: Christoph Hellwig <hch@lst.de>
Subject: pnfs/blocklayout: fix end calculation in pnfs_num_cont_bytes
Use the number of pages in the pagecache mapping instead of the
number of pnfs requests which is only slightly related.
Reported-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/nfs/blocklayout/blocklayout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 5228f20..98d4900 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -812,7 +812,7 @@ static u64 pnfs_num_cont_bytes(struct inode *inode, pgoff_t idx)
/* Optimize common case that writes from 0 to end of file */
end = DIV_ROUND_UP(i_size_read(inode), PAGE_CACHE_SIZE);
- if (end != NFS_I(inode)->npages) {
+ if (end != inode->i_mapping->nr_pages) {
rcu_read_lock();
end = page_cache_next_hole(mapping, idx + 1, ULONG_MAX);
rcu_read_unlock();
--
1.9.1
next prev parent reply other threads:[~2014-11-14 7:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 17:08 [PATCH] NFS: fix subtle change in COMMIT behavior Weston Andros Adamson
2014-11-13 1:03 ` Peng Tao
2014-11-13 11:02 ` Christoph Hellwig
2014-11-13 13:38 ` Weston Andros Adamson
2014-11-13 13:38 ` Christoph Hellwig
2014-11-14 7:04 ` Christoph Hellwig [this message]
2014-11-14 15:02 ` Weston Andros Adamson
2014-11-24 22:04 ` Trond Myklebust
2014-11-24 23:47 ` Tom Haynes
2014-11-25 13:06 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141114070401.GA3944@lst.de \
--to=hch@lst.de \
--cc=bergwolf@primarydata.com \
--cc=dros@primarydata.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox