From owner-freebsd-fs@FreeBSD.ORG Mon Feb 2 10:16:31 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C91D16A4CE; Mon, 2 Feb 2004 10:16:31 -0800 (PST) Received: from fons-adae.s.notwork.org (fons-adae.s.notwork.org [218.224.220.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED36243D31; Mon, 2 Feb 2004 10:16:26 -0800 (PST) (envelope-from mrt@notwork.org) Received: from fons-adae.s.notwork.org (fons-adae.s.notwork.org [IPv6:2001:218:420::3]) by fons-adae.s.notwork.org (Postfix) with ESMTP id DBBA43485; Tue, 3 Feb 2004 03:16:23 +0900 (JST) To: Zack Hobson X-cite: xcite 1.49 From: Murata Shuuichirou In-Reply-To: <1074080151.733.51.camel@cyclops.thehouse> (Zack Hobson's message of "Wed, 14 Jan 2004 03:35:51 -0800") References: <1074080151.733.51.camel@cyclops.thehouse> Date: Tue, 03 Feb 2004 03:16:21 +0900 Message-ID: <87ad41z6ru.fsf@fons-adae.s.notwork.org> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.0 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: yar@freebsd.org cc: fs@freebsd.org Subject: Re: updating HFS for 5.2R [patch] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2004 18:16:31 -0000 In message <1074080151.733.51.camel@cyclops.thehouse>, `zgh@malfunktion.net' wrote: > With these changes, the code compiles. I can install and load the > resulting kernel module, and I can sucessfully use newfs_hfs and > fsck_hfs, but mount_hfs on the same volume always fails with an > "Input/output error". If you have not gotten good results yet, try attached patch. Of course, your patch is also needed. With this patch, I can mount hfs successfully. Creating and removing files on the filesystem are also succeeded. But, I have not tested this fully and found some problems such as: 1. Sometime, hfs partitions become unmountable by FreeBSD (mount_hfs returns "Invalid argument"), although the partition can still be mounted by MacOSX. 2. After editing files on hfs filesystem with vi(1), umounting the filesystem causes these errors: Feb 2 21:13:11 roma kernel: hfs_fsync: dirty: 0xc2d74000: tag hfs, type VREG, usecount 2, writecount 0, refcount 2, flags (VV_SYSTEM), lock type cnode: EXCL (count 1) by thread 0xc2b42a80 (pid 1068) Feb 2 21:13:11 roma kernel: tag VT_HFS, cnid 4, on dev 4, 24 lock type cnode: EXCL (count 1) by thread 0xc2b42a80 (pid 1068) (lots of same errors continue) Then system crashed. These problems seem to occur on FreeBSD-5.1-RELEASE with original hfs-freebsd-03.tar.gz, too. So please use it with care. -- MURATA Shuuichirou --- darwin/xnu/bsd/hfs/hfs_readwrite.c 2004/01/29 13:55:22 1.1 +++ darwin/xnu/bsd/hfs/hfs_readwrite.c 2004/02/02 05:34:47 @@ -1452,6 +1452,9 @@ #ifdef DARWIN return VOCALL (vp->v_op, VOFFSET(vop_strategy), ap); #else +#if __FreeBSD_version >= 501112 /* XXX */ + bp->b_iooffset = dbtob(bp->b_blkno); +#endif #if __FreeBSD_version >= 500100 /* YYY the change has had no version bump */ VOP_SPECSTRATEGY(vp, bp); #else