On Mon, 05 Mar 2012 21:29:59 -0800 "H. Peter Anvin" <hpa@xxxxxxxxx> wrote: > On 03/05/2012 06:27 PM, NeilBrown wrote: > > > > So it is still called fsync_bdev and invalidate_bdev as long as the > > ioctl function for the underlying disk returns -EINVAL or -ENOTTY. > > > > The function that shows that warning is scsi_verify_blk_ioctl in > > block/scsi_ioctl.c The worst it can do is return -ENOTTY, and that > > is safe. > > > > So the warning is bogus, the code still works. > > > > We should whitelist ioctls if they are legitimately used and harmless. > Do we have a specific list? > > -hpa > > We had the following in our SLES kernel for a while, though it seems it disappeared when we pulled in 3.0.18. Jan: should we put this stuff back? NeilBrown @@ -78,11 +83,19 @@ Index: linux-3.0-SLE11-SP2/block/scsi_ioctl.c + case SG_GET_RESERVED_SIZE: + case SG_SET_RESERVED_SIZE: + case SG_EMULATED_HOST: ++ case BLKFLSBUF: ++ case BLKROSET: + return 0; + case CDROM_GET_CAPABILITY: -+ /* Keep this until we remove the printk below. udev sends it -+ * and we do not want to spam dmesg about it. CD-ROMs do -+ * not have partitions, so we get here only for disks. ++ case CDROM_DRIVE_STATUS: ++ case FDGETPRM: ++ case RAID_VERSION: ++ case MTIOCGET: ++#ifdef CONFIG_COMPAT ++ case 0x801c6d02: /* MTIOCGET32 */ ++#endif ++ /* Keep this until we remove the printk below. udev/dd sends ++ * these and we do not want to spam dmesg about it. CD-ROMs ++ * & tapes do not have partitions, so we get here only for ++ * disks. + */ + return -ENOTTY; + default:
Attachment:
signature.asc
Description: PGP signature