Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5260117imm; Tue, 26 Jun 2018 08:22:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKs8qTPKI9za36XoutMu9vDV13k/DHHP6mmNF77hC9V72eOF19zAOtH6K000GjrpsKV0Gys X-Received: by 2002:a63:6d8b:: with SMTP id i133-v6mr1827104pgc.215.1530026539797; Tue, 26 Jun 2018 08:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530026539; cv=none; d=google.com; s=arc-20160816; b=IGega6FEVgfu+Un4V3DtSCIRqCCsA6LPSZq2KG1pSrVlEbJ6T8Y2n1nMU9ZLsRy6Qg nRg5tF86gOdNEUk3UwTCERrc+CywjoU5rdR3GnBm/96kDbouPL523lYRL4xdupK94lYy iSH4E46zBVORmhH3ONQ55JQxhafW6EncdrTAUs8dgsn0dw09pkPiaeeOywnrJutwK8ZO mTBz61xOWjrNGqSUppa0MFfwUDpb6OdQFcaI2ryXc+q/WOysZA9T58JelBRSvB5DBl8a +Nf/Bfx3rBAumn/Y8VOxklcPF3wFVAoIXHB6PdH+rMAKaXM4n0hKdLKuYkzAJgXtkvV7 OD4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=A50XClM6S9Mte9rSQTPG9M0yivjk+4QSFF5FyLFE76o=; b=KJrNgESA5cYOQ6d646b1sexqw+q4Z8Ocn5l4GI3pWfGA7n3KsOf4gBw3/8jsiYovhB NnJuIVtmWcM/PR3p9S2x1T0DBV3nI+XobdLmwS15F7iLUctkwn3ztqy0JnOYvwBzTu23 hUOfHit1HgHK3eiF0JV3u2SGB/5B9R3UbVdxeBDPEsYjmIvarvdTRWojEM/03uHu28tC GZWFJjjflP3UsKo5mEWyYznWtS09zMwZkpdigtmzA1SitkTo4Hsus44lGcz8n0RzyPHQ jsfwznjhVszH+DX7Vaz74wY22icMfw5RcVhi5RaUS5mJ/xLH3uc4P2AEV5cVL06VuNRN OxqQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2-v6si1763527plh.136.2018.06.26.08.22.04; Tue, 26 Jun 2018 08:22:19 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751073AbeFZPVH (ORCPT + 99 others); Tue, 26 Jun 2018 11:21:07 -0400 Received: from p3plsmtpa09-08.prod.phx3.secureserver.net ([173.201.193.237]:40021 "EHLO p3plsmtpa09-08.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064AbeFZPVG (ORCPT ); Tue, 26 Jun 2018 11:21:06 -0400 X-Greylist: delayed 439 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 Jun 2018 11:21:06 EDT Received: from [192.168.0.67] ([24.218.182.144]) by :SMTPAUTH: with ESMTPSA id Xpf8fXXAL7uxWXpf8fZJdV; Tue, 26 Jun 2018 08:13:47 -0700 Subject: Re: [Patch v2 02/15] CIFS: Add support for direct pages in rdata To: Jason Gunthorpe Cc: longli@microsoft.com, Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org References: <20180530194807.31657-1-longli@linuxonhyperv.com> <20180530194807.31657-3-longli@linuxonhyperv.com> <67b8afe7-f5e0-b36a-fcc1-87f1ae08eaa4@talpey.com> <20180625210132.GB5381@ziepe.ca> From: Tom Talpey Message-ID: Date: Tue, 26 Jun 2018 11:13:46 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180625210132.GB5381@ziepe.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfG2/Ww9P3v893Mr9eyBWDVuapw1SeB6b2FJndLZg0MtHtRXByrThdunB3FEkJT/1FrRpEpVEv0ku2qHry8iG3+WWlgONZ/DzxSOt3EKQ6OPwPxVKbe/P YrNsuaw5aLNfy2buWXPmxb2E0vK4sPw1dQc8z2KXoO+gpV3Lk4iJGT3lOdvg+OWxcme5y4o+WcML7M9GUZ7RP4FwmSq0JEygSk9DZ1rYDOKpuDTYqFdUlWAt Rl7lSTrqwqWnapiRTd9yG3vQnzvxTf+q8wfFBNrtkGomf1MfYkYUqt8fT75lqNTqZF+mBgQJDUncLgMsGMBZ3PF4RH/mc9IvnLqT1QzT6ABMsaASeK8Yag1q BU7l1ah9mfdsXc/j0LW9kSpJp4gXzg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/25/2018 5:01 PM, Jason Gunthorpe wrote: > On Sat, Jun 23, 2018 at 09:50:20PM -0400, Tom Talpey wrote: >> On 5/30/2018 3:47 PM, Long Li wrote: >>> From: Long Li >>> >>> Add a function to allocate rdata without allocating pages for data >>> transfer. This gives the caller an option to pass a number of pages >>> that point to the data buffer. >>> >>> rdata is still reponsible for free those pages after it's done. >> >> "Caller" is still responsible? Or is the rdata somehow freeing itself >> via another mechanism? >> >>> >>> Signed-off-by: Long Li >>> fs/cifs/cifsglob.h | 2 +- >>> fs/cifs/file.c | 23 ++++++++++++++++++++--- >>> 2 files changed, 21 insertions(+), 4 deletions(-) >>> >>> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h >>> index 8d16c3e..56864a87 100644 >>> +++ b/fs/cifs/cifsglob.h >>> @@ -1179,7 +1179,7 @@ struct cifs_readdata { >>> unsigned int tailsz; >>> unsigned int credits; >>> unsigned int nr_pages; >>> - struct page *pages[]; >>> + struct page **pages; >> >> Technically speaking, these are syntactically equivalent. It may not >> be worth changing this historic definition. > > [] is a C99 'flex array', it has a different allocation behavior than > ** and is not interchangeable.. In that case, it's an even better reason to not change the declaration. Tom.