Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753996AbbHDSGC (ORCPT ); Tue, 4 Aug 2015 14:06:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52062 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753102AbbHDSGA (ORCPT ); Tue, 4 Aug 2015 14:06:00 -0400 Date: Tue, 4 Aug 2015 14:05:59 -0400 From: Mike Snitzer To: Christoph Hellwig Cc: Jens Axboe , linux-api@vger.kernel.org, dm-devel@redhat.com, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/6] dm: split out a helper to find the ioctl target Message-ID: <20150804180558.GB28971@redhat.com> References: <1438672271-11309-1-git-send-email-hch@lst.de> <1438672271-11309-6-git-send-email-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438672271-11309-6-git-send-email-hch@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1361 Lines: 36 On Tue, Aug 04 2015 at 3:11am -0400, Christoph Hellwig wrote: > We want to reuse this code for the persistent reservation handling, > so move it into a helper. > > Signed-off-by: Christoph Hellwig > --- > 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/