diff mbox

NFS: fix subtle change in COMMIT behavior

Message ID 20141114070401.GA3944@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig Nov. 14, 2014, 7:04 a.m. UTC
The patch below passes block layout testing for me:

Comments

Weston Andros Adamson Nov. 14, 2014, 3:02 p.m. UTC | #1
> 
> On Nov 14, 2014, at 2:04 AM, Christoph Hellwig <hch@lst.de> wrote:
> 
> The patch below passes block layout testing for me:
> <0001-pnfs-blocklayout-fix-end-calculation-in-pnfs_num_con.patch>

Great! That seems like a cleaner solution to me.

Trond - There will be a minor conflict with my patch, but it should be very
easy to fix.

-dros
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Trond Myklebust Nov. 24, 2014, 10:04 p.m. UTC | #2
On Fri, 2014-11-14 at 08:04 +0100, Christoph Hellwig wrote:
> The patch below passes block layout testing for me:

Hmm... Are you sure? It didn't compile for me, due to the misspelled
'nrpages'.
Thomas Haynes Nov. 24, 2014, 11:47 p.m. UTC | #3
Sure it isn’t you?

You also had “issues” with Anna’s patch.

Just saying!

> On Nov 24, 2014, at 2:04 PM, Trond Myklebust <trond.myklebust@primarydata.com> wrote:
> 
> On Fri, 2014-11-14 at 08:04 +0100, Christoph Hellwig wrote:
>> The patch below passes block layout testing for me:
> 
> Hmm... Are you sure? It didn't compile for me, due to the misspelled
> 'nrpages'.
> 
> -- 
> Trond Myklebust
> Linux NFS client maintainer, PrimaryData
> trond.myklebust@primarydata.com
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig Nov. 25, 2014, 1:06 p.m. UTC | #4
On Mon, Nov 24, 2014 at 05:04:32PM -0500, Trond Myklebust wrote:
> On Fri, 2014-11-14 at 08:04 +0100, Christoph Hellwig wrote:
> > The patch below passes block layout testing for me:
> 
> Hmm... Are you sure? It didn't compile for me, due to the misspelled
> 'nrpages'.

Hmm, my locally commited version has nrpages, while the one on the list has
nr_pages.  The one I tested obviously had nrpages.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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