Received: by 10.223.164.202 with SMTP id h10csp310722wrb; Fri, 17 Nov 2017 00:42:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMYQ8PrwZ/XVBlrT/aaoxnuQ+FORQWTABF4i/NaSBwaFp/yoESYSAc/2VSBvXOIExRRT6gWC X-Received: by 10.98.217.17 with SMTP id s17mr1327457pfg.2.1510908158621; Fri, 17 Nov 2017 00:42:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510908158; cv=none; d=google.com; s=arc-20160816; b=RINNSlz6jHeDMnDzLgE5vWtsEV6kPPJOq4gldgkZ37smlyOUanjqZ/kqqR5BmnDMKz TWnan1BrGsGDdp+UgrJHJjp91QAeatwZtTm1pfnltj1QDIP3TUhL6eILkx+PG+HzDEm7 WuvQwTkpEq88RKrzKyv+rqsEqzAHfqIiL24zIrOQ0qPjt07hWRHUeGgdgJTfizI+mqZh TNo6pZnZUHstGSEQm4lmCu/1BDDTTbfQXvNVAo0kPgx3ArUTrqAX1YGtgjl6N7uE/t8B 7K6qEMi8OHgJPWAOpRUUCFNOjxvwQFHRW3ysr73Dri34Aezxk+a0JcP34TCQbZGFqIuq hCGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:msip_labels :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=dl29D95RbVedlzGiqI3dNMRIWYGJ4Jut1P7H2iJ2Ej8=; b=HqbrkWQJMOMemPcMRIelQvjXUZpXqJ+ydUQjsqRLY7kmnryCXlZh3rxt+BFHkETxTK sscDlI68jzcjyFk/XbGKlRFndbU5TPhpCK3G87A0yXOgKPU8pj0OU0EIYOx300icLpp+ M7upeFe7bE55bkFO41QEMHxoMUg5Sn0D6+s6ykZwUcUgGQ7/ZMrDO2jXP0cHk3A6M0+q zei3HrmGLSkZyhIRGtBfB6dZNX9bfh1Xu7JcpTkkbCbG4FB8iD+53D2Z0HYyPwDOvPmX nmAbnsXiNDw+peORnK42csxWZXeDLs2bJlXOzkHMWWMlM90mRxf1j0mNp2rQ3neOeLhS g/1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=IVCmv2uk; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si2420600plb.370.2017.11.17.00.42.26; Fri, 17 Nov 2017 00:42:38 -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=@microsoft.com header.s=selector1 header.b=IVCmv2uk; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965953AbdKPXGh (ORCPT + 92 others); Thu, 16 Nov 2017 18:06:37 -0500 Received: from mail-sn1nam02on0124.outbound.protection.outlook.com ([104.47.36.124]:2539 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934059AbdKPXG2 (ORCPT ); Thu, 16 Nov 2017 18:06:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dl29D95RbVedlzGiqI3dNMRIWYGJ4Jut1P7H2iJ2Ej8=; b=IVCmv2uk/0lliykeDY+dkjPg93siDwtFj49TLsaFKlefeCpMRVFkrR9DrBIyNDht5TGyvP3f1Z2mGzbzyZYOnoyXZQV067JLyWJE7O43UTb+7VkPPR5ZUEU73QjvmQS2cx9an0XCv+BgTZUCfwVSjZJ36jnlbsVC6pup6vjwzp4= Received: from CY4PR21MB0135.namprd21.prod.outlook.com (10.173.189.17) by CY4PR21MB0853.namprd21.prod.outlook.com (10.173.192.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.2; Thu, 16 Nov 2017 23:06:26 +0000 Received: from CY4PR21MB0135.namprd21.prod.outlook.com ([10.173.189.17]) by CY4PR21MB0135.namprd21.prod.outlook.com ([10.173.189.17]) with mapi id 15.20.0260.001; Thu, 16 Nov 2017 23:06:24 +0000 From: Pavel Shilovskiy To: Long Li , Steve French , "linux-cifs@vger.kernel.org" , "samba-technical@lists.samba.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Christoph Hellwig , Tom Talpey , Matthew Wilcox , Stephen Hemminger CC: Long Li Subject: RE: [Patch v7 01/22] CIFS: SMBD: Add parameter rdata to smb2_new_read_req Thread-Topic: [Patch v7 01/22] CIFS: SMBD: Add parameter rdata to smb2_new_read_req Thread-Index: AQHTV6ap1aNsd4aJtUevre0oilsZBqMXr4UA Date: Thu, 16 Nov 2017 23:06:24 +0000 Message-ID: References: <20171107085514.12693-1-longli@exchange.microsoft.com> <20171107085514.12693-2-longli@exchange.microsoft.com> In-Reply-To: <20171107085514.12693-2-longli@exchange.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=pshilov@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-11-16T23:06:22.7446101Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:e::7a9] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR21MB0853;6:8DER5C7qHJeYDHRVDZqN+10cIPUsIEDXAn0YzoAL6MoRtlf5n6HneV0/2JenFZn8EIAWE315TnfEBkg+xa3JztysVaIHo7rjeXLJWDs1UZ7JTnrxPH6U46qlQFD6oivwIp8BvAEqHNCOSBlmtxmXYT7C3EYMAWlxMfT9kuX3QtUhV/CnbWWMgRKjFc5+9qUPMyKvQ2qycmNSRxYOPL3Xc8VURtdFbtCUcn9logol4NT2CrAW8l/bEN50CnpFKdSfAn7q5bNYY7XBuxtJb+b03saLXkkglwfuaYdQJ8/6O2smUulHcftVEUIZ5+01Pj4DTdVyhMEG4WtuPvouuTOXOMrUXxSOtY3+vrB16SRms84=;5:SN31xOt7jREs505HxMf4hhqEm5/4gjG+IUOfKmwi5+9K2UH/KDU7Shd6QzNn0E8IX5EiFraau3V0Q740BbC474nf6a27+YzB7B6JGtrxLhQQHb25cjZgeNYDUHqZhbqXJNhLi0aO5pMyKFG6ynTWQZMqUsVumxVk30ojysaqL60=;24:duwcyDHXAXrnT1uEqdb8/lCq2TEJige8ah+BxfEcaB1qQQgbuiDTg94QPBvDDYDIXELy446TsmKb9e3fp9Dqut/Y4AO8YVW+bTykXjnEInM=;7:c2JZVflSTqZzrAbVrHrKlZNrwS5J8sLR2BMfrxxvWRfE5NVg1aJSlGiYeTlpAFNo40+R0YKJl3zoFVFZCcR9rfZ8B9PWurdxWIntZ+npGuZ/VqhEB+jQD4OSiuT92rxVGCiQ3TmqyJF98bTM9uGCbToWykKCCGQQXRmF/5tVKcgNb4QnO7wdFORUWPAH0TKqApNmhMTicy/LD9HaDgVkfuwGnnEGou0tUQ9n35oIG1CpEGvM7xF25vKAGrVKKcoq x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(6009001)(376002)(346002)(39860400002)(47760400005)(199003)(189002)(6246003)(2950100002)(107886003)(25786009)(101416001)(76176999)(4326008)(50986999)(10090500001)(9686003)(33656002)(6306002)(6636002)(5660300001)(7696004)(54356999)(68736007)(53936002)(102836003)(6116002)(8936002)(106356001)(105586002)(55016002)(189998001)(2561002)(86612001)(478600001)(81166006)(81156014)(10290500003)(86362001)(2421001)(966005)(2906002)(22452003)(305945005)(2900100001)(74316002)(7736002)(14454004)(2501003)(8676002)(316002)(77096006)(2201001)(99286004)(229853002)(3660700001)(6436002)(6506006)(3280700002)(110136005)(1511001)(8990500004)(15760500003)(97736004)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR21MB0853;H:CY4PR21MB0135.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: 8019f0d1-aa0a-41af-ec07-08d52d46a8ed x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603258);SRVR:CY4PR21MB0853; x-ms-traffictypediagnostic: CY4PR21MB0853: authentication-results: spf=none (sender IP is ) smtp.mailfrom=pshilov@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(89211679590171)(9452136761055)(140211028294663); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231022)(3002001)(100000703101)(100105400095)(6055026)(61426038)(61427038)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR21MB0853;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR21MB0853; x-forefront-prvs: 0493852DA9 received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8019f0d1-aa0a-41af-ec07-08d52d46a8ed X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2017 23:06:24.6356 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0853 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-07 0:54 GMT-08:00 Long Li : > From: Long Li > > This patch is for preparing upper layer for doing SMB read via RDMA write= . > > When we assemble the SMB read packet header, we need to know the I/O layo= ut > if this request is to use a RDMA write. rdata has all the information we = need > for memory registration. Add rdata to smb2_new_read_req. > > Signed-off-by: Long Li > --- > fs/cifs/smb2pdu.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c > index bab3da6..32ad590 100644 > --- a/fs/cifs/smb2pdu.c > +++ b/fs/cifs/smb2pdu.c > @@ -2350,18 +2350,21 @@ SMB2_flush(const unsigned int xid, struct cifs_tc= on *tcon, u64 persistent_fid, > */ > static int > smb2_new_read_req(void **buf, unsigned int *total_len, > - struct cifs_io_parms *io_parms, unsigned int remaining_= bytes, > - int request_type) > + struct cifs_io_parms *io_parms, struct cifs_readdata *rdata, > + unsigned int remaining_bytes, int request_type) > { > int rc =3D -EACCES; > struct smb2_read_plain_req *req =3D NULL; > struct smb2_sync_hdr *shdr; > + struct TCP_Server_Info *server; > > rc =3D smb2_plain_req_init(SMB2_READ, io_parms->tcon, (void **) &= req, > total_len); > if (rc) > return rc; > - if (io_parms->tcon->ses->server =3D=3D NULL) > + > + server =3D io_parms->tcon->ses->server; > + if (server =3D=3D NULL) > return -ECONNABORTED; > > shdr =3D &req->sync_hdr; > @@ -2489,7 +2492,8 @@ smb2_async_readv(struct cifs_readdata *rdata) > > server =3D io_parms.tcon->ses->server; > > - rc =3D smb2_new_read_req((void **) &buf, &total_len, &io_parms, 0= , 0); > + rc =3D smb2_new_read_req( > + (void **) &buf, &total_len, &io_parms, rdata, 0, 0); > if (rc) { > if (rc =3D=3D -EAGAIN && rdata->credits) { > /* credits was reset by reconnect */ > @@ -2557,7 +2561,7 @@ SMB2_read(const unsigned int xid, struct cifs_io_pa= rms *io_parms, > struct cifs_ses *ses =3D io_parms->tcon->ses; > > *nbytes =3D 0; > - rc =3D smb2_new_read_req((void **)&req, &total_len, io_parms, 0, = 0); > + rc =3D smb2_new_read_req((void **)&req, &total_len, io_parms, NUL= L, 0, 0); > if (rc) > return rc; > > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Looks good. Reviewed-by: Pavel Shilovsky -- Best regards, Pavel Shilovsky From 1583406384682454948@xxx Tue Nov 07 11:26:41 +0000 2017 X-GM-THRID: 1583406384682454948 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread