Date: Thu, 14 Aug 2014 22:52:33 +0400 From: Roman Bogorodskiy <novel@FreeBSD.org> To: freebsd-fs@freebsd.org Subject: O_NONBLOCK on zfs volume Message-ID: <20140814185232.GB7913@kloomba>
next in thread | raw e-mail | index | archive | help
--H1spWtNR+x+ondvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D open("/dev/zvol/test/vol5", O_RDONLY); int ret =3D fcntl(fd, F_SETFL, O_NONBLOCK); =20 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 --H1spWtNR+x+ondvy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT7QVwAAoJEMltX/4IwiJqIZUIAI+IZ7q59HtrL+TlvFYk7SUo xvkMUrQyB48UE859UhTrcZjqWSCLAIZ9yPZNBfwpxfKC3agNpq9GvwTteBhv9loG HcD+LcGufJ6AT+ILpKjoFP6D4rbsu7P/m6/SqqpeS8OxfRFlzUf9PiBEU4fh3CXs S+C/rTb51f/YrEE5kD8xfWS8pFEvbX1LsqRjU9Hts+5upO0jGXwVfjccLA0oqt46 KGUL8vDxUNvM2OAkgwbhmIcXrX8ofGoH/ERdE36INHkWGoF+dlOJaa21XBLLAgSL SG9pLv0YDCzdX55GC+mMHJcRzxMlV+oJqh2MLzoKJbnvOcfQmgyN14/Ldwrvc/A= =Jsdg -----END PGP SIGNATURE----- --H1spWtNR+x+ondvy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140814185232.GB7913>