[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1162933980.28425.64.camel@dantu.rdu.redhat.com>
Date: Tue, 07 Nov 2006 16:13:00 -0500
From: Jeff Layton <jlayton@...hat.com>
To: Jörn Engel <joern@...nheim.fh-wedel.de>
Cc: Eric Sandeen <sandeen@...hat.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels
that offer x86 compatability
On Tue, 2006-11-07 at 21:41 +0100, Jörn Engel wrote:
> On Tue, 7 November 2006 14:41:04 -0500, Jeff Layton wrote:
> >
> > How about this patch instead here? I don't think anything depends on
> > i_ino being any certain value for these files, and this seems less
> > "magic-numbery". This should also mostly prevent us from assigning out
> > i_ino=0.
>
> nfsctl_transaction_write() appears to depend on i_ino.
>
> Jörn
>
Ahh, correct. That could probably stand to be a bit more robust, but I
don't want to tackle it now. How about this instead, which should just
set it to the maximum allowed value of s->s_lastino? It might throw a
compile-time warning about overflowing i_ino, but I think it'll still
work.
Signed-off-by: Jeff Layton <jlayton@...hat.com>
diff --git a/fs/libfs.c b/fs/libfs.c
index bd08e0e..d9f4e3e 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -373,6 +373,9 @@ int simple_fill_super(struct super_block
inode = new_inode(s);
if (!inode)
return -ENOMEM;
+ /* ino must not collide with any ino assigned in the loop below. Set
+ it to the highest possible inode number */
+ inode->i_ino = (1 << (sizeof(s->s_lastino) * 8)) - 1;
inode->i_mode = S_IFDIR | 0755;
inode->i_uid = inode->i_gid = 0;
inode->i_blocks = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists