Re: [PATCH] nvme: don't memset() the normal read/write command

Christoph Hellwig
2021-10-18T12:37:54Z

On Mon, Oct 18, 2021 at 06:33:51AM -0600, Jens Axboe wrote:
> >> cmnd->rw.nsid = cpu_to_le32(ns->head->ns_id);
> >> + cmnd->rw.rsvd2 = 0;
> >
> > There should be no need to clear this reserved space.
>
> Actually wasn't sure, sometimes hardware specs required reserved fields
> to get cleared. nvme does not? I'd be happy to drop it if not the case.

It only requires bits in otherwise unused fields to be the zeroed.

That being said, yes we're probably on the safe side by clearing
everything.