All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs_inode_item's otime?
@ 2015-01-05 17:21 Lennart Poettering
  2015-01-06 11:47 ` Chris Samuel
  2015-01-06 18:26 ` David Sterba
  0 siblings, 2 replies; 13+ messages in thread
From: Lennart Poettering @ 2015-01-05 17:21 UTC (permalink / raw)
  To: linux-btrfs

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-01-16  4:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05 17:21 btrfs_inode_item's otime? Lennart Poettering
2015-01-06 11:47 ` 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

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.