compat_ioctl: ignore RAID_VERSION ioctl
diff mbox series

Message ID 201001302302.10574.arnd@arndb.de
State New, archived
Headers show
Series
  • compat_ioctl: ignore RAID_VERSION ioctl
Related show

Commit Message

Arnd Bergmann Jan. 30, 2010, 10:02 p.m. UTC
md ioctls are now handled by the md driver itself, but mdadm
may call RAID_VERSION on other devices as well. Mark the command
as IGNORE_IOCTL so this fails silently rather than printing
an annoying message.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---

On Saturday 30 January 2010, Michael S. Tsirkin wrote:
> Under 2.6.33-rcX (at least rc5 and rc6, didn't check earlier versions),
> I started seeing these messages in dmesg (I do not see these messages on 2.6.32):
> 
> [   16.528951] ioctl32(mdadm:2243): Unknown cmd fd(3) cmd(800c0910){t:09;sz:12} arg(ffb7f9c4) on /dev/sda9

Does this help?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Comments

Michael S. Tsirkin Jan. 31, 2010, 9:03 a.m. UTC | #1
On Sat, Jan 30, 2010 at 11:02:10PM +0100, Arnd Bergmann wrote:
> md ioctls are now handled by the md driver itself, but mdadm
> may call RAID_VERSION on other devices as well. Mark the command
> as IGNORE_IOCTL so this fails silently rather than printing
> an annoying message.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> 
> On Saturday 30 January 2010, Michael S. Tsirkin wrote:
> > Under 2.6.33-rcX (at least rc5 and rc6, didn't check earlier versions),
> > I started seeing these messages in dmesg (I do not see these messages on 2.6.32):
> > 
> > [   16.528951] ioctl32(mdadm:2243): Unknown cmd fd(3) cmd(800c0910){t:09;sz:12} arg(ffb7f9c4) on /dev/sda9
> 
> Does this help?

Yes, this fixes it.

> --- a/fs/compat_ioctl.c
> +++ b/fs/compat_ioctl.c
> @@ -1038,6 +1038,8 @@ COMPATIBLE_IOCTL(FIOQSIZE)
>  #ifdef CONFIG_BLOCK
>  /* loop */
>  IGNORE_IOCTL(LOOP_CLR_FD)
> +/* md calls this on random blockdevs */
> +IGNORE_IOCTL(RAID_VERSION)
>  /* SG stuff */
>  COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
>  COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Michael S. Tsirkin Feb. 7, 2010, 9:24 a.m. UTC | #2
On Sat, Jan 30, 2010 at 11:02:10PM +0100, Arnd Bergmann wrote:
> md ioctls are now handled by the md driver itself, but mdadm
> may call RAID_VERSION on other devices as well. Mark the command
> as IGNORE_IOCTL so this fails silently rather than printing
> an annoying message.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

The patch does not seem to be there in -rc7.
Since this is fixes a regression, should this go into 2.6.33?
Thanks!

> ---
> 
> On Saturday 30 January 2010, Michael S. Tsirkin wrote:
> > Under 2.6.33-rcX (at least rc5 and rc6, didn't check earlier versions),
> > I started seeing these messages in dmesg (I do not see these messages on 2.6.32):
> > 
> > [   16.528951] ioctl32(mdadm:2243): Unknown cmd fd(3) cmd(800c0910){t:09;sz:12} arg(ffb7f9c4) on /dev/sda9
> 
> Does this help?
> 
> --- a/fs/compat_ioctl.c
> +++ b/fs/compat_ioctl.c
> @@ -1038,6 +1038,8 @@ COMPATIBLE_IOCTL(FIOQSIZE)
>  #ifdef CONFIG_BLOCK
>  /* loop */
>  IGNORE_IOCTL(LOOP_CLR_FD)
> +/* md calls this on random blockdevs */
> +IGNORE_IOCTL(RAID_VERSION)
>  /* SG stuff */
>  COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
>  COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Rafael J. Wysocki Feb. 7, 2010, 10:03 a.m. UTC | #3
On Sunday 07 February 2010, Michael S. Tsirkin wrote:
> On Sat, Jan 30, 2010 at 11:02:10PM +0100, Arnd Bergmann wrote:
> > md ioctls are now handled by the md driver itself, but mdadm
> > may call RAID_VERSION on other devices as well. Mark the command
> > as IGNORE_IOCTL so this fails silently rather than printing
> > an annoying message.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> The patch does not seem to be there in -rc7.
> Since this is fixes a regression, should this go into 2.6.33?

I guess it should.

Do you have a link to the original report or has it been sent privately?

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1038,6 +1038,8 @@  COMPATIBLE_IOCTL(FIOQSIZE)
 #ifdef CONFIG_BLOCK
 /* loop */
 IGNORE_IOCTL(LOOP_CLR_FD)
+/* md calls this on random blockdevs */
+IGNORE_IOCTL(RAID_VERSION)
 /* SG stuff */
 COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
 COMPATIBLE_IOCTL(SG_GET_TIMEOUT)