All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lennart Poettering <lennart@poettering.net>
To: linux-btrfs@vger.kernel.org
Subject: btrfs_inode_item's otime?
Date: Mon, 5 Jan 2015 18:21:52 +0100	[thread overview]
Message-ID: <20150105172152.GB19126@gardel-login> (raw)

Heya!

btrfs' btrfs_inode_item structure contains a field for the birth time
of a file, .otime. This field could be quite useful, and I'd like to
make use of it. I can query it with the BTRFS_IOC_TREE_SEARCH ioctl
from userspace, alas it appears that the entry is never actually
initialized to anything other than 0?

Is this on purpose, or simply an oversight? It should be easy to
initialize it to the mtime when the inode is first created...

I am aware of the discussions about introducing the birth time as
something queriable with a future xstat() call. Even if that
high-level API doesn't exist yet, and even if it might be messy to use
BTRFS_IOC_TREE_SEARCH to query the otime currently, I think it would
be good to properly initialize the field, so that pre-existing file
systems would report useful data when xstat() is added one day...

(Of course, even without xstat(), I think it would be good to have an
unprivileged ioctl to query the otime in btrfs... the TREE_SEARCH
ioctl after all requires privileges...)

Lennart

-- 
Lennart Poettering, Red Hat

             reply	other threads:[~2015-01-05 17:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05 17:21 Lennart Poettering [this message]
2015-01-06 11:47 ` btrfs_inode_item's otime? Chris Samuel
2015-01-06 12:43   ` Chris Samuel
2015-01-06 18:41     ` David Sterba
2015-01-08 10:52       ` Chris Samuel
2015-01-09 16:11         ` David Sterba
2015-01-15 10:48           ` David Sterba
2015-01-16  4:47             ` Chris Samuel
2015-01-06 18:26 ` David Sterba
2015-01-07 13:57   ` Lennart Poettering
2015-01-07 14:42     ` Christoph Hellwig
2015-01-10 10:13       ` Martin Steigerwald
2015-01-10 10:17         ` Christoph Hellwig

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=20150105172152.GB19126@gardel-login \
    --to=lennart@poettering.net \
    --cc=linux-btrfs@vger.kernel.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 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.