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:

--- drbd0.7-0.7.19/drbd/drbd_fs.c.orig  2006-07-03 19:21:57.000000000 +0200
+++ drbd0.7-0.7.19/drbd/drbd_fs.c       2006-07-03 19:22:27.000000000 +0200
@@ -1451,7 +1451,7 @@
                break;
 
        default:
-               err = -EINVAL;
+               err = -ENOIOCTLCMD;
        }
  /* out: */
        up(&mdev->device_mutex);

Cheers,
 -- Guido

_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to