From: Dave Chinner <email@example.com> To: Andreas Dilger <firstname.lastname@example.org> Cc: David Howells <email@example.com>, firstname.lastname@example.org, email@example.com Subject: Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available Date: Sat, 19 Nov 2016 09:07:44 +1100 [thread overview] Message-ID: <20161118220744.GC31101@dastard> (raw) In-Reply-To: <F276D85E-16FE-404B-BA51-A2EBA9DADCF2@dilger.ca> On Thu, Nov 17, 2016 at 08:28:57PM -0700, Andreas Dilger wrote: > On Nov 17, 2016, at 4:40 PM, Dave Chinner <firstname.lastname@example.org> wrote: > >> > >> Time fields are split into separate seconds and nanoseconds fields to make > >> packing easier and the granularities can be queried with the filesystem > >> info system call. Note that times will be negative if before 1970; in > >> such a case, the nanosecond fields will also be negative if not zero. > > > > So what happens in ten years time when we want to support > > femptosecond resolution in the timestamp interface? We've got to > > change everything to 64 bit? Shouldn't we just make everything > > timestamp related 64 bit? > > Is this a serious request? Are we going to need to multiply everything > by 10e9 to convert to/from nanoseconds for the next 10 years on the off > chance that we have timestamps more accurate than this in the future? We've been stuck with the stat() interface since, what, the early 1980s? And it will still be used in 10-15 years time. That's a /50-year lifetime/ for a syscall interface. So it's not unreasonable to think that statx() might have a similar lifetime. statx() is clearly intended to support >y2038 dates cleanly, so clearly we're intending statx() to still be around in 20-25 years. And when we start thinking in those timeframes, an increase in timestamp resoultion of at least another 10e-3 is likely.... > > Please isolate the new interface flags completely from the FS_*_FL > > values. We should not repeat the mistake of tying values derived > > from filesystem specific on-disk values to a user interface. > > Using the existing FS_*_FL flags as initial values is not worse than > starting with any other arbitrary values for the flags. Except it starts with a sparse set of flags for no good reason. Someone comes along needed to add a new flag and wonders WTF there are holes in the flags space, and whether it is because flags have been removed and whether it's unsafe to use the flag space in the holes... New user facing APIs should be clean and neat and not carry any unnecessary historical baggage with them.... > >> STATX_ATTR_NONUNIX_OWNERSHIP File doesn't have Unixy ownership > >> STATX_ATTR_HAS_ACL File has an ACL > > > > So statx will require us to do ACL lookups? i.e. instead of just > > reading the inode to get the information, we'll also have to do > > extended attribute lookups? That's potentially very expensive if > > the extended attribute is not stored in the inode.... > > No, there is no requirement to return anything that the caller didn't > ask for. Applications are going to use STATX_ALL because it's simpler than specifying 10 different flags on every statx() call and then checking them on return. i.e. the set/check feature flags API sounds good until you have to write the boiler plate code it requires time you want to stat a file... Cheers, Dave. -- Dave Chinner email@example.com
next prev parent reply other threads:[~2016-11-18 22:08 UTC|newest] Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-17 13:34 [RFC][PATCH 0/4] Enhanced file stat system call David Howells 2016-11-17 13:35 ` [PATCH 1/4] statx: Add a system call to make enhanced file info available David Howells 2016-11-17 18:39 ` Jeff Layton 2016-11-18 2:32 ` Andreas Dilger 2016-11-18 8:59 ` David Howells 2016-11-18 8:59 ` David Howells 2016-11-18 9:25 ` Andreas Dilger 2016-11-18 9:25 ` Andreas Dilger 2016-11-17 23:40 ` Dave Chinner 2016-11-18 3:28 ` Andreas Dilger 2016-11-18 22:07 ` Dave Chinner [this message] 2016-11-18 22:54 ` David Howells 2016-11-19 22:43 ` Dave Chinner 2016-11-21 14:30 ` One Thousand Gnomes 2016-11-21 20:43 ` Dave Chinner 2016-11-22 10:39 ` David Howells 2016-11-22 13:55 ` Jeff Layton 2016-11-22 20:58 ` Dave Chinner 2016-11-18 9:53 ` David Howells 2016-11-18 8:48 ` David Howells 2016-11-18 12:01 ` Jeff Layton 2016-11-18 9:36 ` David Howells 2016-11-18 17:17 ` Jeff Layton 2016-11-18 18:04 ` David Howells 2016-11-18 18:54 ` Jeff Layton 2016-11-18 19:08 ` David Howells 2016-11-18 9:43 ` David Howells 2016-11-18 21:41 ` Dave Chinner 2016-11-18 22:24 ` David Howells 2016-11-18 10:29 ` David Howells 2016-11-18 10:29 ` David Howells 2016-11-18 21:27 ` Dave Chinner 2016-11-18 21:48 ` David Howells 2016-11-18 21:48 ` David Howells 2016-11-18 22:17 ` Dave Chinner 2016-11-18 22:17 ` Dave Chinner 2016-11-19 10:21 ` Michael Kerrisk (man-pages) 2016-11-17 13:35 ` [PATCH 2/4] statx: Ext4: Return enhanced file attributes David Howells 2016-11-18 3:30 ` Andreas Dilger 2016-11-17 13:35 ` [PATCH 3/4] statx: NFS: " David Howells 2016-11-17 13:35 ` [PATCH 4/4] statx: AFS: " David Howells 2016-11-18 3:34 ` Andreas Dilger 2016-11-18 8:47 ` David Howells 2016-11-17 14:39 ` [RFC][PATCH 0/4] Enhanced file stat system call One Thousand Gnomes 2016-11-17 15:10 ` Michael Kerrisk 2016-11-17 16:33 ` David Howells 2016-11-17 16:45 ` David Howells 2016-11-17 20:00 ` J. Bruce Fields 2016-11-18 2:30 ` Andreas Dilger 2016-11-18 4:29 ` NeilBrown 2016-11-18 13:41 ` One Thousand Gnomes 2016-11-18 13:49 ` David Howells
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=20161118220744.GC31101@dastard \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.