From: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
To: Kevin Easton <kevin-RFfraI6bZkdAfugRpC6u6w@public.gmane.org>
Cc: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
Trond Myklebust
<trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>,
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: Tue, 12 May 2015 14:35:52 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1505112225170.28239@cobra.newdream.net> (raw)
In-Reply-To: <20150512050821.GA9404-Qr0l8DEfScZEV+tojptmR0B+6BGkLq7r@public.gmane.org>
On Tue, 12 May 2015, Kevin Easton wrote:
> On Mon, May 11, 2015 at 07:10:21PM -0400, Theodore Ts'o wrote:
> > On Mon, May 11, 2015 at 09:24:09AM -0700, Sage Weil wrote:
> > > > Let me re-ask the question that I asked last week (and was apparently
> > > > ignored). Why not trying to use the lazytime feature instead of
> > > > pointing a head straight at the application's --- and system
> > > > administrators' --- heads?
> > >
> > > Sorry Ted, I thought I responded already.
> > >
> > > The goal is to avoid inode writeout entirely when we can, and
> > > as I understand it lazytime will still force writeout before the inode
> > > is dropped from the cache. In systems like Ceph in particular, the
> > > IOs can be spread across lots of files, so simply deferring writeout
> > > doesn't always help.
> >
> > Sure, but it would reduce the writeout by orders of magnitude. I can
> > understand if you want to reduce it further, but it might be good
> > enough for your purposes.
> >
> > I considered doing the equivalent of O_NOMTIME for our purposes at
> > $WORK, and our use case is actually not that different from Ceph's
> > (i.e., using a local disk file system to support a cluster file
> > system), and lazytime was (a) something I figured was something I
> > could upstream in good conscience, and (b) was more than good enough
> > for us.
>
> A safer alternative might be a chattr file attribute that if set, the
> mtime is not updated on writes, and stat() on the file always shows the
> mtime as "right now". At least that way, the file won't accidentally
> get left out of backups that rely on the mtime.
>
> (If the file attribute is unset, you immediately update the mtime then
> too, and from then on the file is back to normal).
Interesting! I didn't realize there was already a chattr +A that disabled
atime (although I suspect it doesn't do the "right now" for stat thing).
This makes the nomtime-ness a bit more obscure (I don't think most users
would think to check these file attributes), but it's a safer failure
condition for backups at least.
The fact that chattr +A (and hopefully +M) will work for non-root is a
bonus, as we're also trying to get ceph daemons to drop most privileges.
sage
next prev parent reply other threads:[~2015-05-12 21:35 UTC|newest]
Thread overview: 52+ 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:14 ` Trond Myklebust
2015-05-06 22:19 ` Sage Weil
[not found] ` <alpine.DEB.2.00.1505061515550.28239-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2015-05-06 22:41 ` Zach Brown
[not found] ` <20150506224113.GA17282-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2015-05-06 22:46 ` Sage Weil
2015-05-06 23:21 ` Theodore Ts'o
[not found] ` <1430949612-21356-1-git-send-email-zab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-07 0:26 ` Dave Chinner
2015-05-07 17:20 ` Zach Brown
2015-05-07 18:43 ` Zach Brown
2015-05-08 1:01 ` Sage Weil
[not found] ` <alpine.DEB.2.00.1505071752520.28239-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2015-05-08 1:23 ` Trond Myklebust
2015-05-08 15:19 ` Sage Weil
[not found] ` <CAHQdGtQjMHA8rVPkggB2zMz=k3O667+APH_1EY_2FtYmHL7-hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-08 22:13 ` Dave Chinner
2015-05-08 22:24 ` Sage Weil
[not found] ` <alpine.DEB.2.00.1505081517470.28239-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2015-05-10 23:13 ` Trond Myklebust
[not found] ` <CAHQdGtTFTN2XuvmarFZ9HPQV=cuhh7FosdHSrJME_U4htr=i8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-11 7:31 ` Dave Chinner
2015-05-11 16:39 ` Sage Weil
2015-05-11 17:12 ` Trond Myklebust
[not found] ` <CAHQdGtT3rCf-ycAYw-=7HGaemg1+HfY8sw3+kb54VHONxDyP3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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
[not found] ` <alpine.DEB.2.00.1505111020120.28239-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2015-05-12 13:41 ` John Stoffel
2015-05-11 14:47 ` Theodore Ts'o
[not found] ` <20150511144719.GA14088-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2015-05-11 16:24 ` Sage Weil
[not found] ` <alpine.DEB.2.00.1505110920520.28239-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2015-05-11 23:10 ` Theodore Ts'o
2015-05-12 5:08 ` Kevin Easton
[not found] ` <20150512050821.GA9404-Qr0l8DEfScZEV+tojptmR0B+6BGkLq7r@public.gmane.org>
2015-05-12 11:45 ` Austin S Hemmelgarn
[not found] ` <5551E7EB.8040301-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-12 13:54 ` John Stoffel
2015-05-12 14:36 ` J. Bruce Fields
[not found] ` <20150512143637.GA6370-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
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
[not found] ` <20150513083951.5eb63bc0-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-07-14 13:13 ` Pavel Machek
2015-07-15 4:54 ` NeilBrown
2015-07-22 13:47 ` Pavel Machek
2015-05-12 21:35 ` Sage Weil [this message]
2015-05-13 12:32 ` Jan Kara
2015-05-08 14:43 ` Austin S Hemmelgarn
2015-05-08 17:11 ` Zach Brown
2015-05-08 14:29 ` John Stoffel
2015-07-14 11:50 ` Pavel Machek
[not found] ` <20150507172053.GA659-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
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
[not found] ` <CALCETrWNDMq0nK3ac-uZweV5BKK_yWTQHH5D0YkyEu7bcONo9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-08 2:42 ` Dave Chinner
2015-07-14 11:44 ` Pavel Machek
2015-05-08 2:37 ` Dave Chinner
2015-05-08 3:24 ` Andy Lutomirski
[not found] ` <CALCETrUksu5ZB4QBfC8DMwYO2OFjfPW2eWsTweZGN_gybzcsmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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.1505112225170.28239@cobra.newdream.net \
--to=sage-bntbu8nrog7k1umjsbkqmq@public.gmane.org \
--cc=david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org \
--cc=kevin-RFfraI6bZkdAfugRpC6u6w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
--cc=zab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).