Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Feb 2007 07:30:35 +0900
From:      Hidetoshi Shimokawa <simokawa@FreeBSD.ORG>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org
Subject:   ZFS on amd64 (Re: ZFS patches for FreeBSD.)
Message-ID:  <87wt2sth84.wl%simokawa@FreeBSD.ORG>
In-Reply-To: <20061116015908.GB63195@garage.freebsd.pl>
References:  <20061116015908.GB63195@garage.freebsd.pl>

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

At Thu, 16 Nov 2006 02:59:08 +0100,
Pawel Jakub Dawidek wrote:
> 
> [1  <text/plain; iso-8859-2 (quoted-printable)>]
> Hi.
> 
> This is a first set of patches, which allows to use ZFS file system from
> OpenSolaris on FreeBSD.
> 
> To apply the patch you need to have recent FreeBSD source (be sure you
> have rev. 1.284 of src/sys/kern/kern_synch.c).
> 
> To try it out you need i386 machine (this is what I tested) and kernel
> without WITNESS compiled in (there are probably some warnings still).
> 
> Currently it can only be compiled as a kernel module.

Thank you for porting of ZFS.
I tried to run your code on FreeBSD/amd64 and it seems running very well.
It survives several "make -j8 buildworld/kernel" with the obj tree in ZFS.

Here is what I did,

1. copy files from //depot/user/pjd/zfs/...
   (without vop_vptofh related changes)
2. delete sys/contrib/opensolaris/uts/common/sys/acl.h
3. add    sys/contrib/opensolaris/uts/common/rpc/types.h from opensolaris
   (for vaild declaration of mem_alloc/mem_free for kernel)
4. replace "i386" in sys/modules/zfs/Makefile with ${MACHINE}.
5. apply the following patch. 
6. build


/\ Hidetoshi Shimokawa
\/  simokawa@FreeBSD.ORG

==== //depot/user/pjd/zfs/cddl/lib/Makefile#1 - /home/p4/zfs/cddl/lib/Makefile ====
@@ -1,3 +1,5 @@
+.if !defined(COMPAT_32BIT)
 SUBDIR=	libavl libnvpair libumem libuutil libzfs #libzpool
+.endif
 
 .include <bsd.subdir.mk>
==== //depot/user/pjd/zfs/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#27 - /home/p4/zfs/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c ====
@@ -388,7 +388,7 @@
  * Hash table routines
  */
 
-#define	HT_LOCK_PAD	64
+#define	HT_LOCK_PAD	roundup(sizeof(kmutex_t), 8)
 
 struct ht_lock {
 	kmutex_t	ht_lock;
==== //depot/user/pjd/zfs/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#67 - /home/p4/zfs/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ====
@@ -201,7 +201,7 @@
  * data (cmd == _FIO_SEEK_DATA). "off" is an in/out parameter.
  */
 static int
-zfs_holey(vnode_t *vp, int cmd, offset_t *off)
+zfs_holey(vnode_t *vp, u_long cmd, offset_t *off)
 {
 	znode_t	*zp = VTOZ(vp);
 	uint64_t noff = (uint64_t)*off; /* new offset */
@@ -1932,7 +1932,7 @@
 
 	mutex_exit(&zp->z_lock);
 
-	dmu_object_size_from_db(zp->z_dbuf, &blksize, &vap->va_nblocks);
+	dmu_object_size_from_db(zp->z_dbuf, &blksize, (u_longlong_t *)&vap->va_nblocks);
 	vap->va_blksize = blksize;
 
 	if (zp->z_blksz == 0) {
@@ -3116,7 +3116,7 @@
 	} */ *ap;
 {
 	int		cmd = ap->a_name;
-	int		*valp = ap->a_retval;
+	long		*valp = ap->a_retval;
 #if 0
 	vnode_t		*vp = ap->a_vp;
 	znode_t		*zp, *xzp;
@@ -3164,9 +3164,11 @@
 		*valp = 0;	/* TODO */
 		return (0);
 
+#if 0
 	case _PC_MIN_HOLE_SIZE:
 		*valp = (int)SPA_MINBLOCKSIZE;
 		return (0);
+#endif
 
 	default:
 		return (vop_stdpathconf(ap));






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87wt2sth84.wl%simokawa>