From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Andreas Dilger <adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
mcao-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org,
aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
sjayaraman-l3A5Bk7waGM@public.gmane.org,
linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] Ext4: Make file creation time, i_version and i_generation available by xattrs
Date: Mon, 28 Jun 2010 20:38:23 +0100 [thread overview]
Message-ID: <8831.1277753903@redhat.com> (raw)
In-Reply-To: <19AAF9AA-2445-4C73-808B-4AD9C5C7E769-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
Andreas Dilger <adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org> wrote:
> - I'd prefer calling these "file.generation" and "file.version".
> I don't think there is value in the "i_" prefix adds anything,
> and it seems more like an internal detail to me
That's reasonable.
> - why not expose the ".version" field for regular files? It seems
> that all of them are applicable for all file types.
Because Ext4 doesn't support it for anything other than directories.
> - it would be good to not introduce a new xattr namespace, since
> tools like tar (even the RHEL-patched one) will not backup and
> restore these namespaces. Using "trusted." would allow them to
> be backed up and restored using existing xattr-patched GNU tar
> by root, but wouldn't allow them to be modified by regular users.
> I think this is important for proper backup/restore of a filesystem,
> but can have correctness implications and shouldn't be accessible
> to regular users.
Does backing them up make sense, though? They are filesystem structural
attributes. Can you restore the inode number, for example? If not, then you
can't restore i_generation either. Restoring i_version might make sense, but
what if it winds i_version backwards whilst maintaining i_ino and i_generation,
that means there'll be a time in the future where the three values are once
again what might have been already published - and may already be in someone's
persistent cache.
> > file.crtime=0x53ba244c000000000000000000000000
>
> Is this a binary (host-endian) struct timespec?
Yes. That might not be the best representation, however. It could also be,
say "<decimal-secs>.<decimal-nsecs>", eg: "1234.000000567".
> > file.i_generation=0x0000000000000000
>
> This seems odd, i_generation should never be zero, AFAIK.
That might be because it's the root directory, and so cannot be replaced.
David
WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: dhowells@redhat.com, viro@ZenIV.linux.org.uk, smfrench@gmail.com,
jlayton@redhat.com, mcao@us.ibm.com,
aneesh.kumar@linux.vnet.ibm.com, linux-cifs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
samba-technical@lists.samba.org, sjayaraman@suse.de,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH] Ext4: Make file creation time, i_version and i_generation available by xattrs
Date: Mon, 28 Jun 2010 20:38:23 +0100 [thread overview]
Message-ID: <8831.1277753903@redhat.com> (raw)
In-Reply-To: <19AAF9AA-2445-4C73-808B-4AD9C5C7E769@dilger.ca>
Andreas Dilger <adilger@dilger.ca> wrote:
> - I'd prefer calling these "file.generation" and "file.version".
> I don't think there is value in the "i_" prefix adds anything,
> and it seems more like an internal detail to me
That's reasonable.
> - why not expose the ".version" field for regular files? It seems
> that all of them are applicable for all file types.
Because Ext4 doesn't support it for anything other than directories.
> - it would be good to not introduce a new xattr namespace, since
> tools like tar (even the RHEL-patched one) will not backup and
> restore these namespaces. Using "trusted." would allow them to
> be backed up and restored using existing xattr-patched GNU tar
> by root, but wouldn't allow them to be modified by regular users.
> I think this is important for proper backup/restore of a filesystem,
> but can have correctness implications and shouldn't be accessible
> to regular users.
Does backing them up make sense, though? They are filesystem structural
attributes. Can you restore the inode number, for example? If not, then you
can't restore i_generation either. Restoring i_version might make sense, but
what if it winds i_version backwards whilst maintaining i_ino and i_generation,
that means there'll be a time in the future where the three values are once
again what might have been already published - and may already be in someone's
persistent cache.
> > file.crtime=0x53ba244c000000000000000000000000
>
> Is this a binary (host-endian) struct timespec?
Yes. That might not be the best representation, however. It could also be,
say "<decimal-secs>.<decimal-nsecs>", eg: "1234.000000567".
> > file.i_generation=0x0000000000000000
>
> This seems odd, i_generation should never be zero, AFAIK.
That might be because it's the root directory, and so cannot be replaced.
David
next prev parent reply other threads:[~2010-06-28 19:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-28 16:26 [PATCH] Ext4: Make file creation time, i_version and i_generation available by xattrs David Howells
[not found] ` <20100628162626.6026.26679.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2010-06-28 16:33 ` Steve French
2010-06-28 16:33 ` Steve French
2010-06-28 16:48 ` Jeremy Allison
2010-06-28 17:04 ` Steve French
2010-06-28 17:04 ` Steve French
[not found] ` <AANLkTilkfPkvyuQvN9zKrrY3DhJZ5iUfa5RXfErFwTiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-28 17:14 ` Jeremy Allison
2010-06-28 17:14 ` Jeremy Allison
2010-06-28 19:21 ` Christoph Hellwig
2010-06-29 22:44 ` David Howells
[not found] ` <26197.1277851477-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-29 22:59 ` Jeremy Allison
2010-06-29 22:59 ` Jeremy Allison
2010-06-29 23:31 ` David Howells
2010-06-28 19:08 ` Andreas Dilger
[not found] ` <19AAF9AA-2445-4C73-808B-4AD9C5C7E769-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2010-06-28 19:38 ` David Howells [this message]
2010-06-28 19:38 ` David Howells
2010-06-28 19:41 ` Steve French
2010-06-28 19:41 ` Steve French
[not found] ` <AANLkTikhZn15GmOTe-fsM2IgxHFxtZIRBOb_4kPWSR4E-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-29 18:13 ` Andreas Dilger
2010-06-29 18:13 ` Andreas Dilger
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=8831.1277753903@redhat.com \
--to=dhowells-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org \
--cc=aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mcao-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
--cc=sjayaraman-l3A5Bk7waGM@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@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 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.