linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem
@ 2003-11-11 18:26 Greg Louis
  2003-11-11 19:00 ` Greg Louis
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Louis @ 2003-11-11 18:26 UTC (permalink / raw)
  To: LKML

Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
-rc1-pac1 behave as follows: mounting a remote directory via NFS with
v3 enabled (client and server) seems to work ok, and running mount with
no parameters shows the NFS mount, but any attempt at access fails with
a message like
  /bin/ls: reading directory /whatever/it/was: Input/output error

-- 
| G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
|  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
|  http://wecanstopspam.org in signatures helps fight junk email. |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem
  2003-11-11 18:26 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem Greg Louis
@ 2003-11-11 19:00 ` Greg Louis
  2003-11-14 23:46   ` J.A. Magallon
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Louis @ 2003-11-11 19:00 UTC (permalink / raw)
  To: LKML

On 20031111 (Tue) at 1326:47 -0500, Greg Louis wrote:
> Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
> -rc1-pac1 behave as follows: mounting a remote directory via NFS with
> v3 enabled (client and server) seems to work ok, and running mount with
> no parameters shows the NFS mount, but any attempt at access fails with
> a message like
>   /bin/ls: reading directory /whatever/it/was: Input/output error

Reverting all changes to fs/nfs/* since 2.4.23-pre7-pac1, and only
those, corrects the problem.

-- 
| G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
|  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
|  http://wecanstopspam.org in signatures helps fight junk email. |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem
  2003-11-11 19:00 ` Greg Louis
@ 2003-11-14 23:46   ` J.A. Magallon
  2003-11-14 23:55     ` J.A. Magallon
  2003-11-15 12:29     ` 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem Greg Louis
  0 siblings, 2 replies; 10+ messages in thread
From: J.A. Magallon @ 2003-11-14 23:46 UTC (permalink / raw)
  To: Greg Louis; +Cc: Lista Linux-Kernel


On 11.11, Greg Louis wrote:
> On 20031111 (Tue) at 1326:47 -0500, Greg Louis wrote:
> > Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
> > -rc1-pac1 behave as follows: mounting a remote directory via NFS with
> > v3 enabled (client and server) seems to work ok, and running mount with
> > no parameters shows the NFS mount, but any attempt at access fails with
> > a message like
> >   /bin/ls: reading directory /whatever/it/was: Input/output error
> 
> Reverting all changes to fs/nfs/* since 2.4.23-pre7-pac1, and only
> those, corrects the problem.
> 

/metoo

annwn:~> bpsh 0 mount   
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,mode=0620)
none on /dev/shm type tmpfs (rw)
none on /tmp type tmpfs (rw)
192.168.0.1:/lib on /lib type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
192.168.0.1:/bin on /bin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
192.168.0.1:/sbin on /sbin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
192.168.0.1:/usr on /usr type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
192.168.0.1:/opt on /opt type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
192.168.0.1:/home on /home type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
192.168.0.1:/work on /work/shared type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)

annwn:~> bpsh 0 pwd
/home/magallon

annwn:~> bpsh 0 ls
ls: reading directory .: Invalid argument

It works for some time, and then it breaks.
Could you send me the patch you used to revert those changes ?
I will try to make a diff from rc1 to pre7 and reverse.

TIA

-- 
J.A. Magallon <jamagallon()able!es>     \                 Software is like sex:
werewolf!able!es                         \           It's better when it's free
Mandrake Linux release 10.0 (Cooker) for i586
Linux 2.4.23-rc1-jam1 (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-4mdk))

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem
  2003-11-14 23:46   ` J.A. Magallon
@ 2003-11-14 23:55     ` J.A. Magallon
  2003-11-15  0:14       ` PowerBook shutdown Dustin Lang
  2003-11-28 20:38       ` 2.4.23-pac1 Bernhard Rosenkraenzer
  2003-11-15 12:29     ` 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem Greg Louis
  1 sibling, 2 replies; 10+ messages in thread
From: J.A. Magallon @ 2003-11-14 23:55 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Greg Louis, Lista Linux-Kernel


