linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: cmm@us.ibm.com, Kalpak Shah <kalpak@clusterfs.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [EXT4 set 3][PATCH 1/1] ext4 nanosecond timestamp
Date: Wed, 04 Jul 2007 12:54:18 +0530	[thread overview]
Message-ID: <468B4B22.7040605@linux.vnet.ibm.com> (raw)
In-Reply-To: <468B3FDA.7060809@linux.vnet.ibm.com>



Aneesh Kumar K.V wrote:
> 
> 
> Mingming Cao wrote:
>> On Tue, 2007-07-03 at 15:58 +0530, Kalpak Shah wrote:
>>> On Sun, 2007-07-01 at 03:36 -0400, Mingming Cao wrote:
>>>> +
>>>> +#define EXT4_INODE_GET_XTIME(xtime, inode, 
>>>> raw_inode)                   \
>>>> +do {                                           \
>>>> +    (inode)->xtime.tv_sec = 
>>>> le32_to_cpu((raw_inode)->xtime);           \
>>>> +    if (EXT4_FITS_IN_INODE(raw_inode, EXT4_I(inode), xtime ## 
>>>> _extra))     \
>>>> +        ext4_decode_extra_time(&(inode)->xtime,                   \
>>>> +                       raw_inode->xtime ## _extra);           \
>>>> +} while (0)
>>>> +
>>>> +#define EXT4_EINODE_GET_XTIME(xtime, einode, 
>>>> raw_inode)                   \
>>>> +do {                                           \
>>>> +    if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime))               \
>>>> +        (einode)->xtime.tv_sec = 
>>>> le32_to_cpu((raw_inode)->xtime);      \
>>>> +    if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## 
>>>> _extra))           \
>>>> +        ext4_decode_extra_time(&(einode)->xtime,               \
>>>> +                       raw_inode->xtime ## _extra);           \
>>>> +} while (0)
>>>> +
>>> This nanosecond patch seems to be missing the fix below which is 
>>> required for http://bugzilla.kernel.org/show_bug.cgi?id=5079
>>>
>>> If the timestamp is set to before epoch i.e. a negative timestamp 
>>> then the file may have its date set into the future on 64-bit 
>>> systems. So when the timestamp is read it must be cast as signed.
>>
>> Missed this one.
>> Thanks. Will update ext4 patch queue tonight with this fix.
>>
>>
> 
> 
> IIRC in the conference call it was decided to not to apply this patch. 
> Andreas may be able to update better.
> 


Looking at the git log i understand the core patch got applied to ext4 tree with the comment
from Andreas. So may be we can apply this patch also.


commit 4d7bf11d649c72621ca31b8ea12b9c94af380e63

Andreas says:
    
    This patch is now treating timestamps with the high bit set as negative
    times (before Jan 1, 1970).  This means we lose 1/2 of the possible range
    of timestamps (lopping off 68 years before unix timestamp overflow -
    now only 30 years away :-) to handle the extremely rare case of setting
    timestamps into the distant past.
    
    If we are only interested in fixing the underflow case, we could just
    limit the values to 0 instead of storing negative values.  At worst this
    will skew the timestamp by a few hours for timezones in the far east
    (files would still show Jan 1, 1970 in "ls -l" output).
    
    That said, it seems 32-bit systems (mine at least) allow files to be set
    into the past (01/01/1907 works fine) so it seems this patch is bringing
    the x86_64 behaviour into sync with other kernels.
    
    On the plus side, we have a patch that is ready to add nanosecond timestamps
    to ext3 and as an added bonus adds 2 high bits to the on-disk timestamp so
    this extends the maximum date to 2242.
    
NOTE: The conference call i mentioned above is http://ext4.wiki.kernel.org/index.php/Ext4_Developer%27s_Conference_Call


-aneesh

  reply	other threads:[~2007-07-04  7:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01  7:36 [EXT4 set 3][PATCH 1/1] ext4 nanosecond timestamp Mingming Cao
2007-07-03  6:37 ` Aneesh Kumar K.V
2007-07-03 10:28 ` Kalpak Shah
2007-07-04  3:32   ` Mingming Cao
2007-07-04  6:36     ` Aneesh Kumar K.V
2007-07-04  7:24       ` Aneesh Kumar K.V [this message]
2007-07-04 16:44       ` Andreas Dilger
2007-07-03 10:41 ` Kalpak Shah
2007-07-10 23:30 ` Andrew Morton
2007-07-11  2:00   ` Mingming Cao
2007-07-11 11:14     ` Andreas Dilger
2007-07-11 11:28   ` Andreas Dilger
2007-07-12 12:58   ` Kalpak Shah
2007-07-13  4:29     ` Aneesh Kumar K.V
2007-07-13  7:05       ` Kalpak Shah
2007-07-13 21:46         ` Mingming Cao
2007-07-17  0:49   ` Mingming Cao
2007-07-17  9:59     ` Kalpak Shah
2007-07-17 19:08       ` Mingming Cao
2007-07-17 20:44         ` ext4 patch queue updated Mingming Cao

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=468B4B22.7040605@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=kalpak@clusterfs.com \
    --cc=linux-ext4@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).