Thread (35 messages) 35 messages, 8 authors, 2011-01-14

still nfs problems [Was: Linux 2.6.37-rc8]

From: mkl@pengutronix.de (Marc Kleine-Budde)
Date: 2011-01-05 15:40:00
Also in: linux-nfs, lkml

Possibly related (same subject, not in this thread)

On 01/05/2011 04:29 PM, Trond Myklebust wrote:
quoted hunk ↗ jump to hunk
On Wed, 2011-01-05 at 10:14 -0500, Trond Myklebust wrote: 
quoted
OK. So,the new behaviour in 2.6.37 is that we're writing to a series of
pages via the usual kmap_atomic()/kunmap_atomic() and kmap()/kunmap()
interfaces, but we can end up reading them via a virtual address range
that gets set up via vm_map_ram() (that range gets set up before the
write occurs).

Do we perhaps need an invalidate_kernel_vmap_range() before we can read
the data on ARM in this kind of scenario?
IOW: Does something like the following patch fix the problem?

------------------------------------------------------------------------------- 
From: Trond Myklebust <redacted>
NFS: Ensure we clean the TLB cache in nfs_readdir_xdr_to_array
    
After calling nfs_readdir_xdr_filler(), we need a call to
invalidate_kernel_vmap_range() before we can proceed to read
the data back through the virtual address range.
    
Signed-off-by: Trond Myklebust <redacted>
---
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 996dd89..4640470 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -587,6 +587,9 @@ int nfs_readdir_xdr_to_array(nfs_readdir_descriptor_t *desc, struct page *page,
 		if (status < 0)
 			break;
 		pglen = status;
+
+		invalidate_kernel_vmap_range(pages_ptr, pglen);
+
 		status = nfs_readdir_page_filler(desc, &entry, pages_ptr, page, pglen);
 		if (status < 0) {
 			if (status == -ENOSPC)
\o/ - Works for me (at91, armv5)

Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>

This is a candidate for stable (Cc'd).

Regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110105/2804eb32/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help