Received: by 10.223.164.202 with SMTP id h10csp91280wrb; Tue, 7 Nov 2017 03:26:41 -0800 (PST) X-Google-Smtp-Source: ABhQp+Q62hf2mHQtr08zUiySVwlpSJQuWZJc85w3rIOilMnHH0wIP7IgXIdEmgBm82pgFO+wyFT8 X-Received: by 10.84.184.12 with SMTP id l12mr17866199plc.404.1510054001698; Tue, 07 Nov 2017 03:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510054001; cv=none; d=google.com; s=arc-20160816; b=qSADrAq/GTXYfjyXaYuV5TsIQDzOnNFBcuXeHEYyHvVQHJErrrF2orLdRKUCHjEeUx IuJ/ac7Bp573kyjzvDjDy0DfIgxMkiukcPZcVg3cMnLZbZnaLr6sQqUopzphvOmonJl4 sQPeckya2YHb+ZjHbngscNzpLmzwF6+y+ObzLCbjGS/mou2l9VQ9fMethyua5SG1BSlr Wo1UWHOYCXKzV9p4TcFnkrGSgZFiUBTOqfhW88oJskt7igyFt9KTAkLfhsGFa3OIFzHY 6r9HqcBi+h/S8cpgzxoS0uLlIEU/H1aAwYf7wLHJKguJvGEp1wevpU99n+swhyQTm9xU mwkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=sWRa9VHavO4gGQsRIdReTfS653EKVxyqDlyMwt5LB9E=; b=aQQOYM7IhOkRSAzCLHeAI4DXgkN7nW+/njROGsq3yK2zeYvnDLVgkpNLTaleqCqhOs yzTsDi6kVwJMzU4jFb0ZU7fo5zvWtWQSPgcIpNzx9tZqIXKQOrHDQ9jqu8COy/0U0Vko lfyhtqo+tFnk535qpGpWDqIkfCX5GWu/L/R1Zg9Avgd3poXN2nPwKFyuDde8vo2gL8fz u6y8UZdWKUuK4s/ZHqNxYw9uIzgGTtqxnTvkBN2+UIWlwCuUAleLaUrKJwdbkgrzU9xM DmZRFnmwIOiXOag5gJPT4IZ6XOPvRS/8duL8W8UbHyWKum5OitUQxHaDnIuAQQS4m7Cq CtYQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u185si940105pgc.253.2017.11.07.03.26.29; Tue, 07 Nov 2017 03:26:41 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=exchange.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754776AbdKGI5i (ORCPT + 91 others); Tue, 7 Nov 2017 03:57:38 -0500 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:34024 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753822AbdKGI5O (ORCPT ); Tue, 7 Nov 2017 03:57:14 -0500 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id BzfkeuEKB3w7hBzfke9yu3; Tue, 07 Nov 2017 01:56:12 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1eBzfj-0003KN-Vk; Tue, 07 Nov 2017 01:55:52 -0700 From: Long Li To: 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: [Patch v7 01/22] CIFS: SMBD: Add parameter rdata to smb2_new_read_req Date: Tue, 7 Nov 2017 01:54:53 -0700 Message-Id: <20171107085514.12693-2-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171107085514.12693-1-longli@exchange.microsoft.com> References: <20171107085514.12693-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfFCT/mPgTye3BW3ktJrf+l/H9rdEE7VYIYh656sFyg9TUlIRFwgEPBWg1nnfHPjcvG7gVGjYjFBrLIH+ujhpy92cP49fb0ZB0+ir81WEwOXhyv+wIxEE 5r2C9ChyHgUYjrHq/n6OA/gXJ5w36kHsPuMW2+kncGGOujOSEaw6i7VcpjMce6lY2aLK3BZ6/Fyrq8DAj85lJfMnmYYtXpjGjI46mAkynMp8ml8r08IVn3uk 9Jn5s304AYO7mj1lsSUOQIt7pW+CLKewtSK2lU1SI2D3yxxHZv6XZciYhCoA0GtoNrBIdOJUxd1GSqVMnMJRosEAjj3W0TrHD2mtfLaFZknw6374fmAEiokC V5inwELC9vDwzu+kZhFHGsu7cIf8vvV4oa6lVVClneF738Bq5vEgdWnNpovt0w9u31Ps5u/DaOaconTNx3hbEg41MaWDtdfeqCukZAzlZsdnegF8Qsb86xHA Y9IORibqB8x7/nv0bIV2ioBmUmf03BFVBuPp/g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 layout 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_tcon *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 = -EACCES; struct smb2_read_plain_req *req = NULL; struct smb2_sync_hdr *shdr; + struct TCP_Server_Info *server; rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, (void **) &req, total_len); if (rc) return rc; - if (io_parms->tcon->ses->server == NULL) + + server = io_parms->tcon->ses->server; + if (server == NULL) return -ECONNABORTED; shdr = &req->sync_hdr; @@ -2489,7 +2492,8 @@ smb2_async_readv(struct cifs_readdata *rdata) server = io_parms.tcon->ses->server; - rc = smb2_new_read_req((void **) &buf, &total_len, &io_parms, 0, 0); + rc = smb2_new_read_req( + (void **) &buf, &total_len, &io_parms, rdata, 0, 0); if (rc) { if (rc == -EAGAIN && rdata->credits) { /* credits was reset by reconnect */ @@ -2557,7 +2561,7 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms, struct cifs_ses *ses = io_parms->tcon->ses; *nbytes = 0; - rc = smb2_new_read_req((void **)&req, &total_len, io_parms, 0, 0); + rc = smb2_new_read_req((void **)&req, &total_len, io_parms, NULL, 0, 0); if (rc) return rc; -- 2.7.4 From 1584564356619473132@xxx Mon Nov 20 06:12:09 +0000 2017 X-GM-THRID: 1584564356619473132 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread