linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xfs mknod regression
@ 2007-12-18  4:48 Bret Towe
  2007-12-18 13:46 ` David Chinner
  2007-12-18 17:36 ` Christoph Hellwig
  0 siblings, 2 replies; 6+ messages in thread
From: Bret Towe @ 2007-12-18  4:48 UTC (permalink / raw)
  To: linux-kernel, xfs

I hit a bug in 2.6.24-rc looks to be in 2.6.23 also so not sure how
long it's been there
with an xfs filesystem pbuilder has an issue using device files it
makes for chroot
the mknod command looks to work fine the file is created
however when attempting to use one of the created files you see
something like the below

ghoststar dev # echo "hi" > null
bash: null: No such device or address
ghoststar dev # ls -l null
crw-rw-rw- 1 root root 1, 3 2007-12-17 20:34 null
ghoststar dev # ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 2007-10-05 17:29 /dev/null
ghoststar dev # echo "hi" > /dev/null
ghoststar dev #

I have not done any bisecting yet if needed I can narrow it down
the minor work around I found was to just mount an ext3 filesystem
where pbuilder builds

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

* Re: xfs mknod regression
  2007-12-18  4:48 xfs mknod regression Bret Towe
@ 2007-12-18 13:46 ` David Chinner
  2007-12-18 17:36 ` Christoph Hellwig
  1 sibling, 0 replies; 6+ messages in thread
From: David Chinner @ 2007-12-18 13:46 UTC (permalink / raw)
  To: Bret Towe; +Cc: linux-kernel, xfs

On Mon, Dec 17, 2007 at 08:48:40PM -0800, Bret Towe wrote:
> I hit a bug in 2.6.24-rc looks to be in 2.6.23 also so not sure how
> long it's been there
> with an xfs filesystem pbuilder has an issue using device files it
> makes for chroot
> the mknod command looks to work fine the file is created
> however when attempting to use one of the created files you see
> something like the below
> 
> ghoststar dev # echo "hi" > null
> bash: null: No such device or address
> ghoststar dev # ls -l null
> crw-rw-rw- 1 root root 1, 3 2007-12-17 20:34 null
> ghoststar dev # ls -l /dev/null
> crw-rw-rw- 1 root root 1, 3 2007-10-05 17:29 /dev/null
> ghoststar dev # echo "hi" > /dev/null
> ghoststar dev #

Ok. Works on 2.6.22. doesn't work on latest xfsdev. I'll
look into it.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

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

* Re: xfs mknod regression
  2007-12-18  4:48 xfs mknod regression Bret Towe
  2007-12-18 13:46 ` David Chinner
@ 2007-12-18 17:36 ` Christoph Hellwig
  2007-12-19  0:37   ` David Chinner
  2007-12-19  2:46   ` Bret Towe
  1 sibling, 2 replies; 6+ messages in thread
From: Christoph Hellwig @ 2007-12-18 17:36 UTC (permalink / raw)
  To: Bret Towe; +Cc: linux-kernel, xfs


This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype',
which assigned the re-shuffled ondisk dev_t back to the rdev variable in
xfs_vn_mknod.  Because of that i_rdev is set to the ondisk dev_t instead
of the linux dev_t later down the function.

Fortunately the fix for it is trivial:  we can just remove the
assignment because xfs_revalidate_inode has done the proper job before
unlocking the inode.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c	2007-12-18 18:23:32.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c	2007-12-18 18:23:43.000000000 +0100
@@ -345,9 +345,7 @@ xfs_vn_mknod(
 		ASSERT(vp);
 		ip = vn_to_inode(vp);
 
-		if (S_ISCHR(mode) || S_ISBLK(mode))
-			ip->i_rdev = rdev;
-		else if (S_ISDIR(mode))
+		if (S_ISDIR(mode))
 			xfs_validate_fields(ip);
 		d_instantiate(dentry, ip);
 		xfs_validate_fields(dir);

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

* Re: xfs mknod regression
  2007-12-18 17:36 ` Christoph Hellwig
@ 2007-12-19  0:37   ` David Chinner
  2007-12-20  0:04     ` Rafael J. Wysocki
  2007-12-19  2:46   ` Bret Towe
  1 sibling, 1 reply; 6+ messages in thread
From: David Chinner @ 2007-12-19  0:37 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Bret Towe, linux-kernel, xfs, rjw

On Tue, Dec 18, 2007 at 05:36:42PM +0000, Christoph Hellwig wrote:
> 
> This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype',
> which assigned the re-shuffled ondisk dev_t back to the rdev variable in
> xfs_vn_mknod.  Because of that i_rdev is set to the ondisk dev_t instead
> of the linux dev_t later down the function.
> 
> Fortunately the fix for it is trivial:  we can just remove the
> assignment because xfs_revalidate_inode has done the proper job before
> unlocking the inode.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c	2007-12-18 18:23:32.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c	2007-12-18 18:23:43.000000000 +0100
> @@ -345,9 +345,7 @@ xfs_vn_mknod(
>  		ASSERT(vp);
>  		ip = vn_to_inode(vp);
>  
> -		if (S_ISCHR(mode) || S_ISBLK(mode))
> -			ip->i_rdev = rdev;
> -		else if (S_ISDIR(mode))
> +		if (S_ISDIR(mode))
>  			xfs_validate_fields(ip);
>  		d_instantiate(dentry, ip);
>  		xfs_validate_fields(dir);

Thanks for this, Christoph - I'll run some tests on it and check it in.

Rafael - this is a regression introduced in 2.6.24-rc1 if you want to
track it.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

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

* Re: xfs mknod regression
  2007-12-18 17:36 ` Christoph Hellwig
  2007-12-19  0:37   ` David Chinner
@ 2007-12-19  2:46   ` Bret Towe
  1 sibling, 0 replies; 6+ messages in thread
From: Bret Towe @ 2007-12-19  2:46 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, xfs

On Dec 18, 2007 9:36 AM, Christoph Hellwig <hch@infradead.org> wrote:
>
> This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype',
> which assigned the re-shuffled ondisk dev_t back to the rdev variable in
> xfs_vn_mknod.  Because of that i_rdev is set to the ondisk dev_t instead
> of the linux dev_t later down the function.
>
> Fortunately the fix for it is trivial:  we can just remove the
> assignment because xfs_revalidate_inode has done the proper job before
> unlocking the inode.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

tested the patch on 2 machines and works fine for me

Thanks

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

* Re: xfs mknod regression
  2007-12-19  0:37   ` David Chinner
@ 2007-12-20  0:04     ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2007-12-20  0:04 UTC (permalink / raw)
  To: David Chinner; +Cc: Christoph Hellwig, Bret Towe, linux-kernel, xfs

On Wednesday, 19 of December 2007, David Chinner wrote:
> On Tue, Dec 18, 2007 at 05:36:42PM +0000, Christoph Hellwig wrote:
> > 
> > This was broken by my '[XFS] simplify xfs_create/mknod/symlink prototype',
> > which assigned the re-shuffled ondisk dev_t back to the rdev variable in
> > xfs_vn_mknod.  Because of that i_rdev is set to the ondisk dev_t instead
> > of the linux dev_t later down the function.
> > 
> > Fortunately the fix for it is trivial:  we can just remove the
> > assignment because xfs_revalidate_inode has done the proper job before
> > unlocking the inode.
> > 
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > 
> > Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c
> > ===================================================================
> > --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c	2007-12-18 18:23:32.000000000 +0100
> > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c	2007-12-18 18:23:43.000000000 +0100
> > @@ -345,9 +345,7 @@ xfs_vn_mknod(
> >  		ASSERT(vp);
> >  		ip = vn_to_inode(vp);
> >  
> > -		if (S_ISCHR(mode) || S_ISBLK(mode))
> > -			ip->i_rdev = rdev;
> > -		else if (S_ISDIR(mode))
> > +		if (S_ISDIR(mode))
> >  			xfs_validate_fields(ip);
> >  		d_instantiate(dentry, ip);
> >  		xfs_validate_fields(dir);
> 
> Thanks for this, Christoph - I'll run some tests on it and check it in.
> 
> Rafael - this is a regression introduced in 2.6.24-rc1 if you want to
> track it.

I do, thanks.

Added to the list, http://bugzilla.kernel.org/show_bug.cgi?id=9608 .
I'll close it when the fix is upstream.

Thanks,
Rafael

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

end of thread, other threads:[~2007-12-19 23:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18  4:48 xfs mknod regression Bret Towe
2007-12-18 13:46 ` David Chinner
2007-12-18 17:36 ` Christoph Hellwig
2007-12-19  0:37   ` David Chinner
2007-12-20  0:04     ` Rafael J. Wysocki
2007-12-19  2:46   ` Bret Towe

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).