G'day,
This fixes a panic doing the first READDIR or READDIRPLUS call when:
* the client is ia64 or any platform that actually implements
flush_dcache_page(), and
* the server returns fsinfo.dtpref >= client's PAGE_SIZE, and
* the server does *not* return post-op attributes for the directory
in the READDIR reply.
Signed-off-by: Greg Banks <[email protected]>
---
net/sunrpc/xdr.c | 6 ++++++
1 files changed, 6 insertions(+)
Index: linux/net/sunrpc/xdr.c
===================================================================
--- linux.orig/net/sunrpc/xdr.c 2006-06-18 11:49:35.000000000 +1000
+++ linux/net/sunrpc/xdr.c 2006-06-30 20:40:38.043474230 +1000
@@ -188,6 +188,12 @@ _shift_data_right_pages(struct page **pa
pgto_base &= ~PAGE_CACHE_MASK;
pgfrom_base &= ~PAGE_CACHE_MASK;
+ if (pgto_base == 0) {
+ /* don't flush *pgto, it points beyond valid page*'s */
+ pgto_base = PAGE_CACHE_SIZE;
+ pgto--;
+ }
+
do {
/* Are any pointers crossing a page boundary? */
if (pgto_base == 0) {
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Tue, 2006-07-04 at 07:11, Trond Myklebust wrote:
> On Mon, 2006-07-03 at 13:32 +1000, Greg Banks wrote:
> diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
> index 49174f0..6ac4510 100644
> --- a/net/sunrpc/xdr.c
> +++ b/net/sunrpc/xdr.c
> @@ -191,7 +191,6 @@ _shift_data_right_pages(struct page **pa
> do {
> /* Are any pointers crossing a page boundary? */
> if (pgto_base == 0) {
> - flush_dcache_page(*pgto);
> pgto_base = PAGE_CACHE_SIZE;
> pgto--;
> }
> @@ -211,11 +210,11 @@ _shift_data_right_pages(struct page **pa
> vto = kmap_atomic(*pgto, KM_USER0);
> vfrom = kmap_atomic(*pgfrom, KM_USER1);
> memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
> + flush_dcache_page(*pgto);
> kunmap_atomic(vfrom, KM_USER1);
> kunmap_atomic(vto, KM_USER0);
>
> } while ((len -= copy) != 0);
> - flush_dcache_page(*pgto);
> }
Sure, that would work and more gracefully too.
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs