Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2012 16:33:34 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Oleksandr Dudinskyi <dudinskyj@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: How to use VOP_IOCTL?
Message-ID:  <20120807133334.GL2676@deviant.kiev.zoral.com.ua>
In-Reply-To: <CACOVGaBEFK77j-sPhrRPUmbT9hHnXoYMtgc8MixE4-oOWuRVYw@mail.gmail.com>
References:  <CACOVGaBEFK77j-sPhrRPUmbT9hHnXoYMtgc8MixE4-oOWuRVYw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--suFzMqjmaXLIoFqW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 06, 2012 at 09:45:03PM +0300, Oleksandr Dudinskyi wrote:
> Hi,
> I am the GSoC student I need some advice in my project.
> http://wiki.freebsd.org/SummerOfCode2012/UDFImplementation
> I want to use function VOP_IOCTL() in my project, but not very informative
> man, introduced me to the confusion. Specifically I don't know which of t=
he
> flags use. In NetBSD after call this function, request proceeds to functi=
on
> cdioctl () in  sys/dev/scsipi/cd.c . Where the command( one of the
> VOP_IOCTL parameters) is selection. Could you tell me how to reach this
> logic in Freebsd(call cdioctl () in  sys/cam /scsi/scsi_cd.c)? Or share
> some articles on the topic.

VOP_IOCTL() is just a forwarder of the generic ioctl arguments to an
implementation of the VOP in the vnode' filesystem. You claim that you
'want to use VOP_IOCTL', but you later describes that you want to=20
execute some CDROM-specific ioctl's. These things are not related.

My first question would be why do you need to execute device-specific
ioctl's in the filesystem code ? Do you plan for your UDF implementation
to be usable with e.g. md-mounted images ?

Second, if my guess is right and you want to execute device-specific ioctl
on the special device specified as your mount source, you probably need
the geom providers' geom ioctl method. You should have performed some
initial manipulations with the provider anyway at the mount time to
get access to i/o operations on it. Then provider->geom->ioctl is the
pointer to the provider ioctl implementation.

Might be, look at the g_dev_ioctl(9) for start.

--suFzMqjmaXLIoFqW
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlAhGS4ACgkQC3+MBN1Mb4i4bgCgsN3S6loAbdVhgUm29/V616V5
ZtgAoKwtKOgml9X60sDJGrBYwk/oFMIL
=tEd8
-----END PGP SIGNATURE-----

--suFzMqjmaXLIoFqW--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120807133334.GL2676>