O_NONBLOCK on zfs volume

Roman Bogorodskiy novel at FreeBSD.org
Thu Aug 14 18:53:33 UTC 2014


Hi,

I have a zfs volume of type 'dev':

$ zfs get type,volmode test/vol5
NAME       PROPERTY  VALUE    SOURCE
test/vol5  type      volume   -
test/vol5  volmode   dev      local
$

I'm trying to set O_NONBLOCK on its device, a sample program I use looks
like this:


int main(int argc, char **argv) {
    int fd = open("/dev/zvol/test/vol5", O_RDONLY);
    int ret = fcntl(fd, F_SETFL, O_NONBLOCK);
			      
    if (ret < 0)
        perror("fcntl");
}


When I run it I get:

fcntl: Inappropriate ioctl for device

Could anybody please describe what's the reason of this behaviour?

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20140814/18f3137a/attachment.sig>


More information about the freebsd-fs mailing list