linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kalpak Shah <kalpak@clusterfs.com>
Cc: linux-ext4@vger.kernel.org, adilger@clusterfs.com, tytso@mit.edu,
	sct@redhat.com
Subject: Re: [RFC] [PATCH 1/1] nanosecond timestamps
Date: Sun, 25 Feb 2007 02:36:51 -0800	[thread overview]
Message-ID: <20070225023651.8c89f8fc.akpm@linux-foundation.org> (raw)
In-Reply-To: <1170427180.6086.17.camel@garfield>

> On Fri, 02 Feb 2007 20:09:40 +0530 Kalpak Shah <kalpak@clusterfs.com> wrote:
> +#define EXT3_INODE_GET_XTIME(xtime, extra_xtime, inode, raw_inode)
> \
> +do {
> \
> +	(inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);
> \
> +									      \
> +	if (offsetof(typeof(*raw_inode), extra_xtime) -
> \
> +	    offsetof(typeof(*raw_inode), i_extra_isize) +
> \
> +   	    sizeof((raw_inode)->extra_xtime) <=
> \
> +	    le16_to_cpu((raw_inode)->i_extra_isize)) {
> \
> +		if (sizeof((inode)->xtime.tv_sec) > 4)                        \
> +			(inode)->xtime.tv_sec |=                              \
> +			(__u64)(le32_to_cpu((raw_inode)->extra_xtime) &       \
> +				EXT3_EPOCH_MASK) << 32;                       \
> +			(inode)->xtime.tv_nsec =                              \
> +				(le32_to_cpu((raw_inode)->extra_xtime) &      \
> +				EXT3_NSEC_MASK) >> 2;                         \
> +	}
> \
> +} while (0)

ow, my eyes.  Can we find a way to do this in C rather than in cpp?

> +static inline struct timespec ext3_current_time(struct inode *inode)
> +{
> +	return (inode->i_sb->s_time_gran < 1000000000) ?

NSEC_PER_SEC

> +		current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
> +}

  parent reply	other threads:[~2007-02-25 10:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-02-26 21:42   ` Andreas Dilger
2007-02-26 23:20     ` Dave Kleikamp
2007-02-27  0:11       ` Andreas Dilger
  -- strict thread matches above, loose matches on Subject: below --
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
2007-02-07 20:50 ` Johann Lombardi

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=20070225023651.8c89f8fc.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --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;
as well as URLs for NNTP newsgroup(s).