linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Eric Sandeen <sandeen@redhat.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
Date: Tue, 07 Nov 2006 16:13:00 -0500	[thread overview]
Message-ID: <1162933980.28425.64.camel@dantu.rdu.redhat.com> (raw)
In-Reply-To: <20061107204135.GF29746@wohnheim.fh-wedel.de>

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@redhat.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-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2006-11-07 21:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 18:12 [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability Jeff Layton
2006-11-06 18:22 ` Matthew Wilcox
2006-11-06 18:31   ` Jeff Layton
2006-11-06 18:47   ` Jeff Layton
2006-11-06 20:23     ` Jörn Engel
2006-11-06 20:31       ` Eric Dumazet
2006-11-06 20:56         ` Jeff Layton
2006-11-06 20:50       ` Eric Sandeen
2006-11-06 21:11         ` Jörn Engel
2006-11-06 21:36           ` Eric Sandeen
2006-11-06 22:01             ` Andreas Dilger
2006-11-07 15:56             ` Jeff Layton
2006-11-07 16:07               ` Jeff Layton
2006-11-07 16:10               ` Matthew Wilcox
2006-11-07 17:04               ` Jörn Engel
2006-11-07 17:28               ` Jörn Engel
2006-11-07 17:42                 ` Jörn Engel
2006-11-07 17:53                   ` Dave Kleikamp
2006-11-07 18:07                     ` Jörn Engel
2006-11-07 17:56                   ` Jörn Engel
2006-11-07 18:01                     ` Jörn Engel
2006-11-07 18:10                       ` Eric Sandeen
2006-11-07 19:41                     ` Jeff Layton
2006-11-07 20:41                       ` Jörn Engel
2006-11-07 21:13                         ` Jeff Layton [this message]
2006-11-07 21:20                           ` Matthew Wilcox
2006-11-07 22:09                             ` Jeff Layton
2006-11-07 18:01                 ` Jeff Layton
2006-11-07 18:14                   ` Jörn Engel
2006-11-07 18:23                     ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1162933980.28425.64.camel@dantu.rdu.redhat.com \
    --to=jlayton@redhat.com \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).