[PATCH V2 0/2] nvme: Support user mode processing of ZNS Zone Changed AEN

Sagi Grimberg sagi at grimberg.me
Thu Oct 6 04:33:35 PDT 2022


> This adds support for the ZNS Zone-Descriptor-Changes AEN, which is of
> type notify and uses CQE.DW1 to convey the NSID of the log page to read.
> 
> Patch 1 adds non-zero NVME_AEN_DATA with the value of CQE.DW1 to all
> NVME_AEN uevents.
> 
> Patch 2 generates a uevent for all unhandled AEN notify results instead
> of issuing a dev warning.
> 
> This support is planned to be used by both zone based applications and
> another unreleased device with an alternate command set.
> 
> Changes since v1
> - Break up into two patches
> - Only inlucde AEN_DATA if CQE.DW1 is non-zero

What about the other comments that were given on v1?

--
 >   #endif
 > -    case NVME_AER_NOTICE_DISC_CHANGED:
 > +    default:
 >           ctrl->aen_result = result;
 >           break;
 > -    default:
 > -        dev_warn(ctrl->device, "async event result %08x\n", result);

I'd keep the log... and also don't know if we want to pass any unknown
possible spam to userspace... not sure that being blindly forward
compatible is the right choice here.

 >       }
 >       return requeue;
 >   }
 > @@ -4799,8 +4800,10 @@ void nvme_complete_async_event(struct 
nvme_ctrl *ctrl, __le16 status,
 >           break;
 >       }
 >   -    if (requeue)
 > +    if (requeue) {
 > +        ctrl->aen_data = le64_to_cpu(res->u64) >> 32;

Please use a helper for that.
aen_data is not a great name... maybe use a union for that for the
specific aen subtype?

Maybe it'd be better that zoned namespace aen is handled explicitly
and passes a AEN_NSID env veriable to the uevent.



More information about the Linux-nvme mailing list