From owner-freebsd-fs@FreeBSD.ORG Tue Aug 7 13:34:15 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC42106564A for ; Tue, 7 Aug 2012 13:34:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id DEF758FC08 for ; Tue, 7 Aug 2012 13:34:14 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q77DXmQk021340; Tue, 7 Aug 2012 16:33:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q77DXYVX036416; Tue, 7 Aug 2012 16:33:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q77DXY6e036415; Tue, 7 Aug 2012 16:33:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 7 Aug 2012 16:33:34 +0300 From: Konstantin Belousov To: Oleksandr Dudinskyi Message-ID: <20120807133334.GL2676@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="suFzMqjmaXLIoFqW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org Subject: Re: How to use VOP_IOCTL? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2012 13:34:15 -0000 --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--