All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Charles Machalow <csm10495@gmail.com>
Cc: Sagi Grimberg <sagi@grimberg.me>,
	linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
	Jens Axboe <axboe@fb.com>,
	marta.rybczynska@kalray.eu, Keith Busch <kbusch@kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] nvme: change nvme_passthru_cmd64's result field.
Date: Thu, 31 Oct 2019 14:39:21 +0100	[thread overview]
Message-ID: <20191031133921.GA4763@lst.de> (raw)
In-Reply-To: <20191031050338.12700-1-csm10495@gmail.com>

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.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Charles Machalow <csm10495@gmail.com>
Cc: linux-nvme@lists.infradead.org, marta.rybczynska@kalray.eu,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvme: change nvme_passthru_cmd64's result field.
Date: Thu, 31 Oct 2019 14:39:21 +0100	[thread overview]
Message-ID: <20191031133921.GA4763@lst.de> (raw)
In-Reply-To: <20191031050338.12700-1-csm10495@gmail.com>

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.

  reply	other threads:[~2019-10-31 13:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31  5:03 [PATCH] nvme: change nvme_passthru_cmd64's result field Charles Machalow
2019-10-31  5:03 ` Charles Machalow
2019-10-31 13:39 ` Christoph Hellwig [this message]
2019-10-31 13:39   ` Christoph Hellwig
     [not found]   ` <CANSCoS8rN6g7u6iG4SRTcXjdj68cbimvX1n1Ex+FBAkhAAivJA@mail.gmail.com>
2019-10-31 13:59     ` Christoph Hellwig
2019-10-31 13:59       ` Christoph Hellwig
2019-10-31 15:39       ` Charles Machalow
2019-10-31 15:39         ` Charles Machalow
2019-10-31 13:59   ` Charles Machalow
2019-10-31 13:59     ` Charles Machalow
2019-11-04 14:34   ` Marta Rybczynska
2019-11-04 14:34     ` Marta Rybczynska
2019-11-04 14:51     ` Charles Machalow
2019-11-04 14:51       ` Charles Machalow
2019-11-04 14:56       ` Marta Rybczynska
2019-11-04 14:56         ` Marta Rybczynska
2019-11-04 15:01         ` Keith Busch
2019-11-04 15:01           ` Keith Busch
2019-11-04 15:29           ` Christoph Hellwig
2019-11-04 15:29             ` Christoph Hellwig
2019-11-04 15:32             ` Keith Busch
2019-11-04 15:32               ` Keith Busch
2019-11-04 15:01         ` Charles Machalow
2019-11-04 15:01           ` Charles Machalow
2019-11-04 15:16           ` Marta Rybczynska
2019-11-04 15:16             ` Marta Rybczynska
2019-11-04 15:20             ` Charles Machalow
2019-11-04 15:20               ` Charles Machalow
2019-11-04 15:30               ` Christoph Hellwig
2019-11-04 15:30                 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031133921.GA4763@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=csm10495@gmail.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=marta.rybczynska@kalray.eu \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.