From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: IBM request to allow unprivledged ioctls [Was: Revert "dm mpath: fix stalls when handling invalid ioctls"] Date: Mon, 2 Nov 2015 10:49:43 -0500 Message-ID: <20151102154942.GA23816@redhat.com> References: <5634DF67.7060302@redhat.com> <20151031181312.GA11587@redhat.com> <5635115B.7080805@redhat.com> <20151031224707.GA12805@redhat.com> <56371095.6020400@suse.de> <20151102133119.GA23234@redhat.com> <56376B8C.5010001@suse.de> <563778B9.7060900@redhat.com> <20151102150527.GA23665@redhat.com> <56378505.6080601@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41363 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754024AbbKBPto (ORCPT ); Mon, 2 Nov 2015 10:49:44 -0500 Content-Disposition: inline In-Reply-To: <56378505.6080601@redhat.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Paolo Bonzini Cc: Hannes Reinecke , hch@lst.de, Mauricio Faria de Oliveira , dm-devel@redhat.com, linux-scsi@vger.kernel.org, Peter Rajnoha On Mon, Nov 02 2015 at 10:45am -0500, Paolo Bonzini wrote: > > > On 02/11/2015 16:05, Mike Snitzer wrote: > > > In any case, if we don't start path activation we should return > > > ENOTCONN, not ENOTTY. > > > > Currently, if we don't start path activation we're returning EIO. > > ENOTCONN is used for when we do start path activation (and ENOTCONN is > > the means for DM core to retry) > > > > We _could_ change the ENOTCONN to be EAGAIN and EIO to ENOTCONN... > > This makes sense... though of course testing the impact of this on > userspace is going to be hard. :( Chances are that userspace is not > expecting EAGAIN either. > > Even if they did, how would someone know that they can now retry the > ioctl after getting EAGAIN? Should they just do it in a loop? Turns out multipath (userspace) has a udev rule for this now (prajnoha pointed this out): http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=blob;f=multipath/11-dm-mpath.rules So now I'm wondering if we _need_ to do any retries in kernel (aside from while activation is active)?