xfs
[Top] [All Lists]

Re: [RFC 11/32] xfs: convert to struct inode_time

To: Chuck Lever <chuck.lever@xxxxxxxxxx>
Subject: Re: [RFC 11/32] xfs: convert to struct inode_time
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Mon, 2 Jun 2014 11:31:24 -0400
Cc: Arnd Bergmann <arnd@xxxxxxxx>, Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, LKML Kernel <linux-kernel@xxxxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx, joseph@xxxxxxxxxxxxxxxx, john.stultz@xxxxxxxxxx, Christoph Hellwig <hch@xxxxxxxxxxxxx>, tglx@xxxxxxxxxxxxx, geert@xxxxxxxxxxxxxx, lftan@xxxxxxxxxx, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, Linux NFS Mailing List <linux-nfs@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=cWoRZ+C543MkRYENReeRvChAr48BlK+44YNULIf0DXo=; b=SZurO324qDpTk06OJ38cQeeiRxGx8Qc7pt68dS6f9CdAfqL2mB9BTEQG+R/GMgt68y68xwZzyQPRQ/366m+u+BMLSwYhJe1UZpNYN0sctobfO1GXp4xcuuRVG84LSD/Aethe5NoKHmukJ5OvsbrS4b0VfUME1yEoBeHnmuqmkKQ=;
In-reply-to: <6868F108-F0B2-423F-AE31-90DF86A5B7DD@xxxxxxxxxx>
Mail-followup-to: Theodore Ts'o <tytso@xxxxxxx>, Chuck Lever <chuck.lever@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, LKML Kernel <linux-kernel@xxxxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx, joseph@xxxxxxxxxxxxxxxx, john.stultz@xxxxxxxxxx, Christoph Hellwig <hch@xxxxxxxxxxxxx>, tglx@xxxxxxxxxxxxx, geert@xxxxxxxxxxxxxx, lftan@xxxxxxxxxx, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, Linux NFS Mailing List <linux-nfs@xxxxxxxxxxxxxxx>
References: <1401480116-1973111-1-git-send-email-arnd@xxxxxxxx> <8618458.1EVJCoVbkH@wuerfel> <alpine.LFD.2.11.1406012121430.17310@xxxxxxxxxxx> <4178301.j9kWdGCRLC@wuerfel> <6868F108-F0B2-423F-AE31-90DF86A5B7DD@xxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Mon, Jun 02, 2014 at 11:04:23AM -0400, Chuck Lever wrote:
> Iâm wondering what should be done about NFS. A solution for NFS should
> match any scheme that is considered for local file systems, IMO.
> 
> An alternative would be to âcapâ the timestamps transmitted via NFSv3 by
> Linux, so that a pre-epoch timestamp is transmitted as zero, and a large
> timestamp is transmitted as UINT_MAX.


I wonder if it would make sense to try to promulgate via the Austin
group, and possibly the C standards committee the concept of a bit
pattern (that might commonly be INT_MAX or UINT_MAX) that means "time
unknown", or "time indefinite" or "we couldn't encode the time".

We would then teach gmtime(3) and asctime(3) to print some appropriate
message, and we could teach programs like find (with the -mtime)
option, make, tmpwatch, et. al., that they can't make any presumption
about the comparibility of any timestamp which has a value of
TIME_UNDEFINIED.

It would be problematic for time(2) or gettimeofday(2) to return
TIME_UNDEFINED, since there are programs that care about time ticking
forward, but I could imagine a new interface which would be permitted
to return a flag indicating that we don't know the current time
(because the CMOS battery had run down, etc.) so instead we're going
to be counting the number of seconds since the system was booted.

                                       - Ted

<Prev in Thread] Current Thread [Next in Thread>