bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] patches for acl, xattrs, and selinux support


From: Andreas Dilger
Subject: Re: [Bug-tar] patches for acl, xattrs, and selinux support
Date: Mon, 02 Feb 2009 15:31:16 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Jan 13, 2009  22:37 -0500, James Antill wrote:
> On Fri, 2008-12-19 at 18:25 -0700, Andreas Dilger wrote:
> > In particular, we'd like to:
> > - Always backup all xattrs on a file instead of current mode of filtering
> >   the xattrs at backup time.  This ensures they are all available later on
> >   if needed, even if they are not all restored by default.  The filtering
> >   would only be done at restore time, and that can be fixed if it is wrong.
> 
>  It's been a while, but I think I had two "thoughts" with the approach I
> took:
> 
> 1. We _know_ we don't want to save things like selinux/acls twice, even
> though they are stored as xattrs. Where there is a significantly better
> format used for storing them between machines.
>
> 2. It seemed like there was no good way to future proof against #1
> happening with any other namespaces in the future, if we just allowed
> everything. So just whitelist what we knew about.

The problem with a whitelist is that there is always going to be a lag
between the introduction of a new xattr type and the support to back it up.

If all of the xattrs are backed up, there is still a whitelist for the
restore step, and in the worst case the user will have to update to a newer
tar (or edit the code and recompile) to restore their data.  Ideally, there
would be a default list of attributes to restore, and users could specify
via arguments which xattrs to restore if they have some specific requirement.

If the data is not backed up in the first place, then nothing can be
done to fix this after the fact...  I think this is the policy of least
surprise to users.

> > - Change the restoration of xattrs to be before any file data is written.
> >   This allows the xattrs to contain layout hints, which is important for
> >   distributed filesystems (Lustre, pNFS) and possibly also ext4, btrfs, XFS,
> >   that have smarter allocators that can take advantage of this in the future
> >   once they realize what is possible.
> 
>  I can't think of any problems with this, esp. if you just move the
> xattrs and not ACLs/SELinux too ...

No, just the xattr restore is done before the file has any data written
into it.  The ACL/SELinux restore is left as-is.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]