From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH v2 2/5] vfio-ccw: concurrent I/O handling Date: Mon, 28 Jan 2019 18:31:24 +0100 Message-ID: <20190128183124.3d73ac6e.cohuck@redhat.com> References: <20190121110354.2247-1-cohuck@redhat.com> <20190121110354.2247-3-cohuck@redhat.com> <2dac6201-9e71-b188-0385-d09d05071a1c@linux.ibm.com> <5627cb78-22b3-0557-7972-256bc9560d86@linux.ibm.com> <20190125112437.2c06fac6.cohuck@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-s390@vger.kernel.org, Alex Williamson , Pierre Morel , kvm@vger.kernel.org, Farhan Ali , qemu-devel@nongnu.org, Halil Pasic , qemu-s390x@nongnu.org To: Eric Farman Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel2=m.gmane.org@nongnu.org Sender: "Qemu-devel" List-Id: kvm.vger.kernel.org On Fri, 25 Jan 2019 15:22:56 -0500 Eric Farman wrote: > If we come into mdev_write with state=BUSY and we get the lock, > copy_from_user, and do our jump table we go to fsm_io_busy to set > ret_code and return -EAGAIN. Why then don't we set the jump table for > state=NOT_OPER||STANDBY to do something that will return -EACCES instead > of how we currently do a direct return of -EACCES before all the > lock/copy stuff (and the jump table that would take us to fsm_io_error > and an error message before returning -EIO)? If you phrase it like that, I'm wondering why we're not already doing it that way :) We just need to make sure to revert to the previous state on error instead of IDLE.