From patchwork Fri Feb 10 18:03:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9567289 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 7CA95601EA for ; Fri, 10 Feb 2017 18:48:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D875285B2 for ; Fri, 10 Feb 2017 18:48:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62314285B5; Fri, 10 Feb 2017 18:48:37 +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 9576C285B2 for ; Fri, 10 Feb 2017 18:48:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbdBJSsf (ORCPT ); Fri, 10 Feb 2017 13:48:35 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:52792 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbdBJSsc (ORCPT ); Fri, 10 Feb 2017 13:48:32 -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 v1AI3WOP015190; Fri, 10 Feb 2017 10:03:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : subject : date : message-id : mime-version : content-type; s=facebook; bh=J0cxVzeZoWFWDtkYpCvah1YROuSW3UUpmPVwTt1X5TY=; b=gLibYRHcca2dSYgRNYvyfpjkKLTMLBGxsiIXWCe6vK0cFY1nAyNDpoCrDsXJWq2qpqTs gzWEpivZZYXqiXts4WnyvilYzwRHECHjiNH5KuKhf12aH3qEggS/vOZNIz/rE7KxR2yv hIvrvR7FZFU0oKgemRUzC8TQiZC5XKEAG5s= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 28hbf9s2j6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 10 Feb 2017 10:03:45 -0800 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.22) with Microsoft SMTP Server (TLS) id 14.3.294.0; Fri, 10 Feb 2017 10:03:43 -0800 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=J0cxVzeZoWFWDtkYpCvah1YROuSW3UUpmPVwTt1X5TY=; b=iiktE4d32nSo3abQG7p+9Kq6VBC1jXPUB9IsiMue+3UzrWpRFo5+NLJAQauoxIFUQj/Os0ypE/HDieQGKRx/vg1BRFGEBlM7l81plp70D0IF2wnL+u/r1XKlJXgypJ7evmTTzkBSFwfKsAcxI/JyURH9BYuipalHN3hu+8wy2lQ= 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.888.16; Fri, 10 Feb 2017 18:03:41 +0000 From: Josef Bacik To: , , Subject: [PATCH] block: set make_request_fn manually in blk_mq_update_nr_hw_queues Date: Fri, 10 Feb 2017 13:03:33 -0500 Message-ID: <1486749813-2167-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [2606:a000:4381:1201:225:22ff:feb3:e51a] X-ClientProxiedBy: MWHPR11CA0026.namprd11.prod.outlook.com (10.175.56.140) To MWHPR15MB1917.namprd15.prod.outlook.com (10.174.100.142) X-MS-Office365-Filtering-Correlation-Id: 8932db31-e160-425a-475d-08d451df25d3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:MWHPR15MB1917; X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 3:aAnJnyT1Z/R0Jn4+TC4CKuDqcD281vmL2qJ2qOGodTPPEhcWpq+X2vpedJA29zGIzn1+KJxHMlFrTiRA14sey6SBIJPVIsjBdPYFKU6vHpCtgE6yRL99KJ5ZiI0GALuEUekhkSf2nVFoo4D6fKnTXL2+yQexsb4ic7Pd2t4cN/HQT4uq5RtgicCs2wSPFpmaKyzd1EEmO39aSWjQBPqtdD9HVaSTpQoCHQmNE4l05lNDdNkLrYAKddxWbZiifIn52siaRBbHSPXDzjl2ocg11g==; 25:ajCZKqZcUe0oswajbj2Xk8To/YgeqHmP9BltuWTpKTaBr1SYFw1u/eSQ5kvS40irTEa8YIDgAnAeUUFFimYP8aJ38FBR2WKHnNEvWlKSUv+pgipmFXXnxRS4VXzLkn8ud1sh7CiO5sZ0JBDfT39BFBnRM5HvywLam2OKB7d21pkpOslTksKf/A62epxQjf1vH4j9qpeA/AcfqxjGsp2PVtWGW+RLvZSQJUArSWvZnqKnPhcAej6sJ4MeZownzNzyWEuI98bxBsz01KqJx0YvCdp/rfa0fXYBlhSPqr4QHerJ9TMvmSUOnyDVHKBNvr4YjaAXQcXM2MxZcyWq0Z+o9LJnT7Ay7SyOQ4MrQhNkoim/ypiB6U6biHGrJ5mf/sFgTJxiw8+HGfY2qk7qd4EOy4DeT/pQfyDMaDv3lRcc5BmC9MBwEAGUtk0Mo+9a7b+A7uORVWzrPsA8T5Lx4kZDAA== X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 31:N7mkTJ1WE1zAHlsiGJP7CUUOCW93v4wjtIh7bbc1xb2j6uwkpBo6y0XIbo7Rf3WGHDVnSiAv/brGObGSS349KkuMjnhKaMwPn0PZej9QVtwicrTwG3d0jiHLusexDJDybbV8z6jgXjYy+bKZGmzln7WpRBXFAfWcJgfb9nnmXVS2z+86Dl9afCVzs0OLgIeAd8xhddo/DxvBlcgzArCL57QZYCWK1yP01xDjTfzdm0zIgfGl/p3zFu6DXnYlguDO; 20:EWKhv6ex1M9fQ0AF6Ns06P7kyIqg2IzSkhpSOo+v/NBgkI/h9NZIaIgdnjq41Iygw0R1Xeyd9mdhlsMVXfs4aLN9wMZotm4j9w+0p96y4i2W0vK1FABWQQ1VrcdWRt2+/1PL/kH9Nx70tNT5t93ATXvgNprskb5cVwIRK3V2+st7Rix1yqzKZ3vb0/a0ExN0Usbu+waXHQjq+iYFYY6hAKr+aKNJEFatVkc8trneJTKYk4PJY1J74FsKBrBpTQqCJMe6g8KFjcoKOUs8cQsc4+eiC3quT7KVMU3CuI3qBe7K1ecPwfr8rb7XeeBU4VZ06ph3fDALmL3/eZXR/1WDxnhPAFj7CEiIMh3Dpf6EadrNMP+vmSmmcRVDMtUauTgi/BwoL5nWfMoWYD80WLbHxNErAbOZfl3vAf9C4mNyXGrriQ+UALujzXKdLnkibdX+576xVMNx05kkcDLfpRoVNNx8PY7YHJ5X23WarcL7PTMtIjYfQ3en/wDDwPamX5lB 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)(10201501046)(3002001)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(20161123558025)(6072148); SRVR:MWHPR15MB1917; BCL:0; PCL:0; RULEID:; SRVR:MWHPR15MB1917; X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 4:+MU43R+wxG2v8bg24WiBLK9rBl/Hk0BMX3G2IkpfckqGo8z6/7XNlG3LJg1UQNg0kvaeUERXF7eo/a79O1vLljq/FsDI9kiRqM4Qg9itG3siK4HBo0PMaoRk4ESu2FeY3VdgIpePVfb+u7zzzo41vEDUxh7DEYMs77SnHOEv3sBILHAlx4437pLihbYX9c1xnrG2eLELRWEPIQ5UdFWRRNQ+rjnvXhXAydTzZofVmnCxbEFfmTP5Vd7JvLBioTUr+bROPaNmMF9UngkYJzOhWKg/SKpUDeAQrNFnEH3FwfVc7jPe8NQj+s/6j5Lhg1IXI83phYDUeTT6Hfo8PypamcoftpEoPahO+mItgJZd+GW0AUoyiwxUGIC4IqF8gkD1+ZGCZD44h7tEvn0wy8ULrBsw2me3Qg2Fh1z0Y+urn6Yb5nEX3JttEm7PdIeJuJhKmYK/6G91g9L6zxHDm/fo7ILbyr/O8pnv2RpMOLKznPBOXm35SWhivVQnUJhDSVJiIOnofDvEqkahf2ZTi+NGa4lFoSRGXT77oQv6yyYVnohwJYFmtt6pb6XKp+V4RxFPmPuB/8Hj9/2kO/qCE+SGRDmz8KlRvMC5E7AF8/ygKY/uOC/HwVfhJnMyoz2pf5HYX6iJNQTxdnl7aLKu1M3IyA== X-Forefront-PRVS: 0214EB3F68 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(39830400002)(39410400002)(199003)(189002)(2906002)(76506005)(6486002)(2201001)(6496005)(106356001)(53936002)(105586002)(6116002)(33646002)(47776003)(48376002)(86362001)(36756003)(50466002)(92566002)(42186005)(8676002)(101416001)(81156014)(68736007)(81166006)(305945005)(5660300001)(25786008)(189998001)(97736004)(50986999)(7736002)(6636002)(5003940100001)(6666003)(38730400002)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR15MB1917; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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:J0v5bTAYw7YI+90Y43W7B1y44KYbBkz/aMq2COpv5?= =?us-ascii?Q?SjmVIfQujOiFnmIURXyNxu3i308VZslzGFjtYQIVavqniX4+SdtgNMmzInq1?= =?us-ascii?Q?EzHbaJ2S/886tsSCOIdXk+J3YVmn3uLPGlqt6yo92Y3h2SCByrrVhI07qRMu?= =?us-ascii?Q?R7aBiVWRDRs7qTecV0VEQQIK1xK5DaVqaxfjfPSiePMBIDJzYJnKeh/fe5mz?= =?us-ascii?Q?lvRy210Ktdx48JC5pMhUVOOCFHC/ATbkkvKRGJbkfmOuRHYiFDcBt/ic4+bB?= =?us-ascii?Q?ZhkBQbs7eI+GTTpiyu7cb3J3PNf930yZSwGzxNO9SIw4kyIOdqnfXX05G5As?= =?us-ascii?Q?lGl43QmMyZIGaK9UwvGfdvJ81QY6fP2bGHAblZLJqHzhdRwJbXFMxqx39lNK?= =?us-ascii?Q?7ETX6UlHLUR6uRewK8AaLgqato4+03fO1znGrFy+sAPjWWQO1x1fY9QoyN3m?= =?us-ascii?Q?8gmuQNZA58TEXwXFcM8iijDiB8vTbWo/UMEhbTq8yQKUiAbDrG8f4ifFtsn9?= =?us-ascii?Q?ypcXwLWRS5pfricHWTxC+a85nhUB20ip17ZbdJP2WgZszSBn3z+J8Ci4rsUb?= =?us-ascii?Q?c7waN2Ku+bp4jucPscle+ZElRmUGaKFQvB8dExlB7+nYbw96CZ7OFVEX2H9m?= =?us-ascii?Q?cHBbFOar0Ou4BIJG3YKNzjiNxJm1QlhnH0z6zhxDv1u1G8wsuuCJE6B55H0I?= =?us-ascii?Q?P/mVZx0UnQznvBkCnZpljOOrXURpDvY5mooTO7NDVa9QUKn1myLaOVwpd/cC?= =?us-ascii?Q?LLurzeJH19iwCgutWUgfcnzQGNX3aWvcTWWh5AtU+Tofjz7hyyYRs0QXIhfX?= =?us-ascii?Q?B9wMzJG6keqq06bxm4z64+egqiIE8g9a4HshWoyvVmfaX105AgmIU0u54G9r?= =?us-ascii?Q?zXyQyTe73sBQ/CI+C7Qz20kbiB6rmTcEtkCeNje4iKQerosdiytEx+p5WM3F?= =?us-ascii?Q?inVgWmPI3B0U6cam+uwjBzbV9CSInFqzAffG9tIc01alZDzzg6ihMYL6DP/K?= =?us-ascii?Q?7S9xhW3dovLMKVfiaDy2gXSmlFpiEHOPjGbZWlDqJ/eciCfpb20fng1PeTK9?= =?us-ascii?Q?nZi0Pw=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 6:Jy4iJW2Q5uDBnBS5h1xAvQk3tYp019qJudWIK72d+5DaV0fKcdhRrqGJURYwe7hhqFLNK1oJBaErwqsudRKGrkiMobYJGjJfH/nmgV+tYsjO6iGk738JtQFJT7T5mqtRTN+/XPOgOmzYhBOIwVxLbkngj8aVNIeJTrTLdnyra1p288Oh9S85kUQCC7hgm8cORVpvELcqgw0nWD87/m8635dBvy3wJ6oIKO/0GIW3s0nvinUasrDQCwuas3ChXMzN68UI6KnXi9bWA8iztB/lYDMrmbEFnxsORcnf3em9RHoJshyIyryj1T7wRlvML9NgAF+xDsEhx2GKhj6SMMWu71D9H/kTngnviB0U4utraVGjuwkqwvwJdzLk7MAGJH7ukK2Kk9xvfBDEN+dG1EWpSQ==; 5:k9AFry124a66rkVyOLPultFDt3mJYYPMmln43eiXvZW+XXVh9XjVhwzaSxAS6SiOsA6oHZx1Ptw5osu6+AiFfHCvl04KQKxjMYPN3XsdiVdXQ2aQ4vjMaG5QFAuME+vGciLjMYvOTZ0XfAKOxAOQTw==; 24:8aJtqcNBGZQ7U6Ku9/A+/iOC7H9hdZPgm1Y6ApDz18ic9/K49QDWQM4vNuFkVaNnGH3PWrv3//sQcgi8C2+sYTa8eXuuPgpeKfNt6IJ1x8E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1917; 7:iUoNAhf8U/utFqxcKDuC/oC84ChvuEC2HzJJ97LB1iALkTKPh4M2VER5CoYQIm34qEZoJYkc0th8hFVKLCdGWCHRr79r7L3we86nVfaYQbrGLEWRB/GijK9luhNmgCfD1JBLi0GLvY5UGGbq/FLaM4WFFzgDx+vm/whbOa0lMn+zqhx4ih9S29wRX2hpC5Ec97S/qYvVIINadzCVe2Nhjul4jj0w638BxpiWhVgPT8dRrjjsHiJFVb0j6vCs0TSkwndkUGGpoaWvYLB47rIKWex3kQjOki/pj1mS6MMRuwIVeVPK/gt96bTnQoBOP5c3bssH7YzhoVo6FBFiATY9sMzD4Nw3ST06Zpmz5g6BGgV1Rz5CBwXlu2ZBh7baRB5yHMYZlTGFI69oxJE/C4x13t/hyR1i6Iv2xloZ3/8/GWJWNlQ7arWn33fsPsaWxe4XWDDHGyJcYGF6OhnQ4R8zaxrITR2918T5tBhPtx/Ec5QM3mV9yuKluMhuAdvxpHjRPqdalFEK4cN8dV4Ym3Kn5A==; 20:WAnHUweI9La1wBLhK7vlhPgylSsPXlICJgmT6hFH2dLDGWge6xNaT/Xk6L+CC7y5aBB2klTR018rMnTUAgWsRvOHLP5/0NnA1WFmxd8v5ZpZxkp3rU/iIY0AgiRkapMwUsNlZeU0WZ8rO9Ju3KBzWoQYyJNEseAoXeoIXda6ago= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2017 18:03:41.6889 (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-10_07:, , 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 Calling blk_queue_make_request resets a bunch of settings on the request_queue, but all we really want is to update the make_request_fn, so do this directly so we don't lose things like the logical and physical block sizes. Signed-off-by: Josef Bacik --- block/blk-mq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index be183e61..eccbb13 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2627,10 +2627,14 @@ void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues) list_for_each_entry(q, &set->tag_list, tag_set_list) { blk_mq_realloc_hw_ctxs(set, q); + /* + * Manually set the make_request_fn as blk_queue_make_request + * resets a lot of the queue settings. + */ if (q->nr_hw_queues > 1) - blk_queue_make_request(q, blk_mq_make_request); + q->make_request_fn = blk_mq_make_request; else - blk_queue_make_request(q, blk_sq_make_request); + q->make_request_fn = blk_sq_make_request; blk_mq_queue_reinit(q, cpu_online_mask); }