From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcCDp-000619-2Q for qemu-devel@nongnu.org; Thu, 30 Jun 2011 04:03:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcCDn-0007uT-3N for qemu-devel@nongnu.org; Thu, 30 Jun 2011 04:03:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcCDm-0007uF-NU for qemu-devel@nongnu.org; Thu, 30 Jun 2011 04:03:34 -0400 Message-ID: <4E0C2E7F.20904@redhat.com> Date: Thu, 30 Jun 2011 10:06:23 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <20110629142517.GA4059@sig21.net> In-Reply-To: <20110629142517.GA4059@sig21.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] block/raw-posix: Linux compat-ioctl warning workaround List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Johannes Stezenbach Cc: Arnd Bergmann , qemu-devel@nongnu.org, kvm@vger.kernel.org Am 29.06.2011 16:25, schrieb Johannes Stezenbach: > On Linux x86_64 host with 32bit userspace, running > qemu or even just "qemu-img create -f qcow2 some.img 1G" > causes a kernel warning: > > ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(00005326){t:'S';sz:0} arg(7fffffff) on some.img > ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28} arg(fff77350) on some.img > > ioctl 00005326 is CDROM_DRIVE_STATUS, > ioctl 801c0204 is FDGETPRM. > > The warning appears because the Linux compat-ioctl handler for these > ioctls only applies to block devices, while qemu also uses the ioctls on > plain files. Work around by calling fstat() the ensure the ioctls are > only used on block devices. > > Signed-off-by: Johannes Stezenbach Thanks, applied to the block branch. Kevin