Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Feb 2007 00:14:02 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        freebsd-fs@FreeBSD.org
Cc:        freebsd-current@FreeBSD.org
Subject:   Call for tester! vptofh change.
Message-ID:  <20070202231401.GB25236@garage.freebsd.pl>

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

--GRPZ8SYKNexpdSJ7
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi.

Currently we have two VFS methods: vfs_vptofh, which translates vnode to
NFS file handle and vfs_fhtovp, which translates NFS file handle to
vnode. Unfortunately this allows to support only one type of structure
stored in v_data (without some nasty magic). That's why I'd like to move
vptofh operations from VFS operations to VOP operations. By doing this I
can use different vop_vptofh operation for different kinds of vnodes.

In Solaris it is already done that way - we have vfs 'vget' method which
does file-handle-to-vnode translation and vnode 'fid' method, which does
vnode-to-file-handle translation.

I need this functionality for ZFS, but it seems to be logical move in
general - VFS_VPTOFH() macro takes vnode pointer as its first argument,
not mount pointer as the other VFS_*() macros, so it looks like it
should be a VOP in the first place.

One of the possibilities was to introduce vop_vptofh method, but leave
vfs_vptofh method as it is and don't touch existing file systems, but
let's do it right and convert all existing file systems from the base
system to use vop_vptofh. Unfortunately touching all file systems is
risky, even if the change is easy and I can't test all file systems by
myself.=20

The patch is compile-tested and I also tested exporting UFS, MSDOSFS,
CD9660, NULLFS and ZFS over NFS with this change and it seems to work
(FreeBSD as NFS server and FreeBSD and Solaris as NFS clients).

I'd like to ask for testing file systems below:

HPFS
NTFS
UDF
UnionFS
EXT2FS
ReiserFS
XFS

You would need to export the file system over NFS
_before_patching_the_kernel_, mount it over NFS (even locally) and run
something like 'find /path/to/fs/ -print0 | xargs ls -ld'.
If it works, you need to patch the kernel, recompile it, try the same
operations and report the results (also success stories).

The patch can be downloaded from here:

	http://people.freebsd.org/~pjd/patches/vptofh.patch

You apply the patch from /sys/ directory:

	# cd /sys/
	# patch < /path/to/vptofh.patch

Thank you very much in advance!

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

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

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

iD8DBQFFw8W5ForvXbEpPzQRAq3MAKDRD0FxbVo02LZmExcMT/j7InkLZACgtKPK
dIQRSm6nne7DdyW1UHs8wtg=
=lT37
-----END PGP SIGNATURE-----

--GRPZ8SYKNexpdSJ7--



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