Re: DB2 failing with ioctl(GETBLKSIZE) on /dev/rawX...

From: Stephen C. Tweedie (sct@redhat.com)
Date: Tue Aug 22 2000 - 10:48:04 EST


Hi,

On Tue, Aug 22, 2000 at 03:06:06AM +0200, Bjoern Kriews wrote:
>
> This is what DB2 V7.1 (Personal) does if I try to use sct's raw devices:
>
> umask(0) = 022
> open("/dev/raw8", O_RDWR|O_CREAT, 0600) = 73
> umask(022) = 0
> fstat(73, {st_mode=S_IFCHR|0660, st_rdev=makedev(162, 8), ...}) = 0
> ioctl(73, BLKGETSIZE, 0xbfff7ee4) = -1 ENOTTY (Inappropriate ioctl
> for device)
>
> (Using /dev/sda8 fails because it is not a character device).

I can add the BLKGETSIZE ioctl if you like, but in general the block
device ioctls just don't make any sense for raw devices. In addition
to the getsize call, there are calls for cache invalidation and so on,
and these cases are inappropriate for an uncached device.

What ioctls actually make sense for raw devices? BLKGETSIZE is one,
but it's the only one I'd add unless there good reasons for adding any
others.

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



This archive was generated by hypermail 2b29 : Wed Aug 23 2000 - 21:00:07 EST