[Top] [All Lists]

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

To: "Theodore Ts'o" <tytso@xxxxxxx>, Chuck Lever <chuck.lever@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>, 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>
Subject: Re: [RFC 11/32] xfs: convert to struct inode_time
From: "H. Peter Anvin" <hpa@xxxxxxxxx>
Date: Mon, 02 Jun 2014 16:33:33 -0700
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140602233212.GA2060@xxxxxxxxx>
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> <20140602153124.GH30598@xxxxxxxxx> <538CB085.5000502@xxxxxxxxx> <20140602222954.GA29690@xxxxxxxxx> <538CFB83.20703@xxxxxxxxx> <20140602233212.GA2060@xxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
On 06/02/2014 04:32 PM, Theodore Ts'o wrote:
> On Mon, Jun 02, 2014 at 03:32:35PM -0700, H. Peter Anvin wrote:
>> On 06/02/2014 03:29 PM, Theodore Ts'o wrote:
>>> And since we are already returning (time_t) -1 in some cases, we might
>>> as well try to make things a bit more formal.
>> Are we?  I am not aware of *Linux* actually using that.
> Linux's time(2) can return (time_t) -1 and set errno to EFAULT, per
> the Posix specification:
> SYSCALL_DEFINE1(time, time_t __user *, tloc)
> {
>       time_t i = get_seconds();
>       if (tloc) {
>               if (put_user(i,tloc))
>                       return -EFAULT;
>       }
>       force_successful_syscall_return();
>       return i;
> }

OK, I guess I should have said... other than for -EFAULT.

I just don't know of anyone using time(2) with an argument other than NULL.


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