From patchwork Wed Feb 1 18:20:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9550515 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 ADDD460425 for ; Wed, 1 Feb 2017 18:21:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FC6A28425 for ; Wed, 1 Feb 2017 18:21:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9429F28451; Wed, 1 Feb 2017 18:21:11 +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 9F32428425 for ; Wed, 1 Feb 2017 18:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753508AbdBASVI (ORCPT ); Wed, 1 Feb 2017 13:21:08 -0500 Received: from mail-bl2nam02on0070.outbound.protection.outlook.com ([104.47.38.70]:57001 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751632AbdBASVG (ORCPT ); Wed, 1 Feb 2017 13:21:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Q2/9tMtXzwIZbPMqzn5upQUSRTJynr1A1tASB6G3ACY=; b=AjLxEIHtd8qDcmSeGoqPqucAORkmHBRmJLqnlpzbXWFAyp4BTd+9c3ow+K5L4Sph77cH64WghwHl6VHniUw1/XpjjGV5fofxqIZgVXNbZJkRen1DEBgWS7PjBhU8RTuW5xmQp/J1YZDyRuXv0wgL2jkeQhYKblx/HGrs2mQmbyA= Received: from BY2PR02CA0001.namprd02.prod.outlook.com (10.163.44.139) by BY2PR02MB1410.namprd02.prod.outlook.com (10.162.80.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Wed, 1 Feb 2017 18:21:04 +0000 Received: from BY2FFO11OLC006.protection.gbl (2a01:111:f400:7c0c::134) by BY2PR02CA0001.outlook.office365.com (2a01:111:e400:5261::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Wed, 1 Feb 2017 18:21:04 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; kernel.dk; dkim=none (message not signed) header.d=none;kernel.dk; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11OLC006.mail.protection.outlook.com (10.1.14.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2 via Frontend Transport; Wed, 1 Feb 2017 18:21:04 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id D4.CB.65426.D2422985; Wed, 1 Feb 2017 10:08:45 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Wed, 1 Feb 2017 10:21:01 -0800 X-AuditID: 0ac94369-b62949800001ff92-ed-5892242d1230 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 01.FF.09762.C0722985; Wed, 1 Feb 2017 10:21:00 -0800 (PST) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , Omar Sandoval Subject: [PATCH 3/4] blk-mq-debug: Make show() operations interruptible Date: Wed, 1 Feb 2017 10:20:58 -0800 Message-ID: <20170201182059.25601-4-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170201182059.25601-1-bart.vanassche@sandisk.com> References: <20170201182059.25601-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBLMWRmVeSWpSXmKPExsXCddJ5ka6uyqQIgzfnDSxW3+1ns9h7S9vi 8L2rLA7MHhOb37F7XD5b6vF5k1wAcxSXTUpqTmZZapG+XQJXRtej8IIbIhWtvX+YGhgbBLsY OTkkBEwk7nxrY+ti5OIQEljKJPHr8wR2CGcro8TCxn5GmKrLS49BJTYzSsyeuJ8ZJMEmYCTx 7f1MFhBbREBBouf3SqBRHBzMAoUSsxcFgISFBdwlrn2DmMMioCJx9+1FdhCbV8BeYuaxW1Dz 5SV2tV1kBbE5BRwkPi3cwgZiCwHVvO78yQxR84lFomGfGkSvoMTJmU/A1jILSEgcfPGCGaJe XeLkkvlMExiFZiEpm4WkbAEj0ypGsdzMnOLc9NQCQ1O94sS8lMzibL3k/NxNjJDwzdzBePeJ 9yFGAQ5GJR5eAZFJEUKsiWXFlbmHGCU4mJVEeI3UgEK8KYmVValF+fFFpTmpxYcYpTlYlMR5 X73qjxASSE8sSc1OTS1ILYLJMnFwSjUw7mgX7MqR3yicufelTLCP8YdKT56PDc88Uh7nRHsH 6XREbJb/66qzMNNj6awLN361LjToPrKtwnJSzp3tVm4VNy6v7HC3PBgt+nRmAJvF3+7JEcy+ xvn6W/efKb45uyuao251ZJPLqz8m7klCZw/7rekUa3og4r9iRXPo6gbHzLa8w0Ya9+cpsRRn JBpqMRcVJwIAalB9qFsCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJJMWRmVeSWpSXmKPExsXCtZEjRZdHfVKEwerz5har7/azWRz82cZo sfeWtsXhe1dZHFg8Jja/Y/e4fLbUY9qa80wenzfJBbBEcdmkpOZklqUW6dslcGV0PQovuCFS 0dr7h6mBsUGwi5GTQ0LAROLy0mPsXYxcHEICGxklVt1ayQaSYBMwkvj2fiYLiC0ioCDR8xsi zixQKNH0tpsZxBYWcJe49q2fEcRmEVCVeH+4jR3E5hWwl+h9+ooNYoG8xK62i6wgNqeAg8Sn hVvA4kJANa87fzJPYORewMiwilEsNzOnODc9s8DQSK84MS8lszhbLzk/dxMj2POcUTsYr080 P8TIxMEp1cCYsODgTqlgthS1xuDrzyJnRkgLHhMvKMmzslH2nuonzZsz4cKbC33f9vUGTbBl cp9YfG3bglhluZkSmYbmabyxHy5FtmuGrWnk4ne8pVG5ocHy6Wq/VD6bRfOn566SPfrxyv/p WZfK3v7PeP1lwpm4/7zlpgciP7zvO//24tbztmfl2i7Vx4YpsRRnJBpqMRcVJwIAR8XdDKwB AAA= MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39840400002)(39450400003)(39850400002)(39410400002)(39860400002)(2980300002)(438002)(189002)(199003)(189998001)(50986999)(33646002)(230783001)(76176999)(97736004)(305945005)(106466001)(50226002)(8936002)(81166006)(36756003)(69596002)(81156014)(626004)(8676002)(5660300001)(86362001)(68736007)(48376002)(2906002)(2270400002)(5003940100001)(92566002)(77096006)(356003)(6916009)(1076002)(53936002)(50466002)(54906002)(47776003)(110136003)(38730400001)(4326007)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1410; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC006; 1:r8tFYf5TZgkz+Oj5p6V6CE8egodqYdPugDRQD02GycQivNKoSklaQDYAzbiQkjdRgfGO2e/npBsOx2pHhjMyUrGaj3PVc8UAyy7R7HWsM+kQaAdql9IBQsYTXtoFR9B5P7j8NXN5jV838OlAr4aFgWbBZPQ3QM8XmPnrsYoSNgh5+VboOd6s6qUe0QiZ84KMqOVTpxAU5p1KhG3SWzo/RXHgQdYLf7Q6LpG74DpvASBPFQmVwn82YLek/VNnNV69TzAUrMdBy12yAVmqRSmUx5fEyN13h8T/ZnvQxS7qt6eOGsyRG7bXsF2w90SXlAePElhwPBPGACZ3//pCaLf1+SXJNJnq78yFldggiPwS/7vyUFooCkJoVnGfZZnxPkfDYKXCecs1LAw06tLHv2rsGLauc4oLhQOo7g1ZTSfaUcaFU4s0OnRF9XJgU5dMSezZm0PUvqBuK+Cg1HtJK5DeIw== X-MS-Office365-Filtering-Correlation-Id: a2d21f0d-8038-47c0-a77d-08d44acf1566 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BY2PR02MB1410; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1410; 3:TLp+g0+DF9DnMVrlepvI7EhNZdEDNwFvuPK0feDrrT7U9HQpEuB3IcgLxVV8+VCnAmtdA9fY+Zhs9FSJNlT4lMTfFNG1/l55jbVuOCvP3yb+r3RJj7NWErvHoTJ/ZzGUGYPsRKbfPpIWuGnX/eoavxzJXQYHxttWlsKc4z8VEFWFAFBRdtNKansQ/k5VZ61bTOsnBL5YusSpX9baXgzrZ7CZ0ku4Q/63eUjVWlEeVamTwXxoNvgZbi1kc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JkXqpV8vzjACb3sIt4bw5weHAM1YG937L89jk3iB34iQH3OWx8Gy1aRTfNte2n4CuGPn4HzKy4NoXNgV6jzPkQo8SgJzl7mcjVfOJEaet7kzCM2ZDYisykYV+bOoeloww8XXHCIDF+RLyRMgmFwFdFSD7iBPTxn+xmze4soNd2oiC8mKkWK+Iyrw0eWL+/9zrdU5wzL0HHWZcK6CPVZZbF6n4Pp6UWYP57gEzrJLZ5Gw2Gy1Rx0PJPPxJRWJ5bBodtTpJsD+sczNyj7l9ZUViqBboSflXQfT0B6XDfXdOj7jzNv/mQvyT07VEZxqTDtw7ZTo64c/pntnaZlVeEBY00+s2nCPWPi12HMlBdI/eRMQS8cKS3QHKJ00LaChEmOpcTAnBLk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(20161123558025)(6072148); SRVR:BY2PR02MB1410; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB1410; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1410; 4:RxQDWD6tFLlj7avF0kCLudgloG4WH3Xi0yEzaxX2uFJIWAIJj03JcRiVFSaRKXpYUUANJCuPf7LqEHGNCNsFoSL8IBvbQFNNmUvlkJCdf3gTuVNQ2K9NWKxHb68M0VWehtWbYUPD4P1scDLWsPuOi5hLeXRSnpayhZJYQOTNPYwXe05UmCcxleAAQwLy8+BtzqK1ukNUMpIF5YKHNTabet8JyOpx/ORPULe1rJOV2QZW2ISK1H5cpm7YK88EnJQMge2A+LVVyyz8qJ4kvTsVj5PtM18cFHncoEsWRD3JJOmlDpE+ZGjZDqjNNOC2rbxp5xjIxrEXtmhz4QBK4Q97cD1mNB/yOPQl5GHM6+3nHt2QU206r29KE00aqrJGGP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Meh9R7ZrjrwbKiulixmxvBYKCRXAZZezVghy5gGd3rID/yQxUXGjROjpsPNjKTUenpjHpFw+7OyKQDrXpFOg6Qkx3YQstbHubzRu8QIZtFVOQ8D X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2017 18:21:04.3505 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB1410 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 Allow users to interrupt show operations instead of making a user space process unkillable if ownership of q->sysfs_lock cannot be obtained. Signed-off-by: Bart Van Assche Cc: Omar Sandoval Reviewed-by: Omar Sandoval --- block/blk-mq-debugfs.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index aece9116b4f6..846943728939 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -179,13 +179,17 @@ static int hctx_tags_show(struct seq_file *m, void *v) { struct blk_mq_hw_ctx *hctx = m->private; struct request_queue *q = hctx->queue; + int res; - mutex_lock(&q->sysfs_lock); + res = mutex_lock_interruptible(&q->sysfs_lock); + if (res) + goto out; if (hctx->tags) blk_mq_debugfs_tags_show(m, hctx->tags); mutex_unlock(&q->sysfs_lock); - return 0; +out: + return res; } static int hctx_tags_open(struct inode *inode, struct file *file) @@ -204,12 +208,17 @@ static int hctx_tags_bitmap_show(struct seq_file *m, void *v) { struct blk_mq_hw_ctx *hctx = m->private; struct request_queue *q = hctx->queue; + int res; - mutex_lock(&q->sysfs_lock); + res = mutex_lock_interruptible(&q->sysfs_lock); + if (res) + goto out; if (hctx->tags) sbitmap_bitmap_show(&hctx->tags->bitmap_tags.sb, m); mutex_unlock(&q->sysfs_lock); - return 0; + +out: + return res; } static int hctx_tags_bitmap_open(struct inode *inode, struct file *file) @@ -228,13 +237,17 @@ static int hctx_sched_tags_show(struct seq_file *m, void *v) { struct blk_mq_hw_ctx *hctx = m->private; struct request_queue *q = hctx->queue; + int res; - mutex_lock(&q->sysfs_lock); + res = mutex_lock_interruptible(&q->sysfs_lock); + if (res) + goto out; if (hctx->sched_tags) blk_mq_debugfs_tags_show(m, hctx->sched_tags); mutex_unlock(&q->sysfs_lock); - return 0; +out: + return res; } static int hctx_sched_tags_open(struct inode *inode, struct file *file) @@ -253,12 +266,17 @@ static int hctx_sched_tags_bitmap_show(struct seq_file *m, void *v) { struct blk_mq_hw_ctx *hctx = m->private; struct request_queue *q = hctx->queue; + int res; - mutex_lock(&q->sysfs_lock); + res = mutex_lock_interruptible(&q->sysfs_lock); + if (res) + goto out; if (hctx->sched_tags) sbitmap_bitmap_show(&hctx->sched_tags->bitmap_tags.sb, m); mutex_unlock(&q->sysfs_lock); - return 0; + +out: + return res; } static int hctx_sched_tags_bitmap_open(struct inode *inode, struct file *file)