On 11.15, J.A. Magallon wrote:
> 
> On 11.11, Greg Louis wrote:
> > On 20031111 (Tue) at 1326:47 -0500, Greg Louis wrote:
> > > Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
> > > -rc1-pac1 behave as follows: mounting a remote directory via NFS with
> > > v3 enabled (client and server) seems to work ok, and running mount with
> > > no parameters shows the NFS mount, but any attempt at access fails with
> > > a message like
> > >   /bin/ls: reading directory /whatever/it/was: Input/output error
> > 
> > Reverting all changes to fs/nfs/* since 2.4.23-pre7-pac1, and only
> > those, corrects the problem.
> > 
> 
> /metoo
> 
> annwn:~> bpsh 0 mount   
> none on /proc type proc (rw)
> none on /dev/pts type devpts (rw,mode=0620)
> none on /dev/shm type tmpfs (rw)
> none on /tmp type tmpfs (rw)
> 192.168.0.1:/lib on /lib type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> 192.168.0.1:/bin on /bin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> 192.168.0.1:/sbin on /sbin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> 192.168.0.1:/usr on /usr type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> 192.168.0.1:/opt on /opt type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> 192.168.0.1:/home on /home type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
> 192.168.0.1:/work on /work/shared type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
> 
> annwn:~> bpsh 0 pwd
> /home/magallon
> 
> annwn:~> bpsh 0 ls
> ls: reading directory .: Invalid argument
> 
> It works for some time, and then it breaks.
> Could you send me the patch you used to revert those changes ?
> I will try to make a diff from rc1 to pre7 and reverse.

Just this (pre7 -> pre8|rc1):

diff -ruN linux-2.4.23-pre7/fs/nfs/nfs3proc.c linux-2.4.23-rc1/fs/nfs/nfs3proc.c
--- linux-2.4.23-pre7/fs/nfs/nfs3proc.c	2003-08-25 13:44:43.000000000 +0200
+++ linux-2.4.23-rc1/fs/nfs/nfs3proc.c	2003-11-12 11:07:48.000000000 +0100
@@ -433,8 +433,6 @@
  * The decode function itself doesn't perform any decoding, it just makes
  * sure the reply is syntactically correct.
  *
- * Also note that this implementation handles both plain readdir and
- * readdirplus.
  */
 static int
 nfs3_proc_readdir(struct inode *dir, struct rpc_cred *cred,
@@ -448,11 +446,7 @@
 	struct rpc_message	msg = { NFS3PROC_READDIR, &arg, &res, cred };
 	int			status;
 
-	if (plus)
-		msg.rpc_proc = NFS3PROC_READDIRPLUS;
-
-	dprintk("NFS call  readdir%s %d\n",
-			plus? "plus" : "", (unsigned int) cookie);
+	dprintk("NFS call  readdir %d\n", (unsigned int) cookie);
 
 	dir_attr.valid = 0;
 	status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
diff -ruN linux-2.4.23-pre7/fs/nfs/nfs3xdr.c linux-2.4.23-rc1/fs/nfs/nfs3xdr.c
--- linux-2.4.23-pre7/fs/nfs/nfs3xdr.c	2002-11-29 00:53:15.000000000 +0100
+++ linux-2.4.23-rc1/fs/nfs/nfs3xdr.c	2003-11-12 11:07:48.000000000 +0100
@@ -599,8 +599,6 @@
 u32 *
 nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus)
 {
-	struct nfs_entry old = *entry;
-
 	if (!*p++) {
 		if (!*p)
 			return ERR_PTR(-EAGAIN);
@@ -616,20 +614,12 @@
 	p = xdr_decode_hyper(p, &entry->cookie);
 
 	if (plus) {
-		p = xdr_decode_post_op_attr(p, &entry->fattr);
+		struct nfs_fattr fattr;
+		p = xdr_decode_post_op_attr(p, &fattr);
 		/* In fact, a post_op_fh3: */
 		if (*p++) {
-			p = xdr_decode_fhandle(p, &entry->fh);
-			/* Ugh -- server reply was truncated */
-			if (p == NULL) {
-				dprintk("NFS: FH truncated\n");
-				*entry = old;
-				return ERR_PTR(-EAGAIN);
-			}
-		} else {
-			/* If we don't get a file handle, the attrs
-			 * aren't worth a lot. */
-			entry->fattr.valid = 0;
+			struct nfs_fh fh;
+			p = xdr_decode_fhandle(p, &fh);
 		}
 	}
 
diff -ruN linux-2.4.23-pre7/fs/nfs/write.c linux-2.4.23-rc1/fs/nfs/write.c
--- linux-2.4.23-pre7/fs/nfs/write.c	2003-08-25 13:44:43.000000000 +0200
+++ linux-2.4.23-rc1/fs/nfs/write.c	2003-11-12 11:07:48.000000000 +0100
@@ -225,8 +225,19 @@
 	struct inode *inode = page->mapping->host;
 	unsigned long end_index;
 	unsigned offset = PAGE_CACHE_SIZE;
+	int inode_referenced = 0;
 	int err;
 
+	/*
+	 * Note: We need to ensure that we have a reference to the inode
+	 *       if we are to do asynchronous writes. If not, waiting
+	 *       in nfs_wait_on_request() may deadlock with clear_inode().
+	 *
+	 *       If igrab() fails here, then it is in any case safe to
+	 *       call nfs_wb_page(), since there will be no pending writes.
+	 */
+	if (igrab(inode) != 0)
+		inode_referenced = 1;
 	end_index = inode->i_size >> PAGE_CACHE_SHIFT;
 
 	/* Ensure we've flushed out any previous writes */
@@ -244,7 +255,8 @@
 		goto out;
 do_it:
 	lock_kernel();
-	if (NFS_SERVER(inode)->wsize >= PAGE_CACHE_SIZE && !IS_SYNC(inode)) {
+	if (NFS_SERVER(inode)->wsize >= PAGE_CACHE_SIZE && !IS_SYNC(inode) &&
+			inode_referenced) {
 		err = nfs_writepage_async(NULL, inode, page, 0, offset);
 		if (err >= 0)
 			err = 0;
@@ -256,7 +268,9 @@
 	unlock_kernel();
 out:
 	UnlockPage(page);
-	return err; 
+	if (inode_referenced)
+		iput(inode);
+	return err;
 }
 
 /*

-- 
J.A. Magallon <jamagallon()able!es>     \                 Software is like sex:
werewolf!able!es                         \           It's better when it's free
Mandrake Linux release 10.0 (Cooker) for i586
Linux 2.4.23-rc1-jam1 (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-4mdk))

^ permalink raw reply	[flat|nested] 10+ messages in thread

* PowerBook shutdown
  2003-11-14 23:55     ` J.A. Magallon
@ 2003-11-15  0:14       ` Dustin Lang
  2003-11-28 20:38       ` 2.4.23-pac1 Bernhard Rosenkraenzer
  1 sibling, 0 replies; 10+ messages in thread
From: Dustin Lang @ 2003-11-15  0:14 UTC (permalink / raw)
  To: linux-kernel


Hi,

I've got a new 12" PowerBook G4 that is happily running Ben's 2.4.23-pre5
kernel.  One odd thing happens, though.  When the lid is closed, after a
couple of minutes the machine turns off.  It doesn't /sbin/shutdown, it
just powers off.  Has anyone else had this happen?

Cheers,
dstn.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem
  2003-11-14 23:46   ` J.A. Magallon
  2003-11-14 23:55     ` J.A. Magallon
@ 2003-11-15 12:29     ` Greg Louis
  1 sibling, 0 replies; 10+ messages in thread
From: Greg Louis @ 2003-11-15 12:29 UTC (permalink / raw)
  To: Lista Linux-Kernel

On 20031115 (Sat) at 0046:27 +0100, J.A. Magallon wrote:
> 
> On 11.11, Greg Louis wrote:
> > On 20031111 (Tue) at 1326:47 -0500, Greg Louis wrote:
> > > Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
> > > -rc1-pac1 behave as follows: mounting a remote directory via NFS with
> > > v3 enabled (client and server) seems to work ok, and running mount with
> > > no parameters shows the NFS mount, but any attempt at access fails with
> > > a message like
> > >   /bin/ls: reading directory /whatever/it/was: Input/output error
> > 
> > Reverting all changes to fs/nfs/* since 2.4.23-pre7-pac1, and only
> > those, corrects the problem.

> /metoo
> 
> It works for some time, and then it breaks.
> Could you send me the patch you used to revert those changes ?
> I will try to make a diff from rc1 to pre7 and reverse.

Actually all I did was
rm fs/nfs/*.c
cp ../linux-2.4.23pre7/fs/nfs/*.c fs/nfs

Could well be overkill but it seems to work fine on a farm of mixed
2.4.22 and 2.4.23rc1-with-this-change machines.

-- 
| G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
|  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
|  http://wecanstopspam.org in signatures helps fight junk email. |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* 2.4.23-pac1
@ 2003-11-28 20:38       ` Bernhard Rosenkraenzer
  2003-11-29 13:32         ` 2.4.23-pre8-pac1 and since: NFSv3 problem Greg Louis
  2003-12-02  3:42         ` 2.4.23-pac1 VIA/S3 DRM compilation error Mathias Kretschmer
  0 siblings, 2 replies; 10+ messages in thread
From: Bernhard Rosenkraenzer @ 2003-11-28 20:38 UTC (permalink / raw)
  To: linux-kernel

$SUBJECT is at ftp.kernel.org/pub/linux/kernel/people/bero/2.4/2.4.23/

Changes since 2.4.23-rc5-pac1:
- Increase version number


-- 
Ark Linux - Linux for the masses
http://www.arklinux.org/

Redistribution and processing of this message is subject to
http://www.arklinux.org/terms.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* 2.4.23-pre8-pac1 and since: NFSv3 problem
  2003-11-28 20:38       ` 2.4.23-pac1 Bernhard Rosenkraenzer
@ 2003-11-29 13:32         ` Greg Louis
  2003-12-04 22:41           ` Pozsar Balazs
  2003-12-02  3:42         ` 2.4.23-pac1 VIA/S3 DRM compilation error Mathias Kretschmer
  1 sibling, 1 reply; 10+ messages in thread
From: Greg Louis @ 2003-11-29 13:32 UTC (permalink / raw)
  To: Lista Linux-Kernel; +Cc: Bernhard Rosenkraenzer

This is still present in kernel 2.4.23-pac1.

On 20031115 (Sat) at 0055:23 +0100, J.A. Magallon wrote:
> 
> On 11.15, J.A. Magallon wrote:
> > 
> > On 11.11, Greg Louis wrote:
> > > On 20031111 (Tue) at 1326:47 -0500, Greg Louis wrote:
> > > > Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
> > > > -rc1-pac1 behave as follows: mounting a remote directory via NFS with
> > > > v3 enabled (client and server) seems to work ok, and running mount with
> > > > no parameters shows the NFS mount, but any attempt at access fails with
> > > > a message like
> > > >   /bin/ls: reading directory /whatever/it/was: Input/output error
> > > 
> > > Reverting all changes to fs/nfs/* since 2.4.23-pre7-pac1, and only
> > > those, corrects the problem.
> > > 
> > 
> > /metoo
> > 
> > annwn:~> bpsh 0 mount   
> > none on /proc type proc (rw)
> > none on /dev/pts type devpts (rw,mode=0620)
> > none on /dev/shm type tmpfs (rw)
> > none on /tmp type tmpfs (rw)
> > 192.168.0.1:/lib on /lib type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > 192.168.0.1:/bin on /bin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > 192.168.0.1:/sbin on /sbin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > 192.168.0.1:/usr on /usr type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > 192.168.0.1:/opt on /opt type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > 192.168.0.1:/home on /home type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
> > 192.168.0.1:/work on /work/shared type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
> > 
> > annwn:~> bpsh 0 pwd
> > /home/magallon
> > 
> > annwn:~> bpsh 0 ls
> > ls: reading directory .: Invalid argument
> > 
> > It works for some time, and then it breaks.
> > Could you send me the patch you used to revert those changes ?
> > I will try to make a diff from rc1 to pre7 and reverse.
> 
> Just this (pre7 -> pre8|rc1):
> 
> diff -ruN linux-2.4.23-pre7/fs/nfs/nfs3proc.c linux-2.4.23-rc1/fs/nfs/nfs3proc.c
> --- linux-2.4.23-pre7/fs/nfs/nfs3proc.c	2003-08-25 13:44:43.000000000 +0200
> +++ linux-2.4.23-rc1/fs/nfs/nfs3proc.c	2003-11-12 11:07:48.000000000 +0100
> @@ -433,8 +433,6 @@
>   * The decode function itself doesn't perform any decoding, it just makes
>   * sure the reply is syntactically correct.
>   *
> - * Also note that this implementation handles both plain readdir and
> - * readdirplus.
>   */
>  static int
>  nfs3_proc_readdir(struct inode *dir, struct rpc_cred *cred,
> @@ -448,11 +446,7 @@
>  	struct rpc_message	msg = { NFS3PROC_READDIR, &arg, &res, cred };
>  	int			status;
>  
> -	if (plus)
> -		msg.rpc_proc = NFS3PROC_READDIRPLUS;
> -
> -	dprintk("NFS call  readdir%s %d\n",
> -			plus? "plus" : "", (unsigned int) cookie);
> +	dprintk("NFS call  readdir %d\n", (unsigned int) cookie);
>  
>  	dir_attr.valid = 0;
>  	status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
> diff -ruN linux-2.4.23-pre7/fs/nfs/nfs3xdr.c linux-2.4.23-rc1/fs/nfs/nfs3xdr.c
> --- linux-2.4.23-pre7/fs/nfs/nfs3xdr.c	2002-11-29 00:53:15.000000000 +0100
> +++ linux-2.4.23-rc1/fs/nfs/nfs3xdr.c	2003-11-12 11:07:48.000000000 +0100
> @@ -599,8 +599,6 @@
>  u32 *
>  nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus)
>  {
> -	struct nfs_entry old = *entry;
> -
>  	if (!*p++) {
>  		if (!*p)
>  			return ERR_PTR(-EAGAIN);
> @@ -616,20 +614,12 @@
>  	p = xdr_decode_hyper(p, &entry->cookie);
>  
>  	if (plus) {
> -		p = xdr_decode_post_op_attr(p, &entry->fattr);
> +		struct nfs_fattr fattr;
> +		p = xdr_decode_post_op_attr(p, &fattr);
>  		/* In fact, a post_op_fh3: */
>  		if (*p++) {
> -			p = xdr_decode_fhandle(p, &entry->fh);
> -			/* Ugh -- server reply was truncated */
> -			if (p == NULL) {
> -				dprintk("NFS: FH truncated\n");
> -				*entry = old;
> -				return ERR_PTR(-EAGAIN);
> -			}
> -		} else {
> -			/* If we don't get a file handle, the attrs
> -			 * aren't worth a lot. */
> -			entry->fattr.valid = 0;
> +			struct nfs_fh fh;
> +			p = xdr_decode_fhandle(p, &fh);
>  		}
>  	}
>  
> diff -ruN linux-2.4.23-pre7/fs/nfs/write.c linux-2.4.23-rc1/fs/nfs/write.c
> --- linux-2.4.23-pre7/fs/nfs/write.c	2003-08-25 13:44:43.000000000 +0200
> +++ linux-2.4.23-rc1/fs/nfs/write.c	2003-11-12 11:07:48.000000000 +0100
> @@ -225,8 +225,19 @@
>  	struct inode *inode = page->mapping->host;
>  	unsigned long end_index;
>  	unsigned offset = PAGE_CACHE_SIZE;
> +	int inode_referenced = 0;
>  	int err;
>  
> +	/*
> +	 * Note: We need to ensure that we have a reference to the inode
> +	 *       if we are to do asynchronous writes. If not, waiting
> +	 *       in nfs_wait_on_request() may deadlock with clear_inode().
> +	 *
> +	 *       If igrab() fails here, then it is in any case safe to
> +	 *       call nfs_wb_page(), since there will be no pending writes.
> +	 */
> +	if (igrab(inode) != 0)
> +		inode_referenced = 1;
>  	end_index = inode->i_size >> PAGE_CACHE_SHIFT;
>  
>  	/* Ensure we've flushed out any previous writes */
> @@ -244,7 +255,8 @@
>  		goto out;
>  do_it:
>  	lock_kernel();
> -	if (NFS_SERVER(inode)->wsize >= PAGE_CACHE_SIZE && !IS_SYNC(inode)) {
> +	if (NFS_SERVER(inode)->wsize >= PAGE_CACHE_SIZE && !IS_SYNC(inode) &&
> +			inode_referenced) {
>  		err = nfs_writepage_async(NULL, inode, page, 0, offset);
>  		if (err >= 0)
>  			err = 0;
> @@ -256,7 +268,9 @@
>  	unlock_kernel();
>  out:
>  	UnlockPage(page);
> -	return err; 
> +	if (inode_referenced)
> +		iput(inode);
> +	return err;
>  }
>  
>  /*
> 
> -- 
> J.A. Magallon <jamagallon()able!es>     \                 Software is like sex:
> werewolf!able!es                         \           It's better when it's free
> Mandrake Linux release 10.0 (Cooker) for i586
> Linux 2.4.23-rc1-jam1 (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-4mdk))

-- 
| G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
|  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
|  http://wecanstopspam.org in signatures helps fight junk email. |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* 2.4.23-pac1  VIA/S3 DRM compilation error
  2003-11-28 20:38       ` 2.4.23-pac1 Bernhard Rosenkraenzer
  2003-11-29 13:32         ` 2.4.23-pre8-pac1 and since: NFSv3 problem Greg Louis
@ 2003-12-02  3:42         ` Mathias Kretschmer
  1 sibling, 0 replies; 10+ messages in thread
From: Mathias Kretschmer @ 2003-12-02  3:42 UTC (permalink / raw)
  To: Bernhard Rosenkraenzer; +Cc: linux-kernel

Bernhard Rosenkraenzer wrote:
> $SUBJECT is at ftp.kernel.org/pub/linux/kernel/people/bero/2.4/2.4.23/
> 
> Changes since 2.4.23-rc5-pac1:
> - Increase version number
> 
> 

similar error messages for the via driver. 2.4.22-ac4 worked fine.

make[4]: Entering directory `/usr/src/linux-2.4.22/drivers/char/drm'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=c3 
-falign-functions=0 -falign-jumps=0 -falign-loops=0  -DDO_MUNMAP_4_ARGS 
-nostdinc -iwithprefix include -DKBUILD_BASENAME=savage_drv  -c -o 
savage_drv.o savage_drv.c
savage_drv.c: In function `savage_alloc_continuous_mem':
savage_drv.c:55: error: `drm_savage_alloc_cont_mem_t' undeclared (first 
use in this function)
savage_drv.c:55: error: (Each undeclared identifier is reported only once
savage_drv.c:55: error: for each function it appears in.)
savage_drv.c:55: error: syntax error before "cont_mem"
savage_drv.c:70: error: `cont_mem' undeclared (first use in this function)
savage_drv.c:70: error: syntax error before ')' token
savage_drv.c:70: error: syntax error before ')' token
savage_drv.c:94: error: `DRM_SAVAGE_MEM_LOCATION_PCI' undeclared (first 
use in this function)
savage_drv.c:136: error: syntax error before ')' token
savage_drv.c:136: error: syntax error before ')' token
savage_drv.c:139:2: warning: #warning "Race at the very least"
savage_drv.c: In function `savage_get_physics_address':
savage_drv.c:150: error: `drm_savage_get_physcis_address_t' undeclared 
(first use in this function)
savage_drv.c:150: error: syntax error before "req"
savage_drv.c:157: error: `req' undeclared (first use in this function)
savage_drv.c:157: error: syntax error before ')' token
savage_drv.c:157: error: syntax error before ')' token
savage_drv.c:161:2: warning: #warning "FIXME: need to redo logic for this"
savage_drv.c:182: error: syntax error before ')' token
savage_drv.c:182: error: syntax error before ')' token
savage_drv.c: In function `savage_free_cont_mem':
savage_drv.c:191: error: `drm_savage_alloc_cont_mem_t' undeclared (first 
use in this function)
savage_drv.c:191: error: syntax error before "cont_mem"
savage_drv.c:201: error: `cont_mem' undeclared (first use in this function)
savage_drv.c:201: error: syntax error before ')' token
savage_drv.c:201: error: syntax error before ')' token
savage_drv.c:203:2: warning: #warning "fix size overflow check"
savage_drv.c:225: error: too few arguments to function `do_munmap'
In file included from savage_drv.c:240:
drm_drv.h: At top level:
drm_drv.h:251: error: `DRM_IOCTL_SAVAGE_ALLOC_CONTINUOUS_MEM' undeclared 
here (not in a function)
drm_drv.h:251: error: nonconstant array index in initializer
drm_drv.h:251: error: (near initialization for `savage_ioctls')
drm_drv.h:251: error: `DRM_IOCTL_SAVAGE_GET_PHYSICS_ADDRESS' undeclared 
here (not in a function)
drm_drv.h:251: error: nonconstant array index in initializer
drm_drv.h:251: error: (near initialization for `savage_ioctls')
drm_drv.h:251: error: `DRM_IOCTL_SAVAGE_FREE_CONTINUOUS_MEM' undeclared 
here (not in a function)
drm_drv.h:251: error: nonconstant array index in initializer
drm_drv.h:251: error: (near initialization for `savage_ioctls')
make[4]: *** [savage_drv.o] Error 1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 2.4.23-pre8-pac1 and since: NFSv3 problem
  2003-11-29 13:32         ` 2.4.23-pre8-pac1 and since: NFSv3 problem Greg Louis
@ 2003-12-04 22:41           ` Pozsar Balazs
  0 siblings, 0 replies; 10+ messages in thread
From: Pozsar Balazs @ 2003-12-04 22:41 UTC (permalink / raw)
  To: linux-kernel

Could someone please send a patch to fix this against 2.4.23-pac1?

Thanks in advance.


On Sat, Nov 29, 2003 at 08:32:52AM -0500, Greg Louis wrote:
> This is still present in kernel 2.4.23-pac1.
> 
> On 20031115 (Sat) at 0055:23 +0100, J.A. Magallon wrote:
> > 
> > On 11.15, J.A. Magallon wrote:
> > > 
> > > On 11.11, Greg Louis wrote:
> > > > On 20031111 (Tue) at 1326:47 -0500, Greg Louis wrote:
> > > > > Kernels 2.4.23-pre7-pac1 and 2.4.23-rc1 are ok but -pre8-pac1 and
> > > > > -rc1-pac1 behave as follows: mounting a remote directory via NFS with
> > > > > v3 enabled (client and server) seems to work ok, and running mount with
> > > > > no parameters shows the NFS mount, but any attempt at access fails with
> > > > > a message like
> > > > >   /bin/ls: reading directory /whatever/it/was: Input/output error
> > > > 
> > > > Reverting all changes to fs/nfs/* since 2.4.23-pre7-pac1, and only
> > > > those, corrects the problem.
> > > > 
> > > 
> > > /metoo
> > > 
> > > annwn:~> bpsh 0 mount   
> > > none on /proc type proc (rw)
> > > none on /dev/pts type devpts (rw,mode=0620)
> > > none on /dev/shm type tmpfs (rw)
> > > none on /tmp type tmpfs (rw)
> > > 192.168.0.1:/lib on /lib type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > > 192.168.0.1:/bin on /bin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > > 192.168.0.1:/sbin on /sbin type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > > 192.168.0.1:/usr on /usr type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > > 192.168.0.1:/opt on /opt type nfs (ro,noatime,nfsvers=3,nolock,addr=192.168.0.1)
> > > 192.168.0.1:/home on /home type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
> > > 192.168.0.1:/work on /work/shared type nfs (rw,nfsvers=3,noac,addr=192.168.0.1)
> > > 
> > > annwn:~> bpsh 0 pwd
> > > /home/magallon
> > > 
> > > annwn:~> bpsh 0 ls
> > > ls: reading directory .: Invalid argument
> > > 
> > > It works for some time, and then it breaks.
> > > Could you send me the patch you used to revert those changes ?
> > > I will try to make a diff from rc1 to pre7 and reverse.
> > 
> > Just this (pre7 -> pre8|rc1):
> > 
> > diff -ruN linux-2.4.23-pre7/fs/nfs/nfs3proc.c linux-2.4.23-rc1/fs/nfs/nfs3proc.c
> > --- linux-2.4.23-pre7/fs/nfs/nfs3proc.c	2003-08-25 13:44:43.000000000 +0200
> > +++ linux-2.4.23-rc1/fs/nfs/nfs3proc.c	2003-11-12 11:07:48.000000000 +0100
> > @@ -433,8 +433,6 @@
> >   * The decode function itself doesn't perform any decoding, it just makes
> >   * sure the reply is syntactically correct.
> >   *
> > - * Also note that this implementation handles both plain readdir and
> > - * readdirplus.
> >   */
> >  static int
> >  nfs3_proc_readdir(struct inode *dir, struct rpc_cred *cred,
> > @@ -448,11 +446,7 @@
> >  	struct rpc_message	msg = { NFS3PROC_READDIR, &arg, &res, cred };
> >  	int			status;
> >  
> > -	if (plus)
> > -		msg.rpc_proc = NFS3PROC_READDIRPLUS;
> > -
> > -	dprintk("NFS call  readdir%s %d\n",
> > -			plus? "plus" : "", (unsigned int) cookie);
> > +	dprintk("NFS call  readdir %d\n", (unsigned int) cookie);
> >  
> >  	dir_attr.valid = 0;
> >  	status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
> > diff -ruN linux-2.4.23-pre7/fs/nfs/nfs3xdr.c linux-2.4.23-rc1/fs/nfs/nfs3xdr.c
> > --- linux-2.4.23-pre7/fs/nfs/nfs3xdr.c	2002-11-29 00:53:15.000000000 +0100
> > +++ linux-2.4.23-rc1/fs/nfs/nfs3xdr.c	2003-11-12 11:07:48.000000000 +0100
> > @@ -599,8 +599,6 @@
> >  u32 *
> >  nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus)
> >  {
> > -	struct nfs_entry old = *entry;
> > -
> >  	if (!*p++) {
> >  		if (!*p)
> >  			return ERR_PTR(-EAGAIN);
> > @@ -616,20 +614,12 @@
> >  	p = xdr_decode_hyper(p, &entry->cookie);
> >  
> >  	if (plus) {
> > -		p = xdr_decode_post_op_attr(p, &entry->fattr);
> > +		struct nfs_fattr fattr;
> > +		p = xdr_decode_post_op_attr(p, &fattr);
> >  		/* In fact, a post_op_fh3: */
> >  		if (*p++) {
> > -			p = xdr_decode_fhandle(p, &entry->fh);
> > -			/* Ugh -- server reply was truncated */
> > -			if (p == NULL) {
> > -				dprintk("NFS: FH truncated\n");
> > -				*entry = old;
> > -				return ERR_PTR(-EAGAIN);
> > -			}
> > -		} else {
> > -			/* If we don't get a file handle, the attrs
> > -			 * aren't worth a lot. */
> > -			entry->fattr.valid = 0;
> > +			struct nfs_fh fh;
> > +			p = xdr_decode_fhandle(p, &fh);
> >  		}
> >  	}
> >  
> > diff -ruN linux-2.4.23-pre7/fs/nfs/write.c linux-2.4.23-rc1/fs/nfs/write.c
> > --- linux-2.4.23-pre7/fs/nfs/write.c	2003-08-25 13:44:43.000000000 +0200
> > +++ linux-2.4.23-rc1/fs/nfs/write.c	2003-11-12 11:07:48.000000000 +0100
> > @@ -225,8 +225,19 @@
> >  	struct inode *inode = page->mapping->host;
> >  	unsigned long end_index;
> >  	unsigned offset = PAGE_CACHE_SIZE;
> > +	int inode_referenced = 0;
> >  	int err;
> >  
> > +	/*
> > +	 * Note: We need to ensure that we have a reference to the inode
> > +	 *       if we are to do asynchronous writes. If not, waiting
> > +	 *       in nfs_wait_on_request() may deadlock with clear_inode().
> > +	 *
> > +	 *       If igrab() fails here, then it is in any case safe to
> > +	 *       call nfs_wb_page(), since there will be no pending writes.
> > +	 */
> > +	if (igrab(inode) != 0)
> > +		inode_referenced = 1;
> >  	end_index = inode->i_size >> PAGE_CACHE_SHIFT;
> >  
> >  	/* Ensure we've flushed out any previous writes */
> > @@ -244,7 +255,8 @@
> >  		goto out;
> >  do_it:
> >  	lock_kernel();
> > -	if (NFS_SERVER(inode)->wsize >= PAGE_CACHE_SIZE && !IS_SYNC(inode)) {
> > +	if (NFS_SERVER(inode)->wsize >= PAGE_CACHE_SIZE && !IS_SYNC(inode) &&
> > +			inode_referenced) {
> >  		err = nfs_writepage_async(NULL, inode, page, 0, offset);
> >  		if (err >= 0)
> >  			err = 0;
> > @@ -256,7 +268,9 @@
> >  	unlock_kernel();
> >  out:
> >  	UnlockPage(page);
> > -	return err; 
> > +	if (inode_referenced)
> > +		iput(inode);
> > +	return err;
> >  }
> >  
> >  /*
> > 
> > -- 
> > J.A. Magallon <jamagallon()able!es>     \                 Software is like sex:
> > werewolf!able!es                         \           It's better when it's free
> > Mandrake Linux release 10.0 (Cooker) for i586
> > Linux 2.4.23-rc1-jam1 (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-4mdk))
> 
> -- 
> | G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
> |  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
> |  http://wecanstopspam.org in signatures helps fight junk email. |
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-- 
-- 
pozsy

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-12-04 22:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-11 18:26 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem Greg Louis
2003-11-11 19:00 ` Greg Louis
2003-11-14 23:46   ` J.A. Magallon
2003-11-14 23:55     ` J.A. Magallon
2003-11-15  0:14       ` PowerBook shutdown Dustin Lang
2003-11-28 20:38       ` 2.4.23-pac1 Bernhard Rosenkraenzer
2003-11-29 13:32         ` 2.4.23-pre8-pac1 and since: NFSv3 problem Greg Louis
2003-12-04 22:41           ` Pozsar Balazs
2003-12-02  3:42         ` 2.4.23-pac1 VIA/S3 DRM compilation error Mathias Kretschmer
2003-11-15 12:29     ` 2.4.23-pre8-pac1 and -rc1-pac1 NFSv3 problem Greg Louis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).