From patchwork Tue Feb 28 16:57:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9596879 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 38C2F60453 for ; Tue, 28 Feb 2017 21:24:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A1A928576 for ; Tue, 28 Feb 2017 21:24:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CC8228593; Tue, 28 Feb 2017 21:24:18 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 8578428576 for ; Tue, 28 Feb 2017 21:24:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbdB1VYQ (ORCPT ); Tue, 28 Feb 2017 16:24:16 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:33778 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751435AbdB1VYN (ORCPT ); Tue, 28 Feb 2017 16:24:13 -0500 Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1SGmMu5000637; Tue, 28 Feb 2017 08:57:55 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=xlz0P2jm7tvvUlHDjazHlA2V0ZknXMeq+bd3ypE0k+0=; b=DgrQIzhRt962/inELAFrnxb+NdAvEinsLRwuFA7FmNgDpgKZ+BC4lRTcMzbxP4cldzcg uUb6n4CMGFiLcrrGQ04AV+MIgsGJWlzdL4synKILyDpAeIacS8q9P3tFEv4733qzhEsV Jr/NNHuK1+oKkKYHbtehtyysRFoNDjjLlQo= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 28w83514wd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Feb 2017 08:57:55 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.28) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 28 Feb 2017 11:57:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xlz0P2jm7tvvUlHDjazHlA2V0ZknXMeq+bd3ypE0k+0=; b=Vfy8ihC1GIvNUkXGKRtggiahEqAzViEwpRLjrQezAK3Y83TMq5Esegr4ShCOZ9WNzK35CcGlqtqXGLXv0/t8klAzI+HcOIa4LbMZ7OG7hgWtoWESIszTDp8oEv04STu4gOZSzyvPCPFIxrHNS9Aj4jvajWq4I8NtwC+UyvqCKYg= Received: from localhost (2606:a000:4381:1201:225:22ff:feb3:e51a) by MWHPR15MB1917.namprd15.prod.outlook.com (10.174.100.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Tue, 28 Feb 2017 16:57:52 +0000 From: Josef Bacik To: , , , Subject: [PATCH 4/6] nbd: set queue timeout properly Date: Tue, 28 Feb 2017 11:57:09 -0500 Message-ID: <1488301031-3199-5-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488301031-3199-1-git-send-email-jbacik@fb.com> References: <1488301031-3199-1-git-send-email-jbacik@fb.com> MIME-Version: 1.0 X-Originating-IP: [2606:a000:4381:1201:225:22ff:feb3:e51a] X-ClientProxiedBy: MWHPR19CA0001.namprd19.prod.outlook.com (10.173.246.139) To MWHPR15MB1917.namprd15.prod.outlook.com (10.174.100.142) X-MS-Office365-Filtering-Correlation-Id: b5f37a1f-0849-41c1-466a-08d45ffaef76 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:MWHPR15MB1917; X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 3:xWbqKzA6YC5cWtkAZs5N3rNEJ/f/fbuo0V6OWSweyCrt5scQKfv8nnsCqTZCyGQ84ys2MU0vEPQGj2EPu1+LLfWqHDtlY3TB4zjeJykvAW0N54c/qY3Irgm5OxAaxGOFMfEHClBeGPGa0Kai5SD96rvlJNfVPTVktwTwym1SvQLk23tKwEtSSV2Uw/SReTFuEJCWirOgSfm8bqGnTxgxFNcwHjuA/lt6XKmWFSaZmZDHJOqBmE5toA1KwB22q+O2wBc00eO3bzTJHlGpCnvd+Q==; 25:HLg78FQ79xzEsuHMtLM7nWTEShs8Hgd1Mptey7vFl3dAV54t/tSTJbue4ynC3quhO35rCodKmX3o8HcWl915s/r8oI1zR2O599MBhJxWHQyGvWBtUILbksV67QT8pPRnyem7cFTMpGAxP3An76wFC8gScgST2LMtVKdbL4wjuWjG03CA3lV7dj5G9yW/ajgYCdTYcHJNnmRa3LpqNpaf5XqxkJoShNA1fvbdkGW20ZvMrzGTXwMLz+GqGp4HjUZReObWFI2ArxE4l4h3Jq8u+VcTb/KHXrpHpqWfhU2E+ZgPXs8jBPnZGUhmmBXHIgFAcWJFE2tSoREehGnAF/6xJBIQ7c+SbMoofTOr9m3x/kbBVOdyp69aNIbpDnmTZcb6UOnl6tDQ00IU+9JKDCa02/fflWd45wkrjrAhG1JbORkO6TxBggujLFOyhuIBWgnE/ih6EMjZCgVO2k1uUFBsdg== X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 31:hChmSaSCSiW7gSYgxMxk3DUSPw8zFEeAGfDUCu/nyAe7wofIeYzLUKIe54s48hkv72VnHlA+8gX58wD8huLwlLXf5EkFzl8imPyrKBvfv+fRbrfojavtF/Nb1Ate5yWRvR6PLAyRUoHPFfXma/dNM9YI5s+eMDfZXI1Rp+tOLHjrKL27PM2FHQXPQoC8MIDK+Zqlh4Gxty3AK6tJqnrWayCF1zdHSlIDiZXUPJRw5sqmnYVFJGvptqnHKJOMv9Qr; 20:eNnS1oPZcp69C0VBWgyGEZBjz22hXQweGM+gDiexzgyoudM3fYU7BtQ10K+Aor7rxmeA4js8kZa8NNo3GTROnkGtTMH7jfRtrEJKBssESG1yz6nUh56Cqfr2xLqyJ6xO4BSE+BtJqnD7GkX3yRLJ7HHfOe8rAwaeYGskcZ4CsbUDxLoMorMFYMm476d2RwkLbo4SO1xlZm1A5psOLITa8I2jqChekdMwZWyyAVwyxGG1jr7X0ZGE7eNv9eSDcbTRI/qRFqVYxpHK1w8RQtIzOkuF13VNdM4b7N8hT0M4hHdo+m2thz3MibE2NfoFTAqJgcfvRNBtzO2StbEExv7chePC994YjzYzBVstNiEw7JYMgnPA7eGAeXKq4HfwdFDqXUaBDrfzfyMrQEJEyCD+g3sgwZBOF66sUIo6onYU0BARMl5LcWOHWCoZMyNzWVumsJolhzi0XlzMJG3mdFoiNlbHdOy5LLr5xOLfqQ0UiFlz94Qsx3qhdP2lU2vqd/bF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123558025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:MWHPR15MB1917; BCL:0; PCL:0; RULEID:; SRVR:MWHPR15MB1917; X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 4:5Bjk+swSnlHA8cxMWe1fzp7lWC0hD7iAJTOWTgTPy0mmsZaY3+NzKrLRa1zpO1kQQTavymXlXok49Y+OzInNqAf/2qjVfjmKGAFCMTExFvxyfN9R5CAdsdapi43zvzKAf0y+8nwAUTh4A5BAjmNJoLda6mQHOFq2ZaTTxF8yE09b5/a2oD4i7xNkn+L4u1PBqICAEX5LZ7imm63aGiWSdcYT43w50IzgoOJ7Hs/edsWdA6Gaaqh4BhgQR1TAGlWTQjJfSQe6HjF3ImVo4eAMa6i3vBcOR9JWegjS4Jqa1JZDjDMzsm2r3U4NiVMknuncew4HOBQma7anTxg59I1Ei6x2TDVHXkmDr2vS5iNFzXGV05BVWNBLH3zQHAEFFwW+7k+2rHhn+0bvJ8UnRCtcN+LkiI8RJICzdLA3tJRu3+Y9GNpwat25bZZ/lgCGbuLf3AWlniFu56s4I9jIN6b9iFxFsn4R1hFkDDAuqCpnnNeIG4Cv1kf1jcVjUdWiMvjR7zzDcqV8WcjsuAWfFqzTvwiaHys/zvMtGPWQvjGscMH3cchPmNIejWM+lv7u1hc6eAV3/PDeox80q3onpZHTVvJgdZq6DdS2hBBm/ZnKGKyAQhnZl2Jl6YkSiWs/kjCTZnVd/n1hzf2twLYLOiVd9Q== X-Forefront-PRVS: 0232B30BBC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(7916002)(39830400002)(39450400003)(39410400002)(189002)(199003)(76176999)(5660300001)(5003940100001)(6486002)(36756003)(25786008)(50986999)(101416001)(2906002)(105586002)(6636002)(2950100002)(106356001)(50466002)(33646002)(6666003)(76506005)(6496005)(42186005)(305945005)(81166006)(92566002)(8676002)(38730400002)(81156014)(53936002)(48376002)(86362001)(2201001)(68736007)(189998001)(50226002)(47776003)(97736004)(7736002)(6116002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR15MB1917; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR15MB1917; 23:l7aJNIGogteLmx8oy5bgiiIgqb5TWUnvS2PA1An4T?= =?us-ascii?Q?XkNNJJWZF//NKFB8Tte2S0qhngzZyCcgbYXGTa9W6YbvGGWvQjW5OOpiUg6x?= =?us-ascii?Q?3+hzjoLSSsyxWLrEPfnaaHDW/Id/ebVUDWHOPVfErT6ZtthTWb8/vHNL/hTu?= =?us-ascii?Q?ePamoUNR91dwEp8dn6CMp4MsZNJrzpnRMLlCwCVaes21r71DTZWXH7etW96q?= =?us-ascii?Q?4u7Z4JLRZ9bepNWuDHy2vzbduqtI9mYuJDX1z2zsfIYmo+N5+esAw57i/H2J?= =?us-ascii?Q?iQi/diSsg1FV4HjoakoJmzxPEzCOmNJhVNKjsQYOq0QIPcwKpPJWp3B1rfgP?= =?us-ascii?Q?nn+4+yqjNsgD/Go1p0e+vJxm58hmNLza54UanTye9bT9emu1chAYDSE4vmei?= =?us-ascii?Q?Gr5Az200WSTyJrXyBWnlYJcDOp4zU0pl/gcm6cz0Yq7QSf9mkLhhkXuM88R+?= =?us-ascii?Q?ws9g8Z3JW8/8v5+KrsivyfdLBRj6679rKd4tq9/JWMZ4BzIRcbj7yy+ADT9F?= =?us-ascii?Q?s5bosRtXmgOOhs+72npcF1eFBNPX4++LYbZpRT68Atlvfme9HheVSM7lXYa9?= =?us-ascii?Q?Iw0RFURB5kNF0HKn5emOx4OyKwV/tMhrzwhUPehfRavGcWivob4Hcu7QQMPf?= =?us-ascii?Q?HZqj2PIJwFAsNYxalC41/UCND8ZHHc7HQxxKU01BpV+uZmNCtq3+tN8tBAR+?= =?us-ascii?Q?t2r22MkdeK3eldNiyQtIXQenjDwz1uAFd8tHztQs4TFu/ACsOFbUd3sUzD+q?= =?us-ascii?Q?p+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mIU3SprjUBvmpyI7r5CKkG1NQfSGkt+Ks23kFy66U1FpSZ1Nug7iX565G2SobFvWG2mpdllwN+ZoO+TOXdMpUubllvcn9Z0+4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 7:4aA0rb/TO99hmG4FAbpcNgMaCQTMJFNqwwG5h9Jjp+LRae//+zHzKccJn3pgD76MSFxzTKyyiItBG9mCMayQUPO0dzsdy3/ZUEzclRutKHhxtxTuAG6Y1jarz16a6XovxYZxtggxHUppF3tTDo0hL97uzNFhCK0ed3Ws4KLAvB8TANIrDmJ9T758EzPwhniICqz8CkP2xVpriMxHAQxDzi3f3VXjeJqtPdAkMuQI0geu/D6vAbYoTfq3Uc6hVyQLpKGh1aqHYEWH0Zq2qVFRRn63MlzHdl3ZW94OZHjPmj3cVTEXm/jufXNGeDEjV+M9gdZbII/U+EzGxQu2j4Ayug==; 20:9AJazktdRx/QSz3bSfroncHUf6SsvRL+gmMO5DbqSw3Q/X5svTOY+DCch/f3k6KrvA2WJzwnifja8fArRYs2MUyvzkrcNGBODUXgDTu+DftOm9p4btbKKZproi6XluFxEw4DKRshcv3qUKL6oKCkIYcc1+GABCRTnNemjqmsfJc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2017 16:57:52.6769 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1917 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-28_15:, , signatures=0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We can't just set the timeout on the tagset, we have to set it on the queue as it would have been setup already at this point. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 059c80a..ac5a03a 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -909,7 +909,10 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, nbd_size_set(nbd, nbd->blksize, arg); return 0; case NBD_SET_TIMEOUT: - nbd->tag_set.timeout = arg * HZ; + if (arg) { + nbd->tag_set.timeout = arg * HZ; + blk_queue_rq_timeout(nbd->disk->queue, arg * HZ); + } return 0; case NBD_SET_FLAGS: