From: Sergei Shtepa <sergei.shtepa@veeam.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
"hch@infradead.org" <hch@infradead.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"snitzer@kernel.org" <snitzer@kernel.org>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"brauner@kernel.org" <brauner@kernel.org>,
"dchinner@redhat.com" <dchinner@redhat.com>,
"willy@infradead.org" <willy@infradead.org>,
"dlemoal@kernel.org" <dlemoal@kernel.org>,
"linux@weissschuh.net" <linux@weissschuh.net>,
"jack@suse.cz" <jack@suse.cz>,
"ming.lei@redhat.com" <ming.lei@redhat.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v5 00/11] blksnap - block devices snapshots module
Date: Tue, 13 Jun 2023 12:12:19 +0200 [thread overview]
Message-ID: <20a5802d-424d-588a-c497-1d1236c52880@veeam.com> (raw)
In-Reply-To: <20230612161911.GA1200@sol.localdomain>
On 6/12/23 18:19, Eric Biggers wrote:
> This is the first time you've received an email from this sender
> ebiggers@kernel.org, please exercise caution when clicking on links or opening
> attachments.
>
>
> On Mon, Jun 12, 2023 at 03:52:17PM +0200, Sergei Shtepa wrote:
> > Hi all.
> >
> > I am happy to offer a improved version of the Block Devices Snapshots
> > Module. It allows to create non-persistent snapshots of any block devices.
> > The main purpose of such snapshots is to provide backups of block devices.
> > See more in Documentation/block/blksnap.rst.
>
> How does blksnap interact with blk-crypto?
>
> I.e., what happens if a bio with a ->bi_crypt_context set is submitted to a
> block device that has blksnap active?
>
> If you are unfamiliar with blk-crypto, please read
> Documentation/block/inline-encryption.rst
Thank you, this is an important point. Yes, that's right.
The current version of blksnap can cause blk-crypto to malfunction while
holding a snapshot. When handling bios from the file system, the
->bi_crypt_context is preserved. But the bio requests serving the snapshot
are executed without context. I think that the snapshot will be unreadable.
But I don't see any obstacles in the way of blksnap and blk-crypto
compatibility. If DM implements support for blk-crypto, then the same
principle can be applied for blksnap. I think that the integration of
blksnap with blk-crypto may be one of the stages of further development.
The dm-crypto should work properly.
It is noteworthy that in 7 years of using the out-of-tree module to take
a snapshot, I have not encountered cases of such problems.
But incompatibility with blk-crypto is possible, this is already a pain
for some users. I will request this information from our support team.
>
> It looks like blksnap hooks into the block layer directly, via the new
> "blkfilter" mechanism. I'm concerned that it might ignore ->bi_crypt_context
> and write data to the disk in plaintext, when it is supposed to be encrypted.
No. The "blkfilter" mechanism should not affect the operation of blk-crypto.
It does not change the bio.
Only a module that has been attached and provides its own filtering algorithm,
such as blksnap, can violate the logic of blk-crypto.
Therefore, until the blksnap module is loaded, blk-crypto should work as before.
next prev parent reply other threads:[~2023-06-13 10:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 13:52 [PATCH v5 00/11] blksnap - block devices snapshots module Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 01/11] documentation: Block Device Filtering Mechanism Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 02/11] block: " Sergei Shtepa
2023-07-11 2:02 ` Yu Kuai
2023-07-12 10:04 ` Yu Kuai
2023-07-12 12:34 ` Yu Kuai
2023-07-17 17:39 ` Sergei Shtepa
2023-07-18 1:21 ` Yu Kuai
2023-07-17 16:22 ` Sergei Shtepa
2023-07-17 14:39 ` Sergei Shtepa
2023-07-18 1:37 ` Yu Kuai
2023-07-18 11:25 ` Sergei Shtepa
2023-07-18 12:32 ` Yu Kuai
2023-07-18 16:33 ` Sergei Shtepa
2023-07-19 7:28 ` Yu Kuai
2023-07-19 8:36 ` Sergei Shtepa
2023-07-20 6:14 ` Christoph Hellwig
2023-06-12 13:52 ` [PATCH v5 03/11] documentation: Block Devices Snapshots Module Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 04/11] blksnap: header file of the module interface Sergei Shtepa
2023-06-13 22:25 ` Dave Chinner
2023-06-14 6:26 ` Christoph Hellwig
2023-06-14 9:26 ` Sergei Shtepa
2023-06-14 14:07 ` Christoph Hellwig
2023-06-14 16:43 ` Sergei Shtepa
2023-06-15 0:08 ` Dave Chinner
2023-07-17 18:57 ` Thomas Weißschuh
2023-07-18 9:53 ` Sergei Shtepa
2023-07-20 6:16 ` Christoph Hellwig
2023-06-12 13:52 ` [PATCH v5 05/11] blksnap: module management interface functions Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 06/11] blksnap: handling and tracking I/O units Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 07/11] blksnap: minimum data storage unit of the original block device Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 08/11] blksnap: difference storage Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 09/11] blksnap: event queue from the " Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 10/11] blksnap: snapshot and snapshot image block device Sergei Shtepa
2023-06-12 13:52 ` [PATCH v5 11/11] blksnap: Kconfig and Makefile Sergei Shtepa
2023-06-12 14:32 ` [PATCH v5 00/11] blksnap - block devices snapshots module Christoph Hellwig
2023-06-12 16:19 ` Eric Biggers
2023-06-13 5:50 ` Christoph Hellwig
2023-06-13 10:12 ` Sergei Shtepa [this message]
2023-06-14 17:22 ` Eric Biggers
-- strict thread matches above, loose matches on Subject: below --
2023-06-12 13:21 Sergei Shtepa
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=20a5802d-424d-588a-c497-1d1236c52880@veeam.com \
--to=sergei.shtepa@veeam.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=dchinner@redhat.com \
--cc=dlemoal@kernel.org \
--cc=ebiggers@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=ming.lei@redhat.com \
--cc=snitzer@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).