From: Johann Lombardi <johann.lombardi@bull.net>
To: Kalpak Shah <kalpak@clusterfs.com>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>,
Andreas Dilger <adilger@clusterfs.com>, tytso <tytso@mit.edu>,
sct <sct@redhat.com>
Subject: Re: [RFC] [PATCH 1/1] Nanosecond timestamps
Date: Tue, 6 Feb 2007 16:12:42 +0100 [thread overview]
Message-ID: <20070206151242.GB3140@lombardij> (raw)
In-Reply-To: <1170427790.6464.6.camel@garfield>
On Fri, Feb 02, 2007 at 08:19:50PM +0530, Kalpak Shah wrote:
> Index: linux-2.6.19/fs/ext3/super.c
> ===================================================================
> --- linux-2.6.19.orig/fs/ext3/super.c
> +++ linux-2.6.19/fs/ext3/super.c
> @@ -1770,6 +1772,32 @@ static int ext3_fill_super (struct super
> }
>
> ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
> +
> + /* determine the minimum size of new large inodes, if present */
> + if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
> + EXT3_SB(sb)->s_want_extra_isize = sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE;
Maybe EXT3_SB(sb)-> could be replaced by sbi-> here and in the lines below.
> + if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
> + EXT3_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
> + if (EXT3_SB(sb)->s_want_extra_isize <
> + le32_to_cpu(es->s_want_extra_isize))
^^
> + EXT3_SB(sb)->s_want_extra_isize =
> + le32_to_cpu(es->s_want_extra_isize);
^^
> + if (EXT3_SB(sb)->s_want_extra_isize <
> + le32_to_cpu(es->s_min_extra_isize))
^^
> + EXT3_SB(sb)->s_want_extra_isize =
> + le32_to_cpu(es->s_min_extra_isize);
^^
Since es->s_{min,want}_extra_isize are both __u16 (BTW, shouldn't it be __le16?),
I think you should use le16_to_cpu() instead of le32_to_cpu().
> + }
> + }
> + /* Check if enough inode space is available */
> + if (EXT3_GOOD_OLD_INODE_SIZE + EXT3_SB(sb)->s_want_extra_isize >
> + sbi->s_inode_size) {
> + EXT3_SB(sb)->s_want_extra_isize = sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE;
> + printk(KERN_INFO "EXT3-fs: required extra inode space not"
> + "available.\n");
> + }
If the inode size is EXT3_GOOD_OLD_INODE_SIZE, sbi->s_want_extra_isize won't be
initialized. However, it should not be an issue because the ext3_sb_info
is set to zero in ext3_fill_super().
Johann
next prev parent reply other threads:[~2007-02-06 15:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-02 14:49 [RFC] [PATCH 1/1] Nanosecond timestamps Kalpak Shah
2007-02-06 15:12 ` Johann Lombardi [this message]
2007-02-07 20:39 ` Andreas Dilger
2007-02-07 21:05 ` Dave Kleikamp
2007-02-08 10:33 ` Johann Lombardi
2007-02-08 10:30 ` Johann Lombardi
2007-02-13 13:16 ` [PATCH Take2 " Kalpak Shah
2007-02-19 9:56 ` Johann Lombardi
2007-02-07 20:50 ` [RFC] [PATCH " Johann Lombardi
-- strict thread matches above, loose matches on Subject: below --
2007-02-02 14:39 [RFC] [PATCH 1/1] nanosecond timestamps Kalpak Shah
2007-02-06 4:09 ` Theodore Tso
2007-02-07 17:58 ` Andreas Dilger
2007-02-15 17:51 ` Theodore Tso
2007-02-25 10:36 ` Andrew Morton
2007-02-26 21:42 ` Andreas Dilger
2007-02-26 23:20 ` Dave Kleikamp
2007-02-27 0:11 ` Andreas Dilger
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=20070206151242.GB3140@lombardij \
--to=johann.lombardi@bull.net \
--cc=adilger@clusterfs.com \
--cc=kalpak@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sct@redhat.com \
--cc=tytso@mit.edu \
/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