From patchwork Sat Jul 16 18:10:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Snitzer X-Patchwork-Id: 9233349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4CC2360574 for ; Sat, 16 Jul 2016 18:10:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38E9421C9A for ; Sat, 16 Jul 2016 18:10:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C627223A0; Sat, 16 Jul 2016 18:10:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A514E212F2 for ; Sat, 16 Jul 2016 18:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668AbcGPSKK (ORCPT ); Sat, 16 Jul 2016 14:10:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40704 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751629AbcGPSKJ (ORCPT ); Sat, 16 Jul 2016 14:10:09 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1284763308; Sat, 16 Jul 2016 18:10:09 +0000 (UTC) Received: from localhost (dhcp-25-149.bos.redhat.com [10.18.25.149]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6GIA7JZ017018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Sat, 16 Jul 2016 14:10:08 -0400 Date: Sat, 16 Jul 2016 14:10:07 -0400 From: Mike Snitzer To: Christoph Hellwig Cc: "Martin K. Petersen" , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-scsi@vger.kernel.org Subject: Re: PR API fixes for multipathing Message-ID: <20160716181007.GA14215@redhat.com> References: <1467980631-18945-1-git-send-email-hch@lst.de> <20160716010844.GA29087@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160716010844.GA29087@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 16 Jul 2016 18:10:09 +0000 (UTC) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jul 15 2016 at 9:08pm -0400, Christoph Hellwig wrote: > On Fri, Jul 15, 2016 at 03:03:54PM -0400, Martin K. Petersen wrote: > > >>>>> "Christoph" == Christoph Hellwig writes: > > > > Christoph> I was a bit overeager to thing ALL_TG_PT would solve all our > > Christoph> multipathing woes in respect to persistent reservation. > > Christoph> Turns out that there are lots of possible setups where it > > Christoph> doesn't work, and we'll have to ask device mapper to register > > Christoph> all underlying devices instead. > > > > Should I queue the sd patch or let Mike take both through the DM tree? > > I think having both in the same tree would be very useful. I don't care > which one that is. I've picked both of them up. Staged for 4.8 merge and in linux-next via linux-dm.git's 'for-next'. (I added Martin's Acked-by to the sd patch header, Martin: if not OK, or if you'd prefer Reviewed-by just let me know) Christoph, I had to fix this: drivers/md/dm.c:2564:12: warning: context imbalance in 'dm_call_pr' - different lock contexts for basic block here is the incremental I folded in to the dm patch: Mike Reviewed-by: Christoph Hellwig --- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 214fa03..4dca5a7 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2567,14 +2567,13 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn, struct mapped_device *md = bdev->bd_disk->private_data; struct dm_table *table; struct dm_target *ti; - int ret = 0, srcu_idx; + int ret = -ENOTTY, srcu_idx; table = dm_get_live_table(md, &srcu_idx); if (!table || !dm_table_get_size(table)) - return -ENOTTY; + goto out; /* We only support devices that have a single target */ - ret = -ENOTTY; if (dm_table_get_num_targets(table) != 1) goto out; ti = dm_table_get_target(table, 0); @@ -2584,10 +2583,6 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn, goto out; ret = ti->type->iterate_devices(ti, fn, data); - if (ret) - goto out; - - ret = 0; out: dm_put_live_table(md, srcu_idx); return ret;