Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752663AbbH2Nwb (ORCPT ); Sat, 29 Aug 2015 09:52:31 -0400 Received: from verein.lst.de ([213.95.11.211]:53088 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbbH2Nw1 (ORCPT ); Sat, 29 Aug 2015 09:52:27 -0400 Date: Sat, 29 Aug 2015 15:52:25 +0200 From: Christoph Hellwig To: Jeremy Linton Cc: Christoph Hellwig , Jens Axboe , linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, dm-devel@redhat.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Persistent Reservation API V3 Message-ID: <20150829135225.GB13103@lst.de> References: <1440608214-14497-1-git-send-email-hch@lst.de> <55E10BE4.6080400@tributary.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55E10BE4.6080400@tributary.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1786 Lines: 34 On Fri, Aug 28, 2015 at 08:33:24PM -0500, Jeremy Linton wrote: > Hello, > So, looking at this, I don't see how it supports the algorithm I've been using > for years. For that algorithm to successfully migrate PRs across multiple paths > on a single machine without affecting other possible users (who may legitimately > have PR'ed the same device) I need PR_IN SA 1, READ RESERVATIONS to assure the > current node owns the reservation before attempting to preempt it on another > path. This can also assure that the device hasn't been reserved with a legacy > reservation. Do you have any code describing this in more detail? We could add the read side as well if there is strong interest. > So, this leads me to two more general questions. The first is why isn't the PR > API simply exported to filesystems as a general reserve/release so that the PR > happens during mount/dismount. Then DM and friends can be setup to transparently > migrate or share the reservation, rather than depending on userspace to handle > these operations... The API can be used by file systems, and my upcoming NFS SCSI layout support was the main reason to write this. > Also, it seems to me the use of CLEAR is extremely dangerous in any environment > where actual arbitration or sharing of the resource is taking place. Yes, but having it as a specific API isn't any less dangerous than having it issued using SG_IO. Reservations really only make sense if you assume every user of a LU is actually cooperating in some way and not actively hostile. -- 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/