All of lore.kernel.org
 help / color / mirror / Atom feed
* Determine the creation time of a root tree
@ 2016-08-06 15:11 Ivan Sizov
  2016-08-06 20:45 ` Hugo Mills
  2016-08-16 13:33 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Ivan Sizov @ 2016-08-06 15:11 UTC (permalink / raw)
  To: Btrfs BTRFS

Is there a way to know when the root tree or generation was created?
btrfs-find-root doesn't have such option.

--
Ivan Sizov (SIvan)

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

* Re: Determine the creation time of a root tree
  2016-08-06 15:11 Determine the creation time of a root tree Ivan Sizov
@ 2016-08-06 20:45 ` Hugo Mills
  2016-08-16 13:33 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Hugo Mills @ 2016-08-06 20:45 UTC (permalink / raw)
  To: Ivan Sizov; +Cc: Btrfs BTRFS

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

On Sat, Aug 06, 2016 at 06:11:58PM +0300, Ivan Sizov wrote:
> Is there a way to know when the root tree or generation was created?
> btrfs-find-root doesn't have such option.

   In UTC (or similar wall-clock-like units)? Not easily.

   I think you'd have to do something like look at the modification
time of a file, and then find the latest generation of any item
associated with that file, which would give you a time/inode pairing.
Do enough of those, and you'd have some kind of map that you could use
to approximate the time for a given genid.

   Hugo.

-- 
Hugo Mills             | This year, I'm giving up Lent.
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Determine the creation time of a root tree
  2016-08-06 15:11 Determine the creation time of a root tree Ivan Sizov
  2016-08-06 20:45 ` Hugo Mills
@ 2016-08-16 13:33 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2016-08-16 13:33 UTC (permalink / raw)
  To: Ivan Sizov; +Cc: Btrfs BTRFS

On Sat, Aug 06, 2016 at 06:11:58PM +0300, Ivan Sizov wrote:
> Is there a way to know when the root tree or generation was created?
> btrfs-find-root doesn't have such option.

The 'otime' is set and stored witin the inode item that represents the
subvolume. At the moment there's no direct way to read the otime for
topelvel subvolume, otherwise it's available via
'btrfs subvolume show /path/subvolume'

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

end of thread, other threads:[~2016-08-16 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-06 15:11 Determine the creation time of a root tree Ivan Sizov
2016-08-06 20:45 ` Hugo Mills
2016-08-16 13:33 ` David Sterba

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.