On Oct 23 07:25, Klaus Jensen wrote: > On Oct 22 23:02, Philippe Mathieu-Daudé wrote: > > On 10/22/20 8:49 PM, Klaus Jensen wrote: > > > - /* support DULBE */ > > > - id_ns->nsfeat |= 0x4; > > > + /* support DULBE and I/O optimization fields */ > > > + id_ns->nsfeat |= (0x4 | 0x10); > > > > The comment helps, but isn't needed if you use explicit definitions > > for these flags. You already introduced the NVME_ID_NS_NSFEAT_DULBE > > and NVME_ID_NS_FLBAS_EXTENDED but they are restricted to extract bits. > > This is why I personally prefer the registerfields API (see > > "hw/registerfields.h"). > > > > I've been wanting to fix those constants - but the convention that they > only extract bits pre-dates the nvme device and is from when the nvme > block driver was introduced - I have just been following the precedence > by defining them like that. >
I did not know about the hw/registerfields.h API. Looks promising!
signature.asc
Description: PGP signature