Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp660680ybj; Tue, 5 May 2020 05:46:07 -0700 (PDT) X-Google-Smtp-Source: APiQypK8Yl+C+8+UwsZSHVDfCDAtO9UXnam3oAy5xd1X4h+kj91rEq94LPCKIA9qQoIW5iDV/eLq X-Received: by 2002:a17:906:454a:: with SMTP id s10mr2496809ejq.141.1588682767012; Tue, 05 May 2020 05:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588682767; cv=none; d=google.com; s=arc-20160816; b=I+Zwvk6sm2A0M77DzNbwXT6j7dGcc98tWPPCRR0WV6VrkCrldlg06vwQhhkAu2u4pA 0ldWOO5fQ4wjBOcPcgq591jiXY8F6YQcuo/mzyLPMhkHjg6hHo1nHGfzJSY7n6D3ApyB dyoFqsMyc/KhQb9/Hrfy5C4e4GXsOTjyvE7R/G8nOg6D9d2cF42IwFSCpj18YVvFzXoG QDioRrTvN6nzobAFU5SG97rqzKCJyKxYVjAT4L5Kp+II1YbxHzs8EnVP2oejmZz/gjxg zhUeGFRo4KhDJAOK/B/ovf0tKSbwwyhAlOQl55CyNT0XBlsxPDDTf03KUgkVKJ7MoQ+m ccmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=x024DkfcyIg+MPJjqxXI1ScoQR8VUiup8pVUJHORBNE=; b=zQDFZk3SKePI9yabn6JjO/UPCorFzOiBFya9g3OPxwc0BiWcNXqHAG27IdYFtdhgq8 GPCFxq/S60eISAL6xWTWma44jg6UWR4A4oN3TE5XRYnVbtnapZc5WdMd/oPgAU9EaBkG tueSLX3kciyrI3KTPFxv8P8Yro9cYxFyqRtpFneMgHkrGTZB115fDLWJENbCv3Gpa30u pcbu6G0CAX5jRSJJUvv5kJrkEAU7ZvNoRmIO8FED17SKI7A6ZrSUytQbbIBrRsZh4zLK VbOmSYOdNSGJkpsbm5IiEDDYcJCZojJxpsxLaEWPO5KDbxu8gLwlSqJNBEMXSgAFFfgL GmfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si1111354eja.72.2020.05.05.05.45.43; Tue, 05 May 2020 05:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728954AbgEEMo0 (ORCPT + 99 others); Tue, 5 May 2020 08:44:26 -0400 Received: from verein.lst.de ([213.95.11.211]:35169 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728497AbgEEMo0 (ORCPT ); Tue, 5 May 2020 08:44:26 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id A5B2068C4E; Tue, 5 May 2020 14:44:23 +0200 (CEST) Date: Tue, 5 May 2020 14:44:23 +0200 From: Christoph Hellwig To: Stefan Haberland Cc: Christoph Hellwig , axboe@kernel.dk, linux-block@vger.kernel.org, hoeppner@linux.ibm.com, linux-s390@vger.kernel.org, heiko.carstens@de.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, linux-kernel@vger.kernel.org, Peter Oberparleiter Subject: Re: [PATCH 1/1] s390/dasd: remove ioctl_by_bdev from DASD driver Message-ID: <20200505124423.GA26313@lst.de> References: <20200430111754.98508-1-sth@linux.ibm.com> <20200430111754.98508-2-sth@linux.ibm.com> <20200430131351.GA24813@lst.de> <4ab11558-9f2b-02ee-d191-c9a5cc38de0f@linux.ibm.com> <70f541fe-a678-8952-0753-32707d21e337@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70f541fe-a678-8952-0753-32707d21e337@linux.ibm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 04, 2020 at 10:45:33AM +0200, Stefan Haberland wrote: > > findthe corresponding device for example. Not sure if this is that easy. > > I did some additional research on this. > What I could imagine: > > The gendisk->private_data pointer currently contains a pointer to > the dasd_devmap structure. This one is also reachable by iterating > over an exported dasd_hashlist. > So I could export the dasd_hashlist symbol, iterate over it and try > to find the dasd_devmap pointer I have from the gendisk->private_data > pointer. > This would ensure that the gendisk belongs to the DASD driver and I > could use the additional information that is somehow reachable through > the gendisk->private_data pointer. > > But again, I am not sure if this additional code and effort is needed. > From my point of view checking the gendisk->major for DASD_MAJOR is > OK to ensure that the device belongs to the DASD driver. With CONFIG_DEBUG_BLOCK_EXT_DEVT you can't rely on major numbers. And compared to all the complications I think the biodasdinfo method is the least of all those evils. Jens, any opinion?