All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Dave Chinner <david@fromorbit.com>, Zach Brown <zab@redhat.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux API Mailing List <linux-api@vger.kernel.org>
Subject: Re: [PATCH RFC] vfs: add a O_NOMTIME flag
Date: Mon, 11 May 2015 10:30:58 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1505111020120.28239@cobra.newdream.net> (raw)
In-Reply-To: <CAHQdGtT3rCf-ycAYw-=7HGaemg1+HfY8sw3+kb54VHONxDyP3w@mail.gmail.com>

On Mon, 11 May 2015, Trond Myklebust wrote:
> On Mon, May 11, 2015 at 12:39 PM, Sage Weil <sage@newdream.net> wrote:
> > On Mon, 11 May 2015, Dave Chinner wrote:
> >> On Sun, May 10, 2015 at 07:13:24PM -0400, Trond Myklebust wrote:
> >> > On Fri, May 8, 2015 at 6:24 PM, Sage Weil <sage@newdream.net> wrote:
> >> > > 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.

Agreed.
 
> 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.

This is true, although I argue it is becoming increasingly common for the 
data management (including backups and so forth) to be layered not on top 
of the POSIX file system but on something higher up in the stack. This is 
true of pretty much any distributed system (ceph, cassandra, mongo, etc., 
and I assume commercial databases like Oracle, too) where backups, 
replication, and any other DR strategies need to be orchestrated across 
nodes to be consistent--simply copying files out from underneath them is 
already insufficient and a recipe for disaster.

There is a growing category of applications that can benefit from this 
capability...

> Neither of these examples
> cases are under the control of the application that calls
> open(O_NOMTIME).

Wouldn't a mount option (e.g., allow_nomtime) address this concern?  Only 
nodes provisioned explicitly to run these systems would be enable this 
option.

> >> 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.

Yeah, agreed--this is presumably why open_by_handle(2) (which is what we'd 
like to use) doesn't assume O_NOMTIME.

Thanks!
sage

WARNING: multiple messages have this Message-ID (diff)
From: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
To: Trond Myklebust
	<trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
Cc: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>,
	Zach Brown <zab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Alexander Viro
	<viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	Linux FS-devel Mailing List
	<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux API Mailing List
	<linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH RFC] vfs: add a O_NOMTIME flag
Date: Mon, 11 May 2015 10:30:58 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1505111020120.28239@cobra.newdream.net> (raw)
In-Reply-To: <CAHQdGtT3rCf-ycAYw-=7HGaemg1+HfY8sw3+kb54VHONxDyP3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, 11 May 2015, Trond Myklebust wrote:
> On Mon, May 11, 2015 at 12:39 PM, Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org> wrote:
> > On Mon, 11 May 2015, Dave Chinner wrote:
> >> On Sun, May 10, 2015 at 07:13:24PM -0400, Trond Myklebust wrote:
> >> > On Fri, May 8, 2015 at 6:24 PM, Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org> wrote:
> >> > > 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.

Agreed.
 
> 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.

This is true, although I argue it is becoming increasingly common for the 
data management (including backups and so forth) to be layered not on top 
of the POSIX file system but on something higher up in the stack. This is 
true of pretty much any distributed system (ceph, cassandra, mongo, etc., 
and I assume commercial databases like Oracle, too) where backups, 
replication, and any other DR strategies need to be orchestrated across 
nodes to be consistent--simply copying files out from underneath them is 
already insufficient and a recipe for disaster.

There is a growing category of applications that can benefit from this 
capability...

> Neither of these examples
> cases are under the control of the application that calls
> open(O_NOMTIME).

Wouldn't a mount option (e.g., allow_nomtime) address this concern?  Only 
nodes provisioned explicitly to run these systems would be enable this 
option.

> >> 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.

Yeah, agreed--this is presumably why open_by_handle(2) (which is what we'd 
like to use) doesn't assume O_NOMTIME.

Thanks!
sage

  reply	other threads:[~2015-05-11 17:31 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 22:00 [PATCH RFC] vfs: add a O_NOMTIME flag Zach Brown
2015-05-06 22:00 ` Zach Brown
2015-05-06 22:14 ` Trond Myklebust
2015-05-06 22:19   ` Sage Weil
2015-05-06 22:41     ` Zach Brown
2015-05-06 22:41       ` Zach Brown
2015-05-06 22:46       ` Sage Weil
2015-05-06 22:46         ` Sage Weil
2015-05-06 23:21     ` Theodore Ts'o
2015-05-06 23:21       ` Theodore Ts'o
2015-05-07  0:26 ` Dave Chinner
2015-05-07  0:26   ` Dave Chinner
2015-05-07 17:20   ` Zach Brown
2015-05-07 17:20     ` Zach Brown
2015-05-07 18:43     ` Zach Brown
2015-05-07 19:09     ` Richard Weinberger
2015-05-07 19:09       ` Richard Weinberger
2015-05-07 19:53       ` Andy Lutomirski
     [not found]         ` <554BC4D8.9010507@nod.at>
2015-05-07 20:06           ` Andy Lutomirski
2015-05-08  2:42         ` Dave Chinner
2015-05-08  2:42           ` Dave Chinner
2015-07-14 11:44         ` Pavel Machek
2015-05-08  1:01     ` Sage Weil
2015-05-08  1:23       ` Trond Myklebust
2015-05-08  1:23         ` Trond Myklebust
2015-05-08 15:19         ` Sage Weil
2015-05-08 22:13         ` Dave Chinner
2015-05-08 22:13           ` Dave Chinner
2015-05-08 22:24           ` Sage Weil
2015-05-08 22:24             ` Sage Weil
2015-05-10 23:13             ` Trond Myklebust
2015-05-10 23:13               ` Trond Myklebust
2015-05-11  7:31               ` Dave Chinner
2015-05-11  7:31                 ` Dave Chinner
2015-05-11 16:39                 ` Sage Weil
2015-05-11 17:12                   ` Trond Myklebust
2015-05-11 17:30                     ` Sage Weil [this message]
2015-05-11 17:30                       ` Sage Weil
2015-05-12  1:21                       ` Dave Chinner
2015-05-12 23:12                         ` Sage Weil
2015-05-13  0:57                           ` Dave Chinner
2015-05-12 13:41                       ` John Stoffel
2015-05-12 13:41                         ` John Stoffel
2015-05-11 14:47               ` Theodore Ts'o
2015-05-11 16:24                 ` Sage Weil
2015-05-11 16:24                   ` Sage Weil
2015-05-11 23:10                   ` Theodore Ts'o
2015-05-11 23:10                     ` Theodore Ts'o
2015-05-12  5:08                     ` Kevin Easton
2015-05-12 11:45                       ` Austin S Hemmelgarn
2015-05-12 11:45                         ` Austin S Hemmelgarn
2015-05-12 13:54                         ` John Stoffel
2015-05-12 13:54                           ` John Stoffel
2015-05-12 14:36                           ` J. Bruce Fields
2015-05-12 14:53                             ` Austin S Hemmelgarn
2015-05-12 14:53                               ` Austin S Hemmelgarn
2015-05-12 21:51                               ` Dave Chinner
2015-05-13 15:16                                 ` Austin S Hemmelgarn
2015-05-12 22:39                             ` NeilBrown
2015-05-12 22:39                               ` NeilBrown
2015-05-12 22:39                               ` NeilBrown
2015-07-14 13:13                               ` Pavel Machek
2015-07-14 13:13                                 ` Pavel Machek
2015-07-15  4:54                                 ` NeilBrown
2015-07-15  4:54                                   ` NeilBrown
2015-07-22 13:47                                   ` Pavel Machek
2015-07-22 13:47                                     ` Pavel Machek
2015-05-12 21:35                       ` Sage Weil
2015-05-12 21:35                         ` Sage Weil
2015-05-13 12:32                   ` Jan Kara
2015-05-13 12:32                     ` Jan Kara
2015-05-08 14:29       ` John Stoffel
2015-07-14 11:50         ` Pavel Machek
2015-05-08 14:43       ` Austin S Hemmelgarn
2015-05-08 14:43         ` Austin S Hemmelgarn
2015-05-08 17:11       ` Zach Brown
2015-05-08 17:11         ` Zach Brown
2015-05-08  2:37     ` Dave Chinner
2015-05-08  2:37       ` Dave Chinner
2015-05-08  3:24       ` Andy Lutomirski
2015-05-08  3:24         ` Andy Lutomirski
2015-05-08 14:44         ` Eric Sandeen
2015-05-08 14:44           ` Eric Sandeen
2015-05-11 20:36           ` J. Bruce Fields

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=alpine.DEB.2.00.1505111020120.28239@cobra.newdream.net \
    --to=sage@newdream.net \
    --cc=david@fromorbit.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zab@redhat.com \
    /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 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.