Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1200197

Re: [PATCH 5/6] dm: split out a helper to find the ioctl target

From Mike Snitzer <snitzer@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/6] dm: split out a helper to find the ioctl target
Date 2015-08-04 20:10 +0200
Message-ID <pTOP0-1jD-11@gated-at.bofh.it> (permalink)
References <pTEFX-3t9-1@gated-at.bofh.it> <pTEFX-3t9-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 04 2015 at  3:11am -0400,
Christoph Hellwig <hch@lst.de> wrote:

> We want to reuse this code for the persistent reservation handling,
> so move it into a helper.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/md/dm.c | 50 ++++++++++++++++++++++++++++++++------------------
>  1 file changed, 32 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index c68eb91..8dfc760 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -556,18 +556,16 @@ static int dm_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
>  	return dm_get_geometry(md, geo);
>  }
>  
> -static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
> -			unsigned int cmd, unsigned long arg)
> +static int dm_get_ioctl_table(struct mapped_device *md,
> +		struct dm_target **tgt, struct block_device **bdev,
> +		fmode_t *mode, int *srcu_idx)

Would prefer to see something like:

static int dm_get_live_table_for_ioctl(struct mapped_device *md, int *srcu_idx,
	     struct dm_target **tgt, struct block_device **bdev, fmode_t *mode)

Otherwise, looks good.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Persistent Reservation API Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
  [PATCH 1/6] block: cleanup blkdev_ioctl Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
    Re: [PATCH 1/6] block: cleanup blkdev_ioctl "Martin K. Petersen" <martin.petersen@oracle.com> - 2015-08-12 02:40 +0200
  [PATCH 6/6] dm: add support for passing through persistent reservations Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
  [PATCH 3/6] sd: implement the persisten reservation API Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
    Re: [PATCH 3/6] sd: implement the persisten reservation API "Martin K. Petersen" <martin.petersen@oracle.com> - 2015-08-12 03:00 +0200
  [PATCH 2/6] block: add a API for persistent reservations Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
    Re: [PATCH 2/6] block: add a API for persistent reservations "Martin K. Petersen" <martin.petersen@oracle.com> - 2015-08-12 02:50 +0200
  [PATCH 5/6] dm: split out a helper to find the ioctl target Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
    Re: [PATCH 5/6] dm: split out a helper to find the ioctl target Mike Snitzer <snitzer@redhat.com> - 2015-08-04 20:10 +0200
      Re: [PATCH 5/6] dm: split out a helper to find the ioctl target Christoph Hellwig <hch@lst.de> - 2015-08-06 15:50 +0200
  [PATCH 4/6] dm: refactor ioctl handling Christoph Hellwig <hch@lst.de> - 2015-08-04 09:20 +0200
    Re: [PATCH 4/6] dm: refactor ioctl handling Mike Snitzer <snitzer@redhat.com> - 2015-08-04 20:00 +0200
      Re: [PATCH 4/6] dm: refactor ioctl handling Christoph Hellwig <hch@lst.de> - 2015-08-06 15:50 +0200
  Re: Persistent Reservation API Mike Snitzer <snitzer@redhat.com> - 2015-08-04 20:00 +0200
    Re: Persistent Reservation API Christoph Hellwig <hch@lst.de> - 2015-08-06 15:50 +0200
  Re: Persistent Reservation API Keith Busch <keith.busch@intel.com> - 2015-08-04 20:10 +0200
    Re: Persistent Reservation API Christoph Hellwig <hch@lst.de> - 2015-08-06 15:50 +0200

csiph-web