Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4023392ybx; Mon, 4 Nov 2019 06:37:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzAHsj3PR83JJ0DpFn8MGVBayolq7DW9hT8yY7q4OGod/U+QSXSuswr3GNSXXSuI+mTCeZq X-Received: by 2002:a05:6402:78e:: with SMTP id d14mr12375008edy.210.1572878268375; Mon, 04 Nov 2019 06:37:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572878268; cv=none; d=google.com; s=arc-20160816; b=mNxYkQ8IkhSShOXHArmQT09xkxaf2Fq9mr8uqciFPNhmnswnF0U7VWpyqZEXdPUQxB ZHo8SKI6hp5DlAxC2tzd7catGcaplq165xkeODHPJw3wFrOTabPrW5hm8UiDhmTE64/z QPvuaKC4PCD1KS+AIQuV1uk3/1hfMX2Shjt0hDWAHHxOxwclzu8Pnuu9O5WnkXNSCL9x 7jij18Qt5xDOz4tTdxAcnCA3SUM6fgtZEPbNnBEjkX9O2fejwxi25HASRuF6R0kBo6sd g8YCXWghoCfYYsl4gMgqaouGhfL/muwzxTdW/d6QU95DMuo3UvebqEheiXG9dcPFmfbI gh1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=pD0MUKyotGulN1CLftCO1i1SN0De2+Xqp9tO+mZ1yzE=; b=MAAF0WfsHawho9a6JP7uYUkyUr/GfTx1OECxsq52zTPLvCwZJrgz26m+aKpS5+M7/U yrHF3Yqobd+7z/5SOuBaNTGPzkw+RPS2o5ca2dIExDEBMcD8ClKL3LUOCYNlkr5aDiUl 2HrwzT/gFEW9rh3lk6X2nFDLKC+JYY14mx3WbGK7jXahIfm1XiaRCIKrmmQaiUA5wq5R 8Ty/yYebBoi+GgslVuKw/d2pl1CCzxIKCWxVDnDbXXSRidKl/A3IOPOhk14fe+483PzJ hN9NKq3VFBoYAU2IdULxlxCjCTqb3WwrF2l/5BK+ZZvq+KpqQROlYJalD1WaVvbIMuPN tvzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=CWih9Sww; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si8188827edd.182.2019.11.04.06.37.25; Mon, 04 Nov 2019 06:37:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=CWih9Sww; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728783AbfKDOen (ORCPT + 99 others); Mon, 4 Nov 2019 09:34:43 -0500 Received: from zimbra2.kalray.eu ([92.103.151.219]:60728 "EHLO zimbra2.kalray.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727861AbfKDOen (ORCPT ); Mon, 4 Nov 2019 09:34:43 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 432D327E03F9; Mon, 4 Nov 2019 15:34:41 +0100 (CET) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iCtUtBHQ30vp; Mon, 4 Nov 2019 15:34:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id D6B3727E08CF; Mon, 4 Nov 2019 15:34:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu D6B3727E08CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1572878080; bh=pD0MUKyotGulN1CLftCO1i1SN0De2+Xqp9tO+mZ1yzE=; h=Date:From:To:Message-ID:MIME-Version; b=CWih9SwwV6LHORRDXXXP6pPflux0yx0cLlJxR+BLo4soFLw85sob1AqWHQru3BrNE PIKXbCb7MvKlSYyzWdZ72nZUOQ3SDPgc32sOiru96j0hrO8m2a4bwiAN4rQZ6dn8JI rXKUoLRWDuqUsx+/Vbc2+VKHjuIwLBUGgSmW/cTQ= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DU5pN41YXiic; Mon, 4 Nov 2019 15:34:40 +0100 (CET) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id A0FD827E0868; Mon, 4 Nov 2019 15:34:40 +0100 (CET) Date: Mon, 4 Nov 2019 15:34:40 +0100 (CET) From: Marta Rybczynska To: Christoph Hellwig Cc: Charles Machalow , linux-nvme , kbusch , axboe , Sagi Grimberg , linux-kernel Message-ID: <1977598237.90293761.1572878080625.JavaMail.zimbra@kalray.eu> In-Reply-To: <20191031133921.GA4763@lst.de> References: <20191031050338.12700-1-csm10495@gmail.com> <20191031133921.GA4763@lst.de> Subject: Re: [PATCH] nvme: change nvme_passthru_cmd64's result field. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.40.202] X-Mailer: Zimbra 8.8.12_GA_3794 (ZimbraWebClient - FF57 (Linux)/8.8.12_GA_3794) Thread-Topic: nvme: change nvme_passthru_cmd64's result field. Thread-Index: a1J64yF1pUDUpDcN+i9ToaOYAPxGqg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On 31 Oct, 2019, at 14:39, Christoph Hellwig hch@lst.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. That would change the size of a structure in UAPI, won't it? I wanted to avoid it when adding the *64 ioctls and that's why I added separate ones instead of extending the ones that exist. Marta