Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp167071ybj; Fri, 8 May 2020 08:54:55 -0700 (PDT) X-Google-Smtp-Source: APiQypJvXepXJ7fg2nqSsVVwOyXuFqBJO7VzDZ6sB8jhBkDkbH0HtaKhwhriPsJ7YpatirNdYxcb X-Received: by 2002:a50:eaca:: with SMTP id u10mr2653410edp.249.1588953295386; Fri, 08 May 2020 08:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588953295; cv=none; d=google.com; s=arc-20160816; b=jBSg7hk582VbXU+kgHgrgfnt+0uS6ZNg8H2+fnIjvSD7zz5iCk6C953OFYKoT3djd2 hj6aPU6flA1c6wI8qbG5SU9O52q/7Qo4jrbYan6uMQMxdb7ELtHfvf9E7AobVZM9wljo S3h737iTstLHqCJ8iNRV+cVE8MhekVlUopXRZ4RIpxVPk+yUkPvGXKjbSHMisSz6PGq3 uz+J3nMLtQ88cZEX4apy8nhFyTUZA64oHGCwGBI5QACei1JlRNqXadpXfytKXBMy/b7n LCiKuzHS++KojQEvguz81xE9OXEvx0Evt7NeY4+PGEmux5wNQm5B0Uaurh3JH4Dpsjq/ T3eA== 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=XLJaUjpAnVXdlN360ksrhsKsMQLGiahaiL9uYujeUQI=; b=IGOiRWe+oacx7BIWXl5ubBhrlfdqZduV//yJRn3zaj6zOlCXsGjutDlrgVnJzDJARx mQJaUZML+iUtPJipusgSLVXTOgvOZ80i2QSmC0r4LHM+7OdBZfKlCBcxncPvqSA/R2/0 yQS36+l5S3cGyl+lKS5kVhyw2PQiP1Uy7cxwXNm+NIWss+Hb8W8Re2RWBZ+sc75Mll1t sT6ehLNcQhjk4jXanX27EusYxWlrxJPAzHmo8Nsp974gl4dNMkWJfXI+2nTxqzIoJVep zs7ckuGxsH2n/0VXaFetTPcgxxC3ixi+ltKil+7BT/vsKEKpQq3JyOeUFMQ7l8FybNYA 0ifg== 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 l23si1021168ejc.135.2020.05.08.08.54.32; Fri, 08 May 2020 08:54:55 -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 S1727860AbgEHPxJ (ORCPT + 99 others); Fri, 8 May 2020 11:53:09 -0400 Received: from verein.lst.de ([213.95.11.211]:53335 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbgEHPxJ (ORCPT ); Fri, 8 May 2020 11:53:09 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 804DA68C7B; Fri, 8 May 2020 17:53:06 +0200 (CEST) Date: Fri, 8 May 2020 17:53:06 +0200 From: Christoph Hellwig To: Stefan Haberland Cc: hch@lst.de, axboe@kernel.dk, hoeppner@linux.ibm.com, linux-s390@vger.kernel.org, heiko.carstens@de.ibm.com, gor@linux.ibm.com, linux-kernel@vger.kernel.org, borntraeger@de.ibm.com Subject: Re: [PATCH v3 2/3] block: add a s390-only biodasdinfo method Message-ID: <20200508155306.GB4200@lst.de> References: <20200508131455.55407-1-sth@linux.ibm.com> <20200508131455.55407-3-sth@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508131455.55407-3-sth@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 Fri, May 08, 2020 at 03:14:54PM +0200, Stefan Haberland wrote: > From: Christoph Hellwig > > The IBM partition parser needs to query the DASD driver for details that > are very s390 specific. Instead of using ioctl_by_bdev with a fake user > space pointer just add a s390-specific method to get the information > directly. > > Signed-off-by: Christoph Hellwig > [sth@linux.ibm.com: remove fop, add gendisk check, export funcion] > Signed-off-by: Stefan Haberland The subject and changelog need updates for your changes. I think you should also claim authorship, even if a few bits are originally from me. Probaby it would make sense to even just merge this into the next patch. > index fa552f9f1666..6eac7b11c75b 100644 > --- a/drivers/s390/block/dasd_int.h > +++ b/drivers/s390/block/dasd_int.h > @@ -845,6 +845,7 @@ void dasd_destroy_partitions(struct dasd_block *); > > /* externals in dasd_ioctl.c */ > int dasd_ioctl(struct block_device *, fmode_t, unsigned int, unsigned long); > +int dasd_biodasdinfo(struct gendisk *disk, struct dasd_information2_t *info); I think this needs to go to a public include/linux/ header for the partitioning code to share the prototype. > +int dasd_biodasdinfo(struct gendisk *disk, struct dasd_information2_t *info) > +{ > + struct dasd_device *base; > + int error; > + > + /* > + * we might get called externaly, so check if the gendisk belongs > + * to a DASD by checking the fops pointer > + */ > + if (disk->fops != &dasd_device_operations) > + return -EINVAL; I think a function comment (e.g. kernel doc) explaining the use case and this detail might be useful.