From patchwork Thu Sep 27 15:40:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 10618163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 436ED1759 for ; Thu, 27 Sep 2018 15:41:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 352742BAE9 for ; Thu, 27 Sep 2018 15:41:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33C902BB0C; Thu, 27 Sep 2018 15:41:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA5CE2BB1C for ; Thu, 27 Sep 2018 15:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbeI0V7u (ORCPT ); Thu, 27 Sep 2018 17:59:50 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:37884 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727769AbeI0V7t (ORCPT ); Thu, 27 Sep 2018 17:59:49 -0400 Received: by mail-io1-f66.google.com with SMTP id v14-v6so2266589iob.4 for ; Thu, 27 Sep 2018 08:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=HsR+Jr5tLfdzCLQtb6nmTooIrxaURPWV5VNP5aQCWTc=; b=YQzx4kw8F0WxXuzuG5YPIRQzNvDxwCqu5j3h39wSFH6w+AUGLaMVopC8oM0YyAPLxQ KX/X10s2P1gemwPZ2doqofxqikKhrQ9RkJls4JoQqyh2SJFcq2m718nXav7l9/3ENnNa hUKEgONp28UqnPaqwevv3G2KH6i8Nt5idYKgbj0vVj5nWnCyDWJV9tLLabRP14AWVXR/ CEuNnFtQnINWBk0W0Qdhd0S2UfjvLBV+m2JT0lYMh96AKZXjoBCiyFv4/2MOv46H0pls ViaW2PmiWe9E5MYq7u7Uy0kEdMBWbtnRACHplFCsCMcfZdgArAY81LpUiXV8ol2csERR 9aaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HsR+Jr5tLfdzCLQtb6nmTooIrxaURPWV5VNP5aQCWTc=; b=RScHHOt7gpsc0m+yrLqXCfVlMwa8doCGB/aVTf+A6f76SEMVU/jpGA1vRAPO62gl3y 4Aj63iZw5wS5umdzhDyM7tP/ykd1T12t5CI5i186eIdtVsuGeozNUoqcnTaPL6UYalpf d+Oge8FsErvS7MJRJaItqmX5jJggohRrwMzXCqZd+rXtsOh0y1sv89+j24vGsBMWP5R4 ypEO78hS/UAkSVt3EUPfN948touAf+0yVSpeocVB0WMYo1Whj1vl2rJ7x6/mZRWzVX4o pNmE9rBpvsTm8T6+3syJSiKr71JRy+sENflyI28eDl19LbNzYlYhQCKRyDDW4CqD+5kN BuvQ== X-Gm-Message-State: ABuFfohiXb5G4jszuxfvTtH+y93HgnSUjtMhiLbAjJbtst67uB4mQy+w duKwsz3GoB8GjwkNNiq+OThchhY= X-Google-Smtp-Source: ACcGV62GX8lTg2Nhv+yasmIVvT53W7OSQVG8w3JyVjtSnRbYBhlt2mjg1skajMVWQub6hTC4BbblWw== X-Received: by 2002:a6b:9bd1:: with SMTP id d200-v6mr9884363ioe.147.1538062858638; Thu, 27 Sep 2018 08:40:58 -0700 (PDT) Received: from leira.trondhjem.org.localdomain (c-68-40-195-73.hsd1.mi.comcast.net. [68.40.195.73]) by smtp.gmail.com with ESMTPSA id d11-v6sm689072iok.77.2018.09.27.08.40.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 08:40:58 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH v2 2/3] NFSv4: Save a few bytes in the nfs_pgio_args/res Date: Thu, 27 Sep 2018 11:40:02 -0400 Message-Id: <20180927154003.11825-2-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927154003.11825-1-trond.myklebust@hammerspace.com> References: <20180927154003.11825-1-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Save a few bytes by allowing the read/write specific fields of the structures to share storage. Signed-off-by: Trond Myklebust --- include/linux/nfs_xdr.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 7f5535e5e852..343e44166346 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -608,9 +608,13 @@ struct nfs_pgio_args { __u32 count; unsigned int pgbase; struct page ** pages; - unsigned int replen; /* used by read */ - const u32 * bitmask; /* used by write */ - enum nfs3_stable_how stable; /* used by write */ + union { + unsigned int replen; /* used by read */ + struct { + const u32 * bitmask; /* used by write */ + enum nfs3_stable_how stable; /* used by write */ + }; + }; }; struct nfs_pgio_res { @@ -618,10 +622,16 @@ struct nfs_pgio_res { struct nfs_fattr * fattr; __u32 count; __u32 op_status; - int eof; /* used by read */ - unsigned int replen; /* used by read */ - struct nfs_writeverf * verf; /* used by write */ - const struct nfs_server *server; /* used by write */ + union { + struct { + unsigned int replen; /* used by read */ + int eof; /* used by read */ + }; + struct { + struct nfs_writeverf * verf; /* used by write */ + const struct nfs_server *server; /* used by write */ + }; + }; }; /*