[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201016083923.GA134672@google.com>
Date: Fri, 16 Oct 2020 08:39:23 +0000
From: Satya Tangirala <satyat@...gle.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
dm-devel@...hat.com, Jens Axboe <axboe@...nel.dk>,
Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>,
Eric Biggers <ebiggers@...gle.com>
Subject: Re: [PATCH v2 2/4] block: add private field to struct keyslot_manager
On Fri, Oct 16, 2020 at 08:19:41AM +0100, Christoph Hellwig wrote:
> On Thu, Oct 15, 2020 at 09:46:30PM +0000, Satya Tangirala wrote:
> > Add a (void *) pointer to struct keyslot_manager that the owner of the
> > struct can use for any purpose it wants.
> >
> > Right now, the struct keyslot_manager is expected to be embedded directly
> > into other structs (and the owner of the keyslot_manager would use
> > container_of() to access any other data the owner needs). However, this
> > might take up more space than is acceptable, and it would be better to be
> > able to add only a pointer to a struct keyslot_manager into other structs
> > rather than embed the entire struct directly. But container_of() can't be
> > used when only the pointer to the keyslot_manager is embded. The primary
> > motivation of this patch is to get around that issue.
>
> No, please don't bloat the structure. If some weird caller doesn't
> like the embedding it can create a container structure with the
> blk_keyslot_manager structure and a backpointer.
Ah, ok. Thanks!
Powered by blists - more mailing lists