From: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] ensure unique i_ino in filesystems without permanent inode numbers (libfs superblock cleanup)
Date: Fri, 8 Dec 2006 01:16:41 -0500 [thread overview]
Message-ID: <20061208061641.GA24255@filer.fsl.cs.sunysb.edu> (raw)
In-Reply-To: <457891F4.8030501@redhat.com>
On Thu, Dec 07, 2006 at 05:13:08PM -0500, Jeff Layton wrote:
> This patch ensures that the inodes allocated by the functions get_sb_pseudo
> and simple_fill_super are unique, provided of course, that the filesystems
> calling them play by the rules. Currently that isn't the case, but will be
> as I get to each of the filesystems.
>
> The patch itself is pretty simple, but I also had to fix up the callers of
> simple_fill_super to make sure they passed in the seq flag. For this first
> pass, I set it on any filesystem with an empty "files" struct to 0. That may
> need to be revised as I review each filesystem, but should be OK for now.
>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
>
> diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c
> b/drivers/infiniband/hw/ipath/ipath_fs.c
> index d9ff283..c127995 100644
> --- a/drivers/infiniband/hw/ipath/ipath_fs.c
> +++ b/drivers/infiniband/hw/ipath/ipath_fs.c
> @@ -514,7 +514,7 @@ static int ipathfs_fill_super(struct sup
> {""},
> };
>
> - ret = simple_fill_super(sb, IPATHFS_MAGIC, files);
> + ret = simple_fill_super(sb, IPATHFS_MAGIC, files, 1);
I don't know...the magic looking 1 and 0 (later in the patch) seem a bit
arbitrary. Maybe a #define is in order?
> -int simple_fill_super(struct super_block *s, int magic, struct tree_descr
> *files)
> +/*
> + * Some filesystems require that particular entries have particular i_ino
> values. Those
> + * callers need to set the "seq" flag to make sure that i_ino is assigned
> sequentially
> + * to the files starting with 0.
> + */
> +int simple_fill_super(struct super_block *s, int magic, struct tree_descr
> *files, int seq)
Line wraped.
> @@ -399,7 +407,10 @@ int simple_fill_super(struct super_block
> inode->i_blocks = 0;
> inode->i_atime = inode->i_mtime = inode->i_ctime =
> CURRENT_TIME;
I'd indent CURRENT_TIME a bit.
Josef "Jeff" Sipek.
--
If I have trouble installing Linux, something is wrong. Very wrong.
- Linus Torvalds
next prev parent reply other threads:[~2006-12-08 6:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 22:13 Jeff Layton
2006-12-08 6:16 ` Josef Sipek [this message]
2006-12-08 13:08 ` Jeff Layton
2006-12-08 16:25 ` Josef Sipek
2006-12-09 12:17 ` 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=20061208061641.GA24255@filer.fsl.cs.sunysb.edu \
--to=jsipek@fsl.cs.sunysb.edu \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®