[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9E0FD459-75F2-4EF1-9310-8FCDF6F87604@javigon.com>
Date: Thu, 24 Jan 2019 14:45:27 +0100
From: Javier González <javier@...igon.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Christoph Hellwig <hch@....de>,
Matias Bjørling <mb@...htnvm.io>,
linux-block@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] : Switch to use new generic UUID API
> On 24 Jan 2019, at 14.36, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>
> On Thu, Jan 24, 2019 at 3:19 PM Javier González <javier@...igon.com> wrote:
>>> On 24 Jan 2019, at 13.16, Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
>>> On Mon, Jan 21, 2019 at 09:47:32AM +0100, Christoph Hellwig wrote:
>>>> On Thu, Jan 10, 2019 at 04:30:51PM +0200, Andy Shevchenko wrote:
>>>>> There are new types and helpers that are supposed to be used in new code.
>>>>>
>>>>> As a preparation to get rid of legacy types and API functions do
>>>>> the conversion here.
>>>>
>>>> This seems to miss a "lightnvm" in the subject line.
>>>>
>>>>> static inline void pblk_setup_uuid(struct pblk *pblk)
>>>>> {
>>>>> + guid_gen((guid_t *)&pblk->instance_uuid);
>>>>> }
>>>>
>>>> I think we can just kill this wrapper.
>>>>
>>>> But more importantly the instance_uuid fied, and the header.uuid one
>>>> it is copied from should be turned into an actual guid_t, the memcpys
>>>> and memcmps should also be replaced with the proper UUID API.
>>>
>>> header.uuid is defined using __u8 type, I'm not sure we can use guid_t there.
>>
>> We can turn it into a guid_t and bump the minor version.
>
> It's not so easy. __uXX types are dedicated for external APIs. guid_t
> is kernel internal type disregard of (still) presence some uapi bits.
> So, the question is those __uXX types in the driver definition is a
> simple mistake, (weird) style decision, or what?
>
I would define it as a mistake and I think it is worth fixing it. At the
moment we are only using this uuid for recovery purposes, to discard
data from a different pblk instance, so there should not be a big impact
outside of pblk itself. Am I missing something?
Javier
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists