From patchwork Fri May 24 08:48:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13672831 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DC23128820; Fri, 24 May 2024 08:48:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716540541; cv=fail; b=Usol7TPlhRsEUCbPrKoNCadqH4eQ+EFigH237MxoESt3100HjThOylceda6dCMZy3jD88Vq29apzpuGlj1NmZ4CQtuXoBXkEnqsnuamI54wIAc124Hdt/KcBK5FxRR5aTlnzG99VrZvJ/oLbnPYPf8hgzrC6xbbTD+M1L2xovuA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716540541; c=relaxed/simple; bh=W7b07JiGNVLMKQe3/tvbE56af36IyksZwwFibALYGeo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Q9XWrQIBAfNh5QE0BxL6EsHnaCVewZLOmm/R3Zip8HxQn21ckkVb6SlwP+L7MHJj7Cyqrn74AM+ffXh9Z5h5ahsvpu5Abv2RHkyrVFvg2zYM42S4MsaadyvezHyDsWYkC2pGFDxtuNS9RD/xfFH+QxxRvpGoFgyFyo5tmuEycZY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=WzMOvuqP; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=jf071dS1; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="WzMOvuqP"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="jf071dS1" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44O8iQ7X006542; Fri, 24 May 2024 08:48:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=qDauJyWY+iLrnbwQxqR7qtOmvaukpKzOxwYU7XWmi18=; b=WzMOvuqPAsAfrJdLMfPQWjzL0HkDJb4NsS1Ox3eSh1MTWKR4x6ETArJJuCTI+wbtr1b1 5jL1VG6o//ZVCz/6BKWTcepbcdSp4zL3KgYya+KhTfAIk4qBwaZA1MGPu95b25gPKkoD IPMXR7Ixoj6zB3AuQ+ZpQ/VUQ4gxzWHL3tZf+/tcnpXvvoQqC9KiXLVDYx86me6bY3JK mTvTflqQAVGRYIfTOidf+/Awg9YqPDHEDx1R94qI8j0Lojm2fNnGkb6+lGGoyADV6qVn G9eMYYCCRpE0/0YzEHNO+snxdhH3yHiPZHaR6l6Ck02/UxgT5QeLNB3TG66L34oB7p7M 5g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y6m7bbku4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2024 08:48:54 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44O8KJwj013839; Fri, 24 May 2024 08:48:53 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y6jsb2j7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2024 08:48:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RyU+PT3HDqsAZXybIuFll33L2cXVQw7XGPPlccgzRypy89V9LFkkfGLcAom2oi2av9VsQwKXVp2l6VWTvrQ/YPtyS6Pm4PUm8bXZAYBhsin9fMEPAFkLHlOj7QW08eCaHtbDYk0R2NFG84zAqJSrMVewdfXgo/Gyg6aIApRG6KwLjPges03ajJMqA7gwrVo/MVmGkz2hQmZvg+2ZdevFwVNOyBnLqYmzx54FNbQ2/N5A7+G44UuGjRQ0JXvxQKBOLoplz+6dE8xFQoxFrE90zterAHdZ4T7zvXo7CRDon66xGDb1BjlEFDz+4h9YRurZzfSdMgUw5mZyDvxIeYWgTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qDauJyWY+iLrnbwQxqR7qtOmvaukpKzOxwYU7XWmi18=; b=OS05zg1q9yu2dPu4ROP2Ku+iQVlE55UHa0Z/ra0YaW/c7kxmZfbjctQfghOVhZEiOVpolsPO5mM9oVhaocRgDN4QftL8lktuu2ItckXl+3TZlvWJrzwTgldmNxgbOF0E6dPO538X1RVlpQrCcb+1dairOTN48IwXIEQj69HnUS0FUzNdzSiBGwesbRZM+KehlRqJ9betUwtny0voHtdsIwzn+Zd4ldGtEG9fL+l9UFb0RXEtVSqeRd+ql5dj+kA7PBesbMqc+DkPKS7JAvHAlCsUgjermmZshg/GKvjBUttseluRTIjtwzj2Bc7jiuYWu8YdEjZk0ortFkvo/aBK4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qDauJyWY+iLrnbwQxqR7qtOmvaukpKzOxwYU7XWmi18=; b=jf071dS1Wa3tBHjZF9BlrbsG2Oq6YOa/4XPLP/o25aMJLcKhFhHQfxg5A+mlHv2QNKh3i09tySvOrJjnI+MC2bYpDOkyu0FvPHxpIgecOlbOZipngbHqfko6h7k6g+RYSLyffE3ehTRW1GVN6C5JqMZRZJl2Bfwxqs7bQ2YcVNw= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CH2PR10MB4357.namprd10.prod.outlook.com (2603:10b6:610:a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.22; Fri, 24 May 2024 08:48:51 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088%5]) with mapi id 15.20.7611.016; Fri, 24 May 2024 08:48:51 +0000 From: John Garry To: axboe@kernel.dk, martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, hch@lst.de Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, himanshu.madhani@oracle.com, John Garry Subject: [PATCH 1/2] scsi: core: Pass sdev to blk_mq_alloc_queue() Date: Fri, 24 May 2024 08:48:28 +0000 Message-Id: <20240524084829.2132555-2-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240524084829.2132555-1-john.g.garry@oracle.com> References: <20240524084829.2132555-1-john.g.garry@oracle.com> X-ClientProxiedBy: BYAPR08CA0044.namprd08.prod.outlook.com (2603:10b6:a03:117::21) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CH2PR10MB4357:EE_ X-MS-Office365-Filtering-Correlation-Id: 5dfb646f-e083-4f56-bf34-08dc7bce5616 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: JDQ1xi2hy0R2QJKos2CG/ifYVpXwbibWReyhVB0traifeMJHryq6lCWOE4SAWBUXmPwY/n95nGI819ql1VpzPWXrNYE8Sl1YXX8euIjvHumTm89mF5vJ9oI5CU3nSKT4YIUSRF2PN1atS06iuYX6nznvThD6tRUxzLlSBIOMZQsHIQz7GUq1l6fOxt7zqTyC/mLTrI5BIpGMoqat79Eb9Hp6kw1h3zah4KVwRwATfptrSX1GLfTbW5Z7XwvZiHfEEa1W7EZwjQy4vezg7YiHhQ6M6DHWr0Lv9w+JsxrlvC55p6IewFIDY4MvyjD2MrSQ/RBEzV6jNnRMsZYL6Py/fa4xZlK181EaVpILqRuej+FrAIclXJdrcr0qGz40BksUrffNwLRTUpuYREHZWBMKxFAgnBLUHvxg6wWqgqVI2LycAs4DsNBeGkpldk7fXB+K1du1UGm2ra1ga0DeXCcR8QBIqXb6HZngiIrckFX+Ia2X9us6L0XogL8+3kqWFf3ZflEghpcZBwr9cSKS6fNJLg6vvV3QHeRm309UTmQeXwUzd8bL37NITQLt7HwW9duinuJscqJNeqm05wEa99Q8XatcOqP1hpjZP2lwkK3aGHLjgJQNDznzbF8+hDiJiPSGz8GTmoIl0SkvcyopTAeuoRGLgqBmn+XgmWftRl4jPwH5UCGYtm/0RNnNOBTVePN9Z9Xtr8kgVdZnsEXaagF7dFurdGDILQQ93V74CC96izCfyIPexRZfecRO42mo5D/MCnpxOOkjAH3vECb6+D6TBC+n5MidgAi0x3ZsH+M7Th+08Wcvscg2s3GUBbKol39ALfQGhsl8rbAQ9RyyP7+IiTrvQ2fi+5qUHzK84MY2WRtFLQsf9CP5GIk/PiPPPVWOgk+tSZcHgrghHX2UABksu//1/Ho4X3i6NfFt/usSajSh3pLY5MnaCVZkVpBaTMCLWzJCnXUgYFrYO7+jib3IaZSoL2i6WLBW5W9MHCM6zybo7sUTFUFruZXyTUxC0qL0HA+R0FG6oSVxElANeBsDsWSA8PO9f/qzWSjwCadyIeKd0XpvFl0XDtyS1NtpZmVeSbwNMzLu7SgYEDKhcYLGsgj7ubhsHqFckPbCWwL3I+UXF/t/oW1cDPeBnoXzfTbrhfaM7u6b/OnFHDVoTK99PBSp2Vh01FtnwdHZ/+2PAYlS8DHgR2Wx0XFkmAw1RA+UTHMKO0KkMRpdOjk8pJH0FoPjxloXub0oIs2APDo7q0cOYc4py6RrXlwzuIK6khTIQHFHNN3MuWzR1HkEMA1P6A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: olpqbyD49ip+MVCYipe7TiNO6A89NOxVUHlY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Zxs0F6B5/9WeqKHodmgLbJgapYvYdlqBPiyQ01y8YUYo6K4lXsRa+yRNk6XV3Dnkl+VqZwCN6H+qs50j4CHm45o8awkVoWgDaVBwwHZfFMyzt5PHC8SfWIpcHkzkU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dfb646f-e083-4f56-bf34-08dc7bce5616 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2024 08:48:51.8882 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SKvyXh7i3PYOeVE5yW8EtBzj+YSfzCzdnfhFV+xeUoSXFHrWL0Pj3t3Iq2y8kV3/qUQ5/8MJAyMlSgGWZ04SeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4357 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-24_02,2024-05-23_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405240060 X-Proofpoint-ORIG-GUID: O2EGZ7Lexlti0DAPBdicZQ3bsMv2xFVF X-Proofpoint-GUID: O2EGZ7Lexlti0DAPBdicZQ3bsMv2xFVF When calling scsi_alloc_sdev() -> blk_mq_alloc_queue(), we don't pass the sdev as the queuedata, but rather manually set it afterwards. Just pass to blk_mq_alloc_queue() to have automatically set. Signed-off-by: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi_scan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 463ce6e23dc6..ec54d58fb6c0 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -334,7 +334,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, sdev->sg_reserved_size = INT_MAX; scsi_init_limits(shost, &lim); - q = blk_mq_alloc_queue(&sdev->host->tag_set, &lim, NULL); + q = blk_mq_alloc_queue(&sdev->host->tag_set, &lim, sdev); if (IS_ERR(q)) { /* release fn is set up in scsi_sysfs_device_initialise, so * have to free and put manually here */ @@ -344,7 +344,6 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, } kref_get(&sdev->host->tagset_refcnt); sdev->request_queue = q; - q->queuedata = sdev; depth = sdev->host->cmd_per_lun ?: 1; From patchwork Fri May 24 08:48:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13672832 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B659F128820; Fri, 24 May 2024 08:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716540544; cv=fail; b=ZpjTM1EHGE9Mn4uHxAYBVCp2h16xBZ2BFmc1O9q6/m14o62yqvG9HaTHHxD8hvVGawBXFF5zgqCuFKEf/hM0/ytIKXEh7vEqtaYLNM5bAUPaHwvFdckm6dKNkF+hD/EQLivNmuBS5pzHDAXIegJ6BU+kM2QkVEhMHvy1eKQhLgM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716540544; c=relaxed/simple; bh=uI1+juaLfmSGR1NqkDSkOBaDUccllqPtX+4F2x51Vc0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bBpfvKnr+hZl/MiLTui2J/4koEvpSu1anEKuCczsXWS2eX+rHsrGBLHM7TvbqSJscpu9Q/lrozSIthz0tAUVUZljA1cWnAmpvwcYLvh7G9Em4LNDagifaTMdj5W3V7o1AZOpjfZeyVbAGT7hLJrJqrmodXZ3CZ0SwAaGhRDeCMA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Vl7Emhs4; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=kV+CBpYZ; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Vl7Emhs4"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="kV+CBpYZ" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44O8iQhV006550; Fri, 24 May 2024 08:48:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=S5HzB5ltSO2ocoPGwwWQXXNN8OAjIzpeWkWGhAdT3gc=; b=Vl7Emhs4rMgH7bjmXMhyf3DaiEqXMYTZdhuyM2lT0bcENgqYZrJG+MLRgNbpnTguEBP5 /CrSN6Ib5grM6XtLaiexzJyyuSk7Qp73Q+UfuyqheJCSpsVf9ayGTSLcNuLMyM6P7EBE HXG93MiibRj1EJ7kJzSvEmPIUoR56gKMmG3ZlpJfkVjU4ewsZEdDIDfHHro1bPYYGoM7 /Wigaen+R4ZMJqFGlakEAZlozNpWF3ScnAEFGM3mUOLAH/9zkLMxPeihL97TIw4Y9P+H TCBQ76rmx5RInRmKJg4c90qPUM3vjByWO53BcyBWCrmfXfAXV4RISOtHba9Yz8br3hJt mg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y6m7bbku6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2024 08:48:57 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44O7sfJi002666; Fri, 24 May 2024 08:48:56 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y6jsbmruf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2024 08:48:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=caBuN1Y8+qv/mkv3K6XdICy353Ug9C80W/m/JGjFZKO4gd514GmTgw9WLF8GMs2N3y24nG5VTR2GzGdnPtVxFQ/Oe8T1vSX5Ma+EMOYDPMqjJgEAvSR064zPp08e2/erUMnP0ntluGaB8eOqM6+nrsYfYfVbYWsR0p+f7WMQZkQ20wWKV3+fLwgtKkl4REVizhbvESfXunVy4/uMBsysfbpJQIrsMOwp846biq+xb4VBtzQiPVKIR3QqchfeS4wTJCdu+uj7jN5wwORbT+KtNfB1t6RE08YOIUAvkTp8Ejper7mAT1SXnVs4Go0KfnKeJ+6brdKtdGJ2C5DTaBEa4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S5HzB5ltSO2ocoPGwwWQXXNN8OAjIzpeWkWGhAdT3gc=; b=XZl1r3rVr2NJLLhzdAzwhCwPQNyRr4MPKnW/pYRlpRetNzVJ5P52k/3139FZR+BIujNnASWjEHzp9KokB5X3DG3E4Mmgqdhf42XCyxvmbx1a4gEukinSncp/nQ89w8Jzw/WZyEejQaFPSdOh8R8ZTl/sfiXVNL8aTQ6EnRi3awZdIrjBUWRWk7PrncB0UPcinjlceZz2YMNtIzyutWUUNG41yZfRQtprFWprLOYpjpY6HBm8ULisWb/O2u+UGXj2scgonKfS+FAiuO2rF2r5HK6htvfhUr1o4k5eK9A+/pdWKff4wNCsyAB2iCsdH/8Piy4AxoTxkuoVbWoQx6jIyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S5HzB5ltSO2ocoPGwwWQXXNN8OAjIzpeWkWGhAdT3gc=; b=kV+CBpYZvYfMRPMBpKeRtuxxyfsw0HEOXen4NRJ0FHGPgZU+WLGwRk6S96fyg+NoxaE1/GNIfzQMlCX/k0irIswYBKe8aqyxukk9AJ/Y4p882MqWmsGYnA43WwAt1rtrBZxBLmqe+8MlmP3RI+w15lDBefLpgUjhtug3o09g7+Y= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CH2PR10MB4357.namprd10.prod.outlook.com (2603:10b6:610:a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.22; Fri, 24 May 2024 08:48:54 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088%5]) with mapi id 15.20.7611.016; Fri, 24 May 2024 08:48:54 +0000 From: John Garry To: axboe@kernel.dk, martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, hch@lst.de Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, himanshu.madhani@oracle.com, John Garry Subject: [PATCH 2/2] scsi: bsg: Pass dev to blk_mq_alloc_queue() Date: Fri, 24 May 2024 08:48:29 +0000 Message-Id: <20240524084829.2132555-3-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240524084829.2132555-1-john.g.garry@oracle.com> References: <20240524084829.2132555-1-john.g.garry@oracle.com> X-ClientProxiedBy: SJ0PR13CA0098.namprd13.prod.outlook.com (2603:10b6:a03:2c5::13) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|CH2PR10MB4357:EE_ X-MS-Office365-Filtering-Correlation-Id: bcc7d387-7b34-4fca-2056-08dc7bce57b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: coF+v2WUxesmQaV28Q9RawqClId060ov3hxhEw6Q99P8UpVXOXsxiZZoaTqC03r/CIiH3WIC3B2e9TLmzVZF6qPSSHa3t9Nzr/TpsxSkGcH6ZU68tPRf/bgRA+eNGn/26SrGvG+P9+qpF86EXjXSMW8zp6S7oArzRSoWAu+BKSXZ1NrjiBE58HLEyvcxHMVQXjSbZp/Rb+mts9ujUyyGvpgtoFAMndhSEGdyfsETMpWAUqKlzCfQLfqccK9ZXIPMStg3UXI5n+54fK7POXRY0On4USi9CzmCrOBS+bsg29hmekBec0MVXWwKuRN6dcVnO2opEiqnSwLmjRKViaw83AWF6EOz1KMfneC/Gtjd5ftdD3xXsILii7t01dpjWREZ+VWHi1oAdrUGvAZNt028IJ8O5+4D/zZMSwIF2X0/YkLgd6YWOW9aTJ3GAb4btSAIyf2HnYqhcneI5kcPSAZJ1vWAuAwOcY0nGuF/yAPMvD5NGJRKPfC+8kp4/z2uGI77kogcXqoroPx7ZmazfBCQ6fj/jiENemTntaPEVFjayT2WvSFO+u1e8CeHJPSObhxAHMXqoOqqiQsHt7loUBBRk4sXeWgUB12ECqhXxTZMHirhzVuR300Ag3tNiY5FIGK7oWN8+Q1aeKqkGur0+JDHbq5Et49FjWbIXA3mLijlvtV5tBcituGGpE+CPx7zNSBNebF9Q6vJAT2fewo6ZT9Xvd7eA/g74PODS5Wuul6FQFnbbPUZmbMdv3nsQl+ZLaJ2R1IqJ2jDvOEI/NtQEVgXJdBEFXTP1esw/7FtejShGJCLRjLACO8q+QRAC0PSvzbRMr8EKyTwVrbSEk5+KZsEZgqAopAoN+9YknOZ9mTxR3iZ2eunNWq0+OziCd9D/ZPSTl9Xw/bXuRZIWmDYTPhWB3SnD05lYqPJVF052qQs47oxy+o+bA5KAL3tGKt2J4a+lRrUmyZhQ3KQmZpdyUB3BYLFs8anB55UU5Bp0S46pcD2VOgYZM7E+u4wY8Uj36LYpwQVEeabL6vZR739+4ZBH6A0Uq6LtFwzaC/US8dL1CG6fz6bApto37psfe5J+xKTaQlbG6c+p8XDFo/PLnyji1UqoZNSLJxQohJhzrAYikOn9EA7QtbaUvn+UWQf56bJE4lYLWm+Oda2MX7TYZK4Uwh1nGGD1R9gKj+WxNEnTQf8sHsPxtigXBJTVVdyNqGFL4XSDlis2/6vlHKgWYp1vLImLfxkOloHM6mWMKYv+vyqaZgaBWgZD0Qiem+NNSGI2/ih1NgMUrmUfNtJ6edJuw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ji8G1QtEpO9M8bCJ67FwQOD2MaVt19MSTcUjJjtEj4Ve/DfkBXEZ8MiTypYOi2DHUCML+BSPP7229E1qPSZSZgLNP+ezLk6oteH5tCODFBN8mkDysGaIVKZcl1LWFLo0WrQ/tUi/vqyW+MMNiKywwCN2AgYGEqngL+FZHk5qPbe4S4tMhjg2ZuHxm14ZDYZppXwOw+/Ii8+c7HI2aBNzbknj1Zu9IBTFGbvR+xXeckFnt7lHMlGT0CCCl9qbDhJEpLpFQiJ7yR5N9Kn5lWpkQYsklBwydwUdKy3k0JgjyOzL91RZY8rFZlJ/XWf76gKOFdHdJsh0xAqU97GvjW45Vq3OrTeFlhBOjJs6hWdjGQ3jKkJ1vM0UStoa/5soBrVYACdl7IkOHNsyKWcQalJtdIw0QQUmrFllNMBUHP+QTYiMXkiqmVo0pIJgSEtd/WO1kuPRK2I0/vTxOp6B8J84MKNFKkE/l71BiejUIshXGllfaqBJuZMkYagzb9a1O7OhJVYK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ydWyq5A1VPKocERT2YP2qlFdS9cZj9CgoUg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: A8zuWKQg8S/gfS1Xu6cNDxFVs54lXMhzfl4GlfltctKA3PWdjsyawFHqZUVu8xiYP279P15qvQYH++G1HkZ1FDAwN0NQBFAwcgLr7WFJOmJsUnzf3G4KQNivp90QBz/a4WQM4ph2SpNiRMWgESyqoM7aJSEkmrPRF1RCAcVg2KIQ4dcjgneqzG0WWUtj2r153aZwgSTPHBA7nV1JkKYXWNNrfRAijm2h3eFbumyOHol4yPDMePsjWrg5DXRbH+OdcmAXjL4QGt0CO/xQX1buBluPi7c32eQPyOuSzy7kRRSPFtHa9zum7VLL7gjg+u4ZPhV4GBOfnMKhYT7QKxh2Nx/cSXqwvrhyR0nPl4oEC3iiMFrmdW/4pXH+1t8oTHnkpEzpm/iC9tj5yQkvxTnK7IGN8CVaezkM1KgIXH6+NMKKTOt1is6n6EqwS2mhyA5rCSoYmZyhxshMw4qtVkEmbC9peoXHKg02XluaNsigbrp0jndJHXMCIsafmhJrbnYD6FwQh42YE6HaGRpqVIGTETWg6HnghrfoLaIIjm3A+rxweYlmEh7mFnJUY4LnPKutO1UFEruXaytUnsW2YYZUZT4KGPfJ55ANOXQiKhlOaIg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcc7d387-7b34-4fca-2056-08dc7bce57b9 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2024 08:48:54.5943 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7fK5RdlqZaoc4klqV+c5Ljnb9u8gWiAjC7CI19y8UPLYTb+TrHhffsc2PB1Vl6o+Kvz5mxhpJJngve3yxZRaPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4357 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-24_02,2024-05-23_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405240060 X-Proofpoint-ORIG-GUID: T0hCwOOfID4S9CebKGaitMnRszBdDReh X-Proofpoint-GUID: T0hCwOOfID4S9CebKGaitMnRszBdDReh When calling bsg_setup_queue() -> blk_mq_alloc_queue(), we don't pass the dev as the queuedata, but rather manually set it afterwards. Just pass dev to blk_mq_alloc_queue() to have automatically set. Signed-off-by: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index ee738d129a9f..32da4a4429ce 100644 --- a/block/bsg-lib.c +++ b/block/bsg-lib.c @@ -385,13 +385,12 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name, if (blk_mq_alloc_tag_set(set)) goto out_tag_set; - q = blk_mq_alloc_queue(set, lim, NULL); + q = blk_mq_alloc_queue(set, lim, dev); if (IS_ERR(q)) { ret = PTR_ERR(q); goto out_queue; } - q->queuedata = dev; blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); bset->bd = bsg_register_queue(q, dev, name, bsg_transport_sg_io_fn);