From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Yong Huang <yong.huang@smartx.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [v2 3/4] crypto: Support generic LUKS encryption
Date: Mon, 18 Dec 2023 14:24:29 +0000 [thread overview]
Message-ID: <ZYBWHdV2QXTYn2nY@redhat.com> (raw)
In-Reply-To: <CAK9dgmZ6E4Zv5Y_BBTSQBanXdC7310VKpfkJNLPomfhJZKZwqw@mail.gmail.com>
On Mon, Dec 18, 2023 at 10:15:34PM +0800, Yong Huang wrote:
> On Mon, Dec 18, 2023 at 7:16 PM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
> > > @@ -903,6 +928,17 @@ block_crypto_child_perms(BlockDriverState *bs,
> > BdrvChild *c,
> > >
> > > BlockCrypto *crypto = bs->opaque;
> > >
> > > + if (role == (role & BDRV_CHILD_METADATA)) {
> > > + /* Assign read permission only */
> > > + perm |= BLK_PERM_CONSISTENT_READ;
> > > + /* Share all permissions */
> > > + shared |= BLK_PERM_ALL;
> > > +
> > > + *nperm = perm;
> > > + *nshared = shared;
> > > + return;
> > > + }
> >
> > What is code doing ? You've set BDRV_CHILD_METADATA role on the
> > crypto->header object, but how does this block_crypto_child_perms
> > method get run against crypto->header ?
> >
> This paragraph originally aims to provide a function that multiple disks
> could share
> the same LUKS header (with read-only permission).
> But I've found that it may not work when updating the detached header after
> reviewing the patch recently :(.
>
> Should it be a separate commit, Since it kind of has nothing to do with the
> basic
> function?
Yes, that would be better as a separate commit.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-12-18 14:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 16:37 [v2 0/4] Support generic Luks encryption Hyman Huang
2023-12-06 16:37 ` [v2 1/4] crypto: Introduce option and structure for detached LUKS header Hyman Huang
2023-12-18 11:16 ` Daniel P. Berrangé
2023-12-06 16:37 ` [v2 2/4] crypto: Introduce payload offset set function Hyman Huang
2023-12-18 11:16 ` Daniel P. Berrangé
2023-12-06 16:37 ` [v2 3/4] crypto: Support generic LUKS encryption Hyman Huang
2023-12-18 11:15 ` Daniel P. Berrangé
2023-12-18 14:15 ` Yong Huang
2023-12-18 14:24 ` Daniel P. Berrangé [this message]
2023-12-06 16:37 ` [v2 4/4] block: Support detached LUKS header creation for blockdev-create Hyman Huang
2023-12-18 11:19 ` Daniel P. Berrangé
2023-12-18 14:17 ` Yong Huang
2023-12-18 11:21 ` [v2 0/4] Support generic Luks encryption Daniel P. Berrangé
2023-12-18 13:22 ` Yong Huang
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=ZYBWHdV2QXTYn2nY@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yong.huang@smartx.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.