From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTWz1-0006pP-C7 for qemu-devel@nongnu.org; Mon, 06 Jun 2011 06:24:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTWz0-000404-EY for qemu-devel@nongnu.org; Mon, 06 Jun 2011 06:24:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTWz0-0003zu-2s for qemu-devel@nongnu.org; Mon, 06 Jun 2011 06:24:30 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p56AORTn025838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 6 Jun 2011 06:24:27 -0400 Message-ID: <4DECAAD9.6050304@redhat.com> Date: Mon, 06 Jun 2011 12:24:25 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1306834530-12763-1-git-send-email-hdegoede@redhat.com> <1306834530-12763-8-git-send-email-hdegoede@redhat.com> <4DE63176.7040108@redhat.com> <4DE64EA9.2040305@redhat.com> In-Reply-To: <4DE64EA9.2040305@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/14] usb-linux: If opening a device fails remove it from our filter list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: qemu-devel@nongnu.org On 06/01/11 16:37, Hans de Goede wrote: > Hi, > > On 06/01/2011 02:32 PM, Gerd Hoffmann wrote: >> On 05/31/11 11:35, Hans de Goede wrote: >>> So that we don't retry to open it every 2 seconds flooding stderr with >>> error messages. >> >> The polling here is done intentionally, so the devices catched by the >> filter show up in the guest automagically as soon as they are plugged >> in. Just zapping the filter on failure isn't the right thing to do here. > > Note I'm zapping the filter when we fail to open the device, not when it > is not present. This can happen for example when the qemu user does not > have rights on the usbfs device node. > > It seems better to me to print the relevant error once, and then require > the user to redo the usb_add / device_add if necessary, then to flood > the monitor with repeating the same error every 2 seconds. Devices magically disappearing is a problem for the management stack (such as libvirt) though. qemu does stuff like that in too many places already and we are trying to get rid of it. Flooding the monitor (or stderr) indeed isn't nice though. cheers, Gerd