From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>,
"Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
linux-btrfs@vger.kernel.org
Cc: clm@fb.com, dsterba@suse.cz
Subject: Re: [RFC] Experimental btrfs encryption
Date: Wed, 2 Mar 2016 16:50:07 +0800 [thread overview]
Message-ID: <56D6A93F.8020603@oracle.com> (raw)
In-Reply-To: <56D64590.1090108@cn.fujitsu.com>
Thanks! for commenting Qu.
As you are working near these codes appreciate any
code review comments.
> +1 here, but in fact, it's easy to deal with.
> As long as not implement encryption as a compression method.
>
> Just like inband dedup, we use the following method to support dedup and
> compression while still using most of CPU cores like compression:
>
> Old compression only implement:
> inode needs compress will go into async_cow_start()
> async_cow_start()
> |- compress_file_range()
>
> Compression with dedup implement:
> inode needs compress *OR* dedup will go into async_cow_start()
> async_cow_start()
> |
> |- if (!inode_need_dedup())
> | |- compress_file_range() <<Just as normal one
> | |- btrfs_compress_pages()
> | |- add_async_extent()
> |
> |- else
> |- hash_file_range() <<Calculate file hashes
> |- normal dedup hash
> |- if (inode_need_compress())
> | |- btrfs_compress_pages()
> |- add_async_extent()
>
> Although not the most elegant method, but it shows that we can
> co-operate compress and encrypt.
>
> However the most elegant method, is to rework current cow_file_range()
> and its variant, to an unified btrfs internal API.
Thanks for this. Right. Currently there is no elegant way of doing it.
Tried a bit of juggles. Unless rework.
But I am confused. Are you suggesting we should cascade compress engine
and then an encryption engine ? Austin said against such an approach.
And I have included it under limitation section just to mention, and
what's the idea if at all someone seeks such a configurations, which
is to use engine which provides both instead.
Thanks, Anand
next prev parent reply other threads:[~2016-03-02 8:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 16:08 [RFC] Experimental btrfs encryption Anand Jain
2016-03-01 16:08 ` [RFC PATCH 1/1] btrfs: Encryption: Add btrfs encryption support Anand Jain
2016-03-10 2:19 ` Liu Bo
2016-05-06 9:21 ` Anand Jain
2016-03-01 16:08 ` [RFC PATCH 1/2] btrfs-progs: subvolume functions reorg Anand Jain
2016-03-01 16:08 ` [RFC PATCH 2/2] btrfs-progs: Encryption: add encrypt sub cli Anand Jain
2016-03-01 16:29 ` [RFC] Experimental btrfs encryption Tomasz Torcz
2016-03-01 16:46 ` Chris Mason
2016-03-01 17:56 ` Austin S. Hemmelgarn
2016-03-01 17:59 ` Christoph Hellwig
2016-03-01 18:23 ` Chris Mason
2016-03-02 4:48 ` Anand Jain
2016-03-04 12:30 ` Austin S. Hemmelgarn
2016-03-01 16:41 ` Austin S. Hemmelgarn
2016-03-02 1:44 ` Qu Wenruo
2016-03-02 8:50 ` Anand Jain [this message]
2016-03-03 1:12 ` Qu Wenruo
2016-03-02 7:07 ` Anand Jain
2016-03-02 1:06 ` Qu Wenruo
2016-03-02 9:09 ` Anand Jain
2016-03-03 1:26 ` Qu Wenruo
2016-03-03 10:17 ` Alex Elsayed
2016-03-04 2:52 ` Anand Jain
2016-03-20 11:56 ` Martin Steigerwald
2016-03-03 1:58 ` Anand Jain
2016-03-22 14:25 ` David Sterba
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=56D6A93F.8020603@oracle.com \
--to=anand.jain@oracle.com \
--cc=ahferroin7@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
/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.