[DRBD-user] [patch] Fix BLK* ioctls with 32bit userspace/64bit kernel

Lars Ellenberg Lars.Ellenberg at linbit.com
Tue Jul 4 12:31:46 CEST 2006

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


/ 2006-07-03 19:47:55 +0200
\ Guido Guenther:
> Hi,
> according to block/ioctl.c drbd_ioctl() is supposed to return -ENOCTLCMD
> instead of -EINVAL when it doesn't handle that specific ioctl:
> 
> /* Most of the generic ioctls are handled in the normal fallback path.
>    This assumes the blkdev's low level compat_ioctl always returns
>    ENOIOCTLCMD for unknown ioctls. */
> 
> If we don't do this all ioctl's like BLKGETSIZE64 and friends return
> EINVAL which makes drbd almost unusable with a 32bit userspace on e.g.
> amd64 (except for the trivial case where you create the fs direcly on
> the /dev/drbd? device). With this one liner partitioning and lvm
> work as expected, please apply:

um. how do you partition drbd ??

thanks for the heads up...
unfortunately this patch does not work generically,
it would return ENOIOCTLCMD to user space for the non ->compat_ioctl case.
which is not allowed.
I fixed it in the drbd_compat_ioctl wrapper.

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
__
please use the "List-Reply" function of your email client.



More information about the drbd-user mailing list