Message ID | 20141114070401.GA3944@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> > 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
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'.
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
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
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