[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANSCoS-RzcutTWHN1t1iyW3GjqNcY5xFUZtJhAThDp5SPPrDAA@mail.gmail.com>
Date: Thu, 31 Oct 2019 06:59:10 -0700
From: Charles Machalow <csm10495@...il.com>
To: Christoph Hellwig <hch@....de>
Cc: linux-nvme@...ts.infradead.org, marta.rybczynska@...ray.eu,
Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
Sagi Grimberg <sagi@...mberg.me>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme: change nvme_passthru_cmd64's result field.
On Thu, Oct 31, 2019, 6:39 AM Christoph Hellwig <hch@....de> wrote
> All that casting is a pretty bad idea. please just add an explicit
> reserved field before the result, and check that it always is zero
> in the ioctl handler.
Not quite sure what you mean by check for zero in the ioctl handler. I
like the idea of being able to use the same struct for either the
original or 64 ioctls from userspace. I don't believe adding the
explicit rsvd field allows that
- Charlie Scott Machalow
On Thu, Oct 31, 2019 at 6:39 AM Christoph Hellwig <hch@....de> wrote:
>
> On Wed, Oct 30, 2019 at 10:03:38PM -0700, Charles Machalow wrote:
> > Changing nvme_passthru_cmd64's result field to be backwards compatible
> > with the nvme_passthru_cmd/nvme_admin_cmd struct in terms of the result
> > field. With this change the first 32 bits of result in either case
> > point to CQE DW0. This allows userspace tools to use the new structure
> > when using the old ADMIN/IO_CMD ioctls or new ADMIN/IO_CMD64 ioctls.
>
> All that casting is a pretty bad idea. please just add an explicit
> reserved field before the result, and check that it always is zero
> in the ioctl handler.
Powered by blists - more mailing lists