public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Stefan Haberland <sth@linux.ibm.com>
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
Date: Fri, 8 May 2020 17:53:06 +0200	[thread overview]
Message-ID: <20200508155306.GB4200@lst.de> (raw)
In-Reply-To: <20200508131455.55407-3-sth@linux.ibm.com>

On Fri, May 08, 2020 at 03:14:54PM +0200, Stefan Haberland wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> 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 <hch@lst.de>
> [sth@linux.ibm.com: remove fop, add gendisk check, export funcion]
> Signed-off-by: Stefan Haberland <sth@linux.ibm.com>

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.

  reply	other threads:[~2020-05-08 15:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 13:14 [PATCH v3 0/3] s390/dasd: remove ioctl_by_bdev from DASD driver Stefan Haberland
2020-05-08 13:14 ` [PATCH v3 1/3] dasd: refactor dasd_ioctl_information Stefan Haberland
2020-05-08 13:14 ` [PATCH v3 2/3] block: add a s390-only biodasdinfo method Stefan Haberland
2020-05-08 15:53   ` Christoph Hellwig [this message]
2020-05-08 13:14 ` [PATCH v3 3/3] s390/dasd: remove ioctl_by_bdev calls Stefan Haberland
2020-05-08 15:53   ` Christoph Hellwig
2020-05-11 16:30     ` Stefan Haberland
2020-05-16 15:43       ` Christoph Hellwig
2020-05-18  8:13         ` Stefan Haberland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200508155306.GB4200@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hoeppner@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sth@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox