Re: [PATCH RFC] vfs: add a O_NOMTIME flag

3 messages, 3 authors, 2015-05-11 · open the first message on its own page

Re: [PATCH RFC] vfs: add a O_NOMTIME flag

From: Dave Chinner <hidden>
Date: 2015-05-11 07:31:04

On Sun, May 10, 2015 at 07:13:24PM -0400, Trond Myklebust wrote:
On Fri, May 8, 2015 at 6:24 PM, Sage Weil [off-list ref] wrote:
quoted
I'm sure you realize what we're try to achieve is the same "invisible IO"
that the XFS open by handle ioctls do by default.  Would you be more
comfortable if this option where only available to the generic
open_by_handle syscall, and not to open(2)?
It should be an ioctl(). It has no business being part of
open_by_handle either, since that is another generic interface.
I'm happy for it to be an ioctl interface - even an XFS specific
interface if you want to go that route, Sage - and it probably
should emit a warning to syslog first time it is used so there is
trace for bug triage purposes. i.e. we know the app is not using
mtime updates, so bug reports that are the result of mtime
mishandling don't result in large amounts of wasted developer time
trying to understand them...

Cheers,

Dave.
-- 
Dave Chinner
david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org

Re: [PATCH RFC] vfs: add a O_NOMTIME flag

From: Sage Weil <hidden>
Date: 2015-05-11 16:39:53

On Mon, 11 May 2015, Dave Chinner wrote:
On Sun, May 10, 2015 at 07:13:24PM -0400, Trond Myklebust wrote:
quoted
On Fri, May 8, 2015 at 6:24 PM, Sage Weil [off-list ref] wrote:
quoted
I'm sure you realize what we're try to achieve is the same "invisible IO"
that the XFS open by handle ioctls do by default.  Would you be more
comfortable if this option where only available to the generic
open_by_handle syscall, and not to open(2)?
It should be an ioctl(). It has no business being part of
open_by_handle either, since that is another generic interface.
Our use-case doesn't make sense on network file systems, but it does on 
any reasonably featureful local filesystem, and the goal is to be generic 
there.  If mtime is critical to a network file system's consistency it 
seems pretty reasonable to disallow/ignore it for just that file system 
(e.g., by masking off the flag at open time), as others won't have that 
same problem (cephfs doesn't, for example).

Perhaps making each fs opt-in instead of handling it in a generic path 
would alleviate this concern?
I'm happy for it to be an ioctl interface - even an XFS specific
interface if you want to go that route, Sage - and it probably
should emit a warning to syslog first time it is used so there is
trace for bug triage purposes. i.e. we know the app is not using
mtime updates, so bug reports that are the result of mtime
mishandling don't result in large amounts of wasted developer time
trying to understand them...
A warning on using the interface (or when mounting with user_nomtime) 
sounds reasonable.

I'd rather not make this XFS specific as other local filesystmes (ext4, 
f2fs, possibly btrfs) would similarly benefit.  (And if we want to target 
XFS specifically the existing XFS open-by-handle ioctl is sufficient as it 
already does O_NOMTIME unconditionally.)

sage

Re: [PATCH RFC] vfs: add a O_NOMTIME flag

From: Trond Myklebust <hidden>
Date: 2015-05-11 17:12:33

On Mon, May 11, 2015 at 12:39 PM, Sage Weil [off-list ref] wrote:
On Mon, 11 May 2015, Dave Chinner wrote:
quoted
On Sun, May 10, 2015 at 07:13:24PM -0400, Trond Myklebust wrote:
quoted
On Fri, May 8, 2015 at 6:24 PM, Sage Weil [off-list ref] wrote:
quoted
I'm sure you realize what we're try to achieve is the same "invisible IO"
that the XFS open by handle ioctls do by default.  Would you be more
comfortable if this option where only available to the generic
open_by_handle syscall, and not to open(2)?
It should be an ioctl(). It has no business being part of
open_by_handle either, since that is another generic interface.
Our use-case doesn't make sense on network file systems, but it does on
any reasonably featureful local filesystem, and the goal is to be generic
there.  If mtime is critical to a network file system's consistency it
seems pretty reasonable to disallow/ignore it for just that file system
(e.g., by masking off the flag at open time), as others won't have that
same problem (cephfs doesn't, for example).

Perhaps making each fs opt-in instead of handling it in a generic path
would alleviate this concern?
The issue isn't whether or not you have a network file system, it's
whether or not you want users to be able to manage data. mtime isn't
useful for the application (which knows whether or not it has changed
the file) or for the filesystem (ditto). It exists, rather, in order
to enable data management by users and other applications, letting
them know whether or not the data contents of the file have changed,
and when that change occurred.

If you are able to guarantee that your users don't care about that,
then fine, but that would be a very special case that doesn't fit the
way that most data centres are run. Backups are one case where mtime
matters, tiering and archiving is another. Neither of these examples
cases are under the control of the application that calls
open(O_NOMTIME).
quoted
I'm happy for it to be an ioctl interface - even an XFS specific
interface if you want to go that route, Sage - and it probably
should emit a warning to syslog first time it is used so there is
trace for bug triage purposes. i.e. we know the app is not using
mtime updates, so bug reports that are the result of mtime
mishandling don't result in large amounts of wasted developer time
trying to understand them...
A warning on using the interface (or when mounting with user_nomtime)
sounds reasonable.

I'd rather not make this XFS specific as other local filesystmes (ext4,
f2fs, possibly btrfs) would similarly benefit.  (And if we want to target
XFS specifically the existing XFS open-by-handle ioctl is sufficient as it
already does O_NOMTIME unconditionally.)
Lack of a namespace, doesn't imply that you don't want to manage the
data. The whole point of using object storage instead of plain old
block storage is to be able to provide whatever metadata you still
need in order to manage the object.

Cheers
  Trond
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help