From patchwork Mon Jan 30 21:39:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovskiy X-Patchwork-Id: 9546125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A199860415 for ; Mon, 30 Jan 2017 21:44:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC86E283B4 for ; Mon, 30 Jan 2017 21:44:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1B43283FC; Mon, 30 Jan 2017 21:44:00 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 1A905283B4 for ; Mon, 30 Jan 2017 21:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754530AbdA3Vny (ORCPT ); Mon, 30 Jan 2017 16:43:54 -0500 Received: from mail-by2nam03on0111.outbound.protection.outlook.com ([104.47.42.111]:42816 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754451AbdA3Vnn (ORCPT ); Mon, 30 Jan 2017 16:43:43 -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=2dFplP44uo3KN+lDsVzNoovv0xkN7bUNZOQggw7juEA=; b=O+B8IqxHwRcz4PzF1XkxWupiffRpDM0105VS7llo3SK4XpVtkC+L3Fqd1xls8xlrCKvCDFT/hOUrER6cZI0n5tD1Aoh2PXcCIa1yGY4vyTONiyGMCYj2rKJfcSVIvgMqy34To83/b6C2ri4SCFj50LLOXXgMn60JXK9p9WPnjAE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=pshilov@microsoft.com; Received: from ubuntu-vm.corp.microsoft.com (2001:4898:80e8:b::63b) by BN6PR03MB2545.namprd03.prod.outlook.com (10.173.142.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Mon, 30 Jan 2017 21:41:08 +0000 From: Pavel Shilovsky To: Subject: [PATCH v2 11/15] CIFS: Add mid handle callback Date: Mon, 30 Jan 2017 13:39:40 -0800 Message-ID: <1485812384-28870-12-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485812384-28870-1-git-send-email-pshilov@microsoft.com> References: <1485812384-28870-1-git-send-email-pshilov@microsoft.com> MIME-Version: 1.0 X-Originating-IP: [2001:4898:80e8:b::63b] X-ClientProxiedBy: BN6PR1401CA0011.namprd14.prod.outlook.com (10.174.237.149) To BN6PR03MB2545.namprd03.prod.outlook.com (10.173.142.148) X-MS-Office365-Filtering-Correlation-Id: 8572150c-371f-408a-6b7b-08d44958b3da X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN6PR03MB2545; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2545; 3:INxCB0s7Wc7V40NNFnQlIitC0PpBzCWFH2jWp2jc9MUdDPDXlS9qmeaSamYNbPYEyhM+VXYSZLqGAmXf36BZU7wg7izRMrt8oMcs+6KHOkZl1z+JA42iQxoH2MkQQ9JePP8xtvpmBB0Md/5mQvHIv3oJcH8eSaLdVXiE0GKVmpnbwEXa3GGWbIX5L5T4waeaexPn1G3uSmpo25mrWKSyFeRLS/Q4d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3JHyvRGxBtUpchF1OfsFhVkRMgSJ7zZyLnzqqBpuf7BNMpYUw5SsRipWusA9xCEZfPMPSnh9qfeIaLqK/5DalCaRPt/iRE6CaL4ggAtcAMzZlAHcjDGQKpXFkX6giGQgfvTIF0a9/1rjC3tNGb+PhCpbHvuYrYxgbO+pZSQFIijA9zucWq4LqtTSTjC9iT8AgEsX5oJLNcCMe5eLc54jM3MNilOSJSka1D/1fwiKnGI9qg8hPRWXv+2bOWPBtL9/5nEa6OoTbPQ3RnF2ZcIdn3XpVX6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(6072148)(6047074); SRVR:BN6PR03MB2545; BCL:0; PCL:0; RULEID:; SRVR:BN6PR03MB2545; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2545; 4:0NDIWgfvLrC5TC6i9ig3DCd/zajByi5SxJ2pjFGPr6lfIKudwyX3EpRu991dUQ7md2ZrhONqDE1FG8OV55TFV1M7Q/nJPaZU4RuQKhCQVOpMDJ0oYp9hmwfmI7wL4RzMRyIGgdweWhl97aDJt4cxTDtjEoUx97IanH4n0xOJvTgVuBSjIZ0TjVYq8Hm9T5kv9PV6cJeIrAL2zm8cQUGkhW2B1MsWv3a+9hdS0EV6PLNL58seLIurtGEeF0giQvqht9zs+cLmTci4jN2HrlnzWybZJBs5a23Q3/bXyy6WFUgyQ4+vs+/qh5ioAm78Z1rE3lYnicRwQ0vPWwB0pLB0TlXJmif4nC2YQTbpu2M4LGh6H+MtZDTdlq4LC4Iyqibis1h0fTnoYe+ERTTyS17hFF5j9ylzMGAekckESatcV027JCJ6+3uKRdlIVWrlZ0Mh8DrYVWh4RjksYv96eqKlcjreAOng0T219faaHtwQs8xyq4OhN0/VBD6aSe4Y8hWDR5avF5WRn0gY2fh0T+3Gdx7ttyUZh9kXy5lyQggT/NdaMb3FYS/9osDlXA9aTDfBJofIZz9kPgpdtdS1OfW8g5E2oniQeFfWm6kY8qfPdDwixR5EOEhKs0DCrr5VuvSRO04UpTKt2hMkrhYIFbsyqTKEq8WOSgvkQUfw2NLHm1U= X-Forefront-PRVS: 0203C93D51 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(39850400002)(39860400002)(39840400002)(39450400003)(39410400002)(69234005)(189002)(199003)(305945005)(5660300001)(8676002)(81166006)(5003940100001)(6116002)(50466002)(48376002)(81156014)(53936002)(101416001)(42186005)(110136003)(7736002)(10290500002)(47776003)(5005710100001)(10090500001)(33646002)(36756003)(92566002)(2351001)(6486002)(2950100002)(50226002)(105586002)(76176999)(189998001)(50986999)(106356001)(86362001)(38730400001)(86612001)(25786008)(6916009)(6666003)(2906002)(450100001)(107886002)(68736007)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR03MB2545; H:ubuntu-vm.corp.microsoft.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2545; 23:F31/B4/TbfTag3uQhgnZIlqpXSsOKLnh2e68Z0PUB?= =?us-ascii?Q?Hca/fdMB8Vkiogdunvc1A11sWaF59U3e9zA7jCi9XuUfwq6w9oZlc43Y1yQY?= =?us-ascii?Q?XDfkZDz5lFAUjf8DiooZTzB8C/nOVU5KxmK1H+3c+2tCEg0XFuz7rObvFWHm?= =?us-ascii?Q?CGGYgUrl44XAIMadP4AZ944s5bqwivrLbCGDfQOjO019AKfs+lKDlNRexpb5?= =?us-ascii?Q?c147xYhBpL9fWTjtJPUEDipbYYuyMMYHMczVVJqQWBAetH24v0zjIzHh6s8y?= =?us-ascii?Q?5nfFw5UstSwecsDw9JgMQJoom3SM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2w96L2noYRRVd8fMquUZ66JYe9hnu8BTwgI2uK6dSRVLJmzOufEMwE+zAl2bBruS44o6A2J/WgkldJ9QmoEuxl3SP7+bFSt83+yf9vb1wnxJPnxCS97gC5cw2+Eq8G8aDsx4EGxT10RWfTvlQI2YApxcZ4AyR72eXhg2q1Fa3w2Vo8MsEuM37UlBjr/6S5oOmtsxwptgXP5i9AfwTD6+rW4PfFfh1Xn4fOLXzhr8ESSLnk3LY+5I1O37U1M1sD1yc5LPTZLU35fDzWz/W13jjKxZmVkOkzLlJDU9X9dQc2och7iqNkU36VWsOdr1QRzVocb6g85Ui1OPTyY5z0j+DyGFt8WX2IRUnUXd0SBY60VAV5wx3zeibgKZTMD+vi+djB/245qcunH5Z55ZrOr/tG64M0HOYJtPBPYsQ== X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2017 21:41:08.7186 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2545 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We need to process read responses differently because the data should go directly into preallocated pages. This can be done by specifying a mid handle callback. Signed-off-by: Pavel Shilovsky --- fs/cifs/cifsglob.h | 8 ++++++++ fs/cifs/cifsproto.h | 2 +- fs/cifs/cifssmb.c | 6 +++--- fs/cifs/smb2pdu.c | 10 +++++----- fs/cifs/transport.c | 5 +++-- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 1d1cdea..dc41ae4 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -1310,6 +1310,13 @@ typedef int (mid_receive_t)(struct TCP_Server_Info *server, */ typedef void (mid_callback_t)(struct mid_q_entry *mid); +/* + * This is the protopyte for mid handle function. This is called once the mid + * has been recognized after decryption of the message. + */ +typedef int (mid_handle_t)(struct TCP_Server_Info *server, + struct mid_q_entry *mid); + /* one of these for every pending CIFS request to the server */ struct mid_q_entry { struct list_head qhead; /* mids waiting on reply from this server */ @@ -1324,6 +1331,7 @@ struct mid_q_entry { #endif mid_receive_t *receive; /* call receive callback */ mid_callback_t *callback; /* call completion callback */ + mid_handle_t *handle; /* call handle mid callback */ void *callback_data; /* general purpose pointer for callback */ void *resp_buf; /* pointer to received SMB header */ int mid_state; /* wish this were enum but can not pass to wait_event */ diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 117d1df..fe874dc 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -77,7 +77,7 @@ extern void cifs_wake_up_task(struct mid_q_entry *mid); extern int cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst, mid_receive_t *receive, mid_callback_t *callback, - void *cbdata, const int flags); + mid_handle_t *handle, void *cbdata, const int flags); extern int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, struct smb_rqst *rqst, int *resp_buf_type, const int flags, struct kvec *resp_iov); diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index be261a3..8326212 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -731,7 +731,7 @@ CIFSSMBEcho(struct TCP_Server_Info *server) iov[1].iov_len = get_rfc1002_length(smb); iov[1].iov_base = (char *)smb + 4; - rc = cifs_call_async(server, &rqst, NULL, cifs_echo_callback, + rc = cifs_call_async(server, &rqst, NULL, cifs_echo_callback, NULL, server, CIFS_ASYNC_OP | CIFS_ECHO_OP); if (rc) cifs_dbg(FYI, "Echo request failed: %d\n", rc); @@ -1654,7 +1654,7 @@ cifs_async_readv(struct cifs_readdata *rdata) kref_get(&rdata->refcount); rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, - cifs_readv_callback, rdata, 0); + cifs_readv_callback, NULL, rdata, 0); if (rc == 0) cifs_stats_inc(&tcon->stats.cifs_stats.num_reads); @@ -2168,7 +2168,7 @@ cifs_async_writev(struct cifs_writedata *wdata, kref_get(&wdata->refcount); rc = cifs_call_async(tcon->ses->server, &rqst, NULL, - cifs_writev_callback, wdata, 0); + cifs_writev_callback, NULL, wdata, 0); if (rc == 0) cifs_stats_inc(&tcon->stats.cifs_stats.num_writes); diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index b088c50..12dee85 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -2144,8 +2144,8 @@ SMB2_echo(struct TCP_Server_Info *server) iov[1].iov_len = get_rfc1002_length(req); iov[1].iov_base = (char *)req + 4; - rc = cifs_call_async(server, &rqst, NULL, smb2_echo_callback, server, - CIFS_ECHO_OP); + rc = cifs_call_async(server, &rqst, NULL, smb2_echo_callback, NULL, + server, CIFS_ECHO_OP); if (rc) cifs_dbg(FYI, "Echo request failed: %d\n", rc); @@ -2384,7 +2384,7 @@ smb2_async_readv(struct cifs_readdata *rdata) kref_get(&rdata->refcount); rc = cifs_call_async(io_parms.tcon->ses->server, &rqst, cifs_readv_receive, smb2_readv_callback, - rdata, flags); + NULL, rdata, flags); if (rc) { kref_put(&rdata->refcount, cifs_readdata_release); cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE); @@ -2595,8 +2595,8 @@ smb2_async_writev(struct cifs_writedata *wdata, } kref_get(&wdata->refcount); - rc = cifs_call_async(server, &rqst, NULL, smb2_writev_callback, wdata, - flags); + rc = cifs_call_async(server, &rqst, NULL, smb2_writev_callback, NULL, + wdata, flags); if (rc) { kref_put(&wdata->refcount, release); diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index bc5f55f..65060c5 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -503,8 +503,8 @@ cifs_setup_async_request(struct TCP_Server_Info *server, struct smb_rqst *rqst) */ int cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst, - mid_receive_t *receive, mid_callback_t *callback, void *cbdata, - const int flags) + mid_receive_t *receive, mid_callback_t *callback, + mid_handle_t *handle, void *cbdata, const int flags) { int rc, timeout, optype; struct mid_q_entry *mid; @@ -531,6 +531,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst, mid->receive = receive; mid->callback = callback; mid->callback_data = cbdata; + mid->handle = handle; mid->mid_state = MID_REQUEST_SUBMITTED; /* put it on the pending_mid_q */