From: Chris Mason <chris.mason@oracle.com>
To: Lee Trager <lt73@cs.drexel.edu>
Cc: jim owens <jowens@hp.com>, "Joshua J. Berry" <des@condordes.net>,
linux-btrfs@vger.kernel.org
Subject: Re: Selective Compression/Encryption
Date: Fri, 12 Dec 2008 09:19:23 -0500 [thread overview]
Message-ID: <1229091563.11620.1.camel@think.oraclecorp.com> (raw)
In-Reply-To: <20081211220304.GA9082@tux64-02>
On Thu, 2008-12-11 at 17:03 -0500, Lee Trager wrote:
> On Tue, Dec 09, 2008 at 03:22:29PM -0500, jim owens wrote:
> > Joshua J. Berry wrote:
> >> On Tuesday 09 December 2008 08:35:16 Chris Mason wrote:
> >>> On Tue, 2008-12-09 at 09:59 -0500, Lee Trager wrote:
> >>>> Currently compression and I assume if encryption is implemented it is
> >>>> turned on or off during mount. There are however many times when a user
> >>>> may want to select which files/directories they want to compress or
> >>>> encrypt. This will also be helpful when implementing btrfs support in
> >>>> grub for example. We can say the disk can be compressed/encrypted except
> >>>> for /boot so compression/encryption doesn't have to be implemented in
> >>>> grub.
> >>>>
> >>>> I was thinking of adding this functionality to the userspace application
> >>>> btrfstune. The way I was thinking of doing this is when btrfstune +c is
> >>>> applied to a directory or file the directory(and all its contents) or
> >>>> file will always be compressed reguardless of how the filesystem is
> >>>> mounted. The opposite would happen when btrfstune -c is used.
> >>> This was my plan, but btrfstune probably isn't the best program to do it
> >>> (the ext2 tune program is mostly aimed at the super block level things).
> >>>
> >>> I think it would be better to make a setattr style program to call the
> >>> ioctls. There is already a per file compression flag, and the code
> >>> should already be checking it.
> >>
> >> Is there some reason this can't be done with the existing extended
> >> attribute facilities?
> >>
> >> It seems like xattrs would be preferable to some btrfs-specific
> >> tunable, as programs like rsync or backup tools would be able to
> >> preserve (and restore) these bits with no extra work required.
> >
> > I had the same thought... that many btrfs per-file tunables would
> > be better implemented in xattrs (I've read christoph's earlier
> > objections and hope to get around those issues).
> I agree that implementing it in the xattr would be best but what
> userspace tools should be used to control it? lsattr/chattr or our own?
> lsattr/chattr does seem to do what we want for compression but it really
> has nothing for encryption. Should we also support attribute(a), no
> modification(i), etc support in xattrs?
Just to clarify, I'm fine with xattrs as a user interface to set the
per-inode flags. The flag for this should be stored in the inode
though, and not as a btrfs xattr. There is already a flag field in the
inode for this use (see NODATASUM and NODATACOW)
-chris
prev parent reply other threads:[~2008-12-12 14:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 14:59 Selective Compression/Encryption Lee Trager
2008-12-09 15:45 ` Miguel Figueiredo Mascarenhas Sousa Filipe
[not found] ` <200812091722.21567.mail@earthworm.de>
2008-12-09 18:09 ` Lee Trager
2008-12-09 22:14 ` Miguel Figueiredo Mascarenhas Sousa Filipe
[not found] ` <1228863790.8130.14.camel@mattos-laptop>
2008-12-10 12:11 ` Miguel Figueiredo Mascarenhas Sousa Filipe
2008-12-09 23:05 ` Diego Calleja
2008-12-09 23:50 ` jim owens
2008-12-10 0:03 ` calin
2008-12-10 13:44 ` Chris Mason
2008-12-10 17:55 ` Christoph Hellwig
2008-12-10 18:02 ` Linda Knippers
2008-12-10 18:11 ` Joshua J. Berry
2008-12-10 9:06 ` Mattos, Oliver
2008-12-10 9:32 ` Jeremy Sanders
2008-12-10 12:19 ` Miguel Figueiredo Mascarenhas Sousa Filipe
2008-12-09 16:35 ` Chris Mason
2008-12-09 18:14 ` Lee Trager
2008-12-09 19:26 ` Joshua J. Berry
2008-12-09 20:22 ` jim owens
2008-12-10 13:45 ` Chris Mason
2008-12-10 14:33 ` btrfs with selinux jim owens
2008-12-11 22:03 ` Selective Compression/Encryption Lee Trager
2008-12-12 14:19 ` Chris Mason [this message]
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=1229091563.11620.1.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=des@condordes.net \
--cc=jowens@hp.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lt73@cs.drexel.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox