public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Johann Lombardi <johann.lombardi@bull.net>
To: Andreas Dilger <adilger@clusterfs.com>
Cc: Kalpak Shah <kalpak@clusterfs.com>,
	linux-ext4 <linux-ext4@vger.kernel.org>, tytso <tytso@mit.edu>,
	sct <sct@redhat.com>
Subject: Re: [RFC] [PATCH 1/1] Nanosecond timestamps
Date: Thu, 8 Feb 2007 11:30:25 +0100	[thread overview]
Message-ID: <20070208103025.GB13836@lombardij> (raw)
In-Reply-To: <20070207203946.GB6565@schatzie.adilger.int>

On Wed, Feb 07, 2007 at 01:39:46PM -0700, Andreas Dilger wrote:
> This has been a bug in several places already, and I wonder if the
> le*_to_cpu() and cpu_to_le*() macros shouldn't do some type checking
> instead of just casting the variable to the specified type?

That would be great.

> The only problem is if casting constants it would be a bit of a pain
> to have to cast them explicitly, though we could have something like:
> 
> #define le16_to_cpu(var) (__builtin_constant(var) || !typecheck(__u16, var) ? \
> 			  __constant_cpu_to_le16(var) : __le16_to_cpu(var))

Very good idea!

> The only question is whether "typecheck" adds extra variables on the stack
> or if the compiler will always optimize them away.

I tend to think it will always be optimized by the compiler.
 
> > 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().
> 
> So I'm not sure I understand if you have an objection or if this is just a
> comment.

Just a useless comment :)

> sbi->s_want_extra_isize will be zero and it is not possible for
> sbi->s_inode_size < EXT3_GOOD_OLD_INODE_SIZE so this case won't be hit.

I agree.

Cheers,
Johann

  parent reply	other threads:[~2007-02-08 10:29 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
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 [this message]
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=20070208103025.GB13836@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