[Ocfs2-devel] [BUG] strange behavior with mknod on ocfs2

Mark Fasheh mark.fasheh at oracle.com
Thu Mar 25 14:55:42 CST 2004


On Wed, Mar 24, 2004 at 08:05:42PM -0800, Rusty Lynch wrote:
> I just created a new bug in bugzilla for some wacky bahavior around mknod.
> 
> The following is cut out of the bug report at ==>
> http://oss.oracle.com/bugzilla/show_bug.cgi?id=52
> 
> On a 2.4 build, creating devices with mknod will result in the in-memory major
> and minor numbers not matching the on-disk major and minor numbers (untill the
> filesystem is remounted.)
hmmm, i think we're forgetting to stuff the device in inode->i_rdev. Does
this patch help? It seems to on my build.
	--Mark

--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh at oracle.com

Index: namei.c
===================================================================
--- namei.c	(revision 806)
+++ namei.c	(working copy)
@@ -300,6 +300,7 @@ int ocfs_mknod (struct inode *dir, struc
 		BUG();
 	oin->inode = inode;
 
+	inode->i_rdev = dev;
 	ocfs_populate_inode (inode, fe, mode, oin, true);
 	insert_inode_hash (inode);
 	ocfs_inode_hash_bind(osb, GET_INODE_VOTEOFF(inode), inode);


More information about the Ocfs2-devel mailing list