On Thu, 2019-09-05 at 13:27 -0400, John Snow wrote: > > On 9/5/19 9:24 AM, Maxim Levitsky wrote: > > On Wed, 2019-08-28 at 12:03 +0300, Maxim Levitsky wrote: > > > On Tue, 2019-08-27 at 18:29 -0400, John Snow wrote: > > > > > > > > On 8/25/19 3:15 AM, Maxim Levitsky wrote: > > > > > Signed-off-by: Maxim Levitsky <mlevi...@redhat.com> > > > > > --- > > > > > block/nvme.c | 83 > > > > > ++++++++++++++++++++++++++++++++++++++++++++++ > > > > > block/trace-events | 2 ++ > > > > > 2 files changed, 85 insertions(+) > > > > > > > > > > diff --git a/block/nvme.c b/block/nvme.c > > > > > index f8bd11e19a..dd041f39c9 100644 > > > > > --- a/block/nvme.c > > > > > +++ b/block/nvme.c > > > > > @@ -112,6 +112,7 @@ typedef struct { > > > > > bool plugged; > > > > > > > > > > bool supports_write_zeros; > > > > > + bool supports_discard; > > > > > > > > > > CoMutex dma_map_lock; > > > > > CoQueue dma_flush_queue; > > > > > @@ -463,6 +464,7 @@ static void nvme_identify(BlockDriverState *bs, > > > > > int namespace, Error **errp) > > > > > > > > > > oncs = le16_to_cpu(idctrl->oncs); > > > > > s->supports_write_zeros = (oncs & NVME_ONCS_WRITE_ZEROS) != 0; > > > > > + s->supports_discard = (oncs & NVME_ONCS_DSM) != 0; > > > > > > > > Same comment -- checking !!(register & FIELD) is nicer than the > > > > negative. (I'm actually not sure even the !! is needed, but it seems to > > > > be a QEMU-ism and I've caught myself using it...) > > > > > > All right, no problem to use !! > > > > > > > > > > > Rest looks good to me on a skim, but I'm not very well-versed in NVME. > > > > > > Thanks! > > > > > > > Kind ping about this patch series. > > > > Apart from using !!, do you think that this patch series > > can be merged, or should I do anything else? > > Which tree do you think this should be committed to? > > > > I kind of want to see that merged before the freeze > > starts, if there are no objections, > > to reduce the amount of pending stuff in my queue. > > > > Didn't I ask a few other things? > > like not using "res30" because you've moved the fields around, and > trying to be consistent about "zeros" vs "zeroes". > > Removing "+#define NVME_ID_NS_DLFEAT_GUARD_CRC(dlfeat) ((dlfeat) & > 0x10)" because it's unused.
All right I forgot about it, that's one of they joys of duplication of a kernel driver in the userspace... > > You also probably require review (or at least an ACK) from Keith Busch > who maintains this file. > > --js All right, Best regards, Maxim Levitsky