linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>
To: xfs-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org
Cc: ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: lazytime implementation questions
Date: Mon, 4 Jan 2016 17:22:19 +1100	[thread overview]
Message-ID: <20160104062219.GB19802@dastard> (raw)

Hi folks,

I've been looking at implementing the lazytime mount option for XFS,
and I'm struggling to work out what it is supposed to mean.

AFAICT, on ext4, lazytime means that pure timestamp updates are not
journalled and they are only ever written back when the inode is
otherwise dirtied and written, or they are timestamp dirty for 24
hours which triggers writeback.

This poses a couple of problems for XFS:

	1. we log every timestamp change, so there is no mechanism
	   for delayed/deferred update.

	2. we track dirty metadata in the journal, not via the VFS
	   dirty inode lists, so all the infrastructure written for
	   ext4 to do periodic flushing is useless to us.

These are solvable problems, but what I'm not sure about is exactly
what the intended semantics of lazytime durability are. That is,
exactly what guaranteed are we giving userspace about timestamp
updates when lazytime is used? The guarantees we have to give will
greatly influence the XFS implementation, so I really need to nail
down what we are expected to provide userspace. Can we:

	a) just ignore all durability concerns?
	b) if not, do we only need to care about the 24 hour
	   writeback and unmount?
	c) if not, are fsync/sync/syncfs/freeze/unmount supposed
	   to provide durability of all metadata changes?
	d) do we have to care about ordering - if we fsync one inode
	   with 1 hour old timestamps, do we also need to guarantee
	   that all the inodes with older dirty timestamps also get
	   made durable?

I really want to completely ignore all ordering and forced
durability requirements for lazytime (i.e. implement only periodic,
optimistic and freeze/unmount writeback), but I haven't found any
documentation of what durability lazytime is supposed to provide and
can really only guess what was intended from the ext4
implementation....

Clarity would be appreciated.

Cheers,

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

             reply	other threads:[~2016-01-04  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04  6:22 Dave Chinner [this message]
2016-01-05 17:36 ` lazytime implementation questions Jan Kara
     [not found]   ` <20160105173604.GE18604-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2016-01-05 22:59     ` Dave Chinner
2016-01-07  1:05       ` Theodore Ts'o
     [not found]         ` <20160107010506.GB2866-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2016-01-07  2:21           ` Dave Chinner

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=20160104062219.GB19802@dastard \
    --to=david-fqsqvqoi3ljby3ivrkzq2a@public.gmane.org \
    --cc=ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=xfs-VZNHf3L845pBDgjK7y7TUQ@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).