From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: missing compat-ioctl for CDROM_DRIVE_STATUS + FDGETPRM Date: Wed, 29 Jun 2011 14:30:42 +0200 Message-ID: <201106291430.43102.arnd@arndb.de> References: <20110617090424.GA19345@sig21.net> <201106171502.39445.arnd@arndb.de> <20110629113834.GA4227@sig21.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Johannes Stezenbach Return-path: In-Reply-To: <20110629113834.GA4227@sig21.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wednesday 29 June 2011, Johannes Stezenbach wrote: > Sorry for very slow reply. I think qemu's use of these ioctls > to probe if the device is a cdrom or floppy is valid, so instead > of adding a stat() call to check for block device in qemu, I think > it is better to silence the warning in the kernel. Well, correct or not, it will keep causing annoying messages on old kernels, so why not do both? > Do I get it right that just adding two IGNORE_IOCTL() to > the ioctl_pointer array in linux/fs/compat_ioctl.c is sufficient, > like in commit 3f001711? Yes. > I.e. these ioctls are handled for block devices earlier > in compat_sys_ioctl()? Right. We always first ask the driver, and then search the lookup table when the driver does not know how to handle it in compat mode. Arnd