2003-05-07 14:54:51

by Roman Zippel

[permalink] [raw]
Subject: [ANNOUNCE] HFS+ driver

Hi,

I'm proud to announce a complete new version of the HFS+ fs driver. This
work was made possible by Ardis Technologies (http://www.ardistech.com). It's
based on the driver by Brad Boyer (http://sf.net/projects/linux-hfsplus).

The new driver now supports full read and write access. Perfomance has
improved a lot, the btrees are kept in the page cache with a hash on top
of this to speed up the access to the btree nodes.
I also added support for hard links and the resource fork is accessible
via <file>/rsrc.

This is a beta release. I tested this a lot, so I consider it quite safe
to use, but I can't give any guarantees at this time of course. There is
also still a bit to do (e.g. the block allocator needs a bit more work).

The driver can be downloaded from http://www.ardistech.com/hfsplus/ .
The README describes how to build the driver.

If something should go wrong, I also have patch for Apple's diskdev_cmds
(available from http://www.opensource.apple.com/darwinsource/10.2.5/),
which ports newfs_hfs and fsck_hfs to Linux and fixes the endian problems.
The patch is at http://www.ardistech.com/hfsplus/diskdev_cmds.diff.gz .
After applying the patch the tools can be built with 'make -f
Makefile.lnx'.

bye, Roman



2003-05-07 15:28:27

by David Miller

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

On Wed, 2003-05-07 at 08:06, Roman Zippel wrote:
> The driver can be downloaded from http://www.ardistech.com/hfsplus/ .
> The README describes how to build the driver.

This patch fixes 64-bit bugs (in extent code) and warnings
(in directory handling).

--
David S. Miller <[email protected]>


Attachments:
diff (2.22 kB)

2003-05-07 15:42:37

by Jeffrey W. Baker

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

> I'm proud to announce a complete new version of the HFS+ fs
> driver. This work was made possible by Ardis Technologies
> (http://www.ardistech.com). It's based on the driver by Brad Boyer
> (http://sf.net/projects/linux-hfsplus).

This is a huge development for iPod and other mac users.

> +Apple Extended file system support (read-only) (EXPERIMENTAL)

The "(read-only)" part should be removed, no?

-jwb


2003-05-07 16:25:55

by Miles Lane

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver


On Wednesday, May 7, 2003, at 08:55 AM, Jeffrey Baker wrote:

>> I'm proud to announce a complete new version of the HFS+ fs
>> driver. This work was made possible by Ardis Technologies
>> (http://www.ardistech.com). It's based on the driver by Brad Boyer
>> (http://sf.net/projects/linux-hfsplus).
>
> This is a huge development for iPod and other mac users.

Yes! Will this driver be accepted into the 2.4 and 2.5 trees any time
soon?

Thanks,
Miles

2003-05-07 19:27:15

by Brad Boyer

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

On Wed, May 07, 2003 at 05:06:59PM +0200, Roman Zippel wrote:
> I'm proud to announce a complete new version of the HFS+ fs driver. This
> work was made possible by Ardis Technologies (http://www.ardistech.com). It's
> based on the driver by Brad Boyer (http://sf.net/projects/linux-hfsplus).

I was starting to think noone was ever going to help out. :)

If you don't mind, I'll start merging your changes into the CVS tree
on SourceForge. I assume this is all GPL code, since you started from
my original patches... I'll wait to hear back from you before merging
it in, since it's a pretty big change.

> The new driver now supports full read and write access. Perfomance has
> improved a lot, the btrees are kept in the page cache with a hash on top
> of this to speed up the access to the btree nodes.
> I also added support for hard links and the resource fork is accessible
> via <file>/rsrc.

These were features I was trying to put off until someone else was
a little more active, I have to admit. I've been working on the code
in between other projects, but I'm a terrible release engineer and
other stuff got more interesting. It's good to see that someone else
cares about it.

Brad Boyer
[email protected]

2003-05-07 19:59:14

by Daniele Pala

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

Wow , great! thx a lot for that. ;)
So the major thing to fix now on macs is the sound part which is quite poor for now...at least on my old iMac DV...the
problem is that i don't even know which audio chipset it uses! Gotta start searching better for info...well let's hope
Apple gives info about this :)

On Wed, May 07, 2003 at 05:06:59PM +0200, Roman Zippel wrote:
> Hi,
>
> I'm proud to announce a complete new version of the HFS+ fs driver. This
> work was made possible by Ardis Technologies (http://www.ardistech.com). It's
> based on the driver by Brad Boyer (http://sf.net/projects/linux-hfsplus).
>
> The new driver now supports full read and write access. Perfomance has
> improved a lot, the btrees are kept in the page cache with a hash on top
> of this to speed up the access to the btree nodes.
> I also added support for hard links and the resource fork is accessible
> via <file>/rsrc.
>
> This is a beta release. I tested this a lot, so I consider it quite safe
> to use, but I can't give any guarantees at this time of course. There is
> also still a bit to do (e.g. the block allocator needs a bit more work).
>
> The driver can be downloaded from http://www.ardistech.com/hfsplus/ .
> The README describes how to build the driver.
>
> If something should go wrong, I also have patch for Apple's diskdev_cmds
> (available from http://www.opensource.apple.com/darwinsource/10.2.5/),
> which ports newfs_hfs and fsck_hfs to Linux and fixes the endian problems.
> The patch is at http://www.ardistech.com/hfsplus/diskdev_cmds.diff.gz .
> After applying the patch the tools can be built with 'make -f
> Makefile.lnx'.
>
> bye, Roman
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2003-05-07 23:44:31

by Roman Zippel

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

Hi,

On Wed, 7 May 2003, Brad Boyer wrote:

> If you don't mind, I'll start merging your changes into the CVS tree
> on SourceForge. I assume this is all GPL code, since you started from
> my original patches...

Yes, of course it is.

bye, Roman

2003-05-08 21:22:11

by J.A. Magallon

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver


On 05.07, Roman Zippel wrote:
> Hi,
>
> I'm proud to announce a complete new version of the HFS+ fs driver. This
> work was made possible by Ardis Technologies (http://www.ardistech.com). It's
> based on the driver by Brad Boyer (http://sf.net/projects/linux-hfsplus).
>

How about this ?

--- fs/hfsplus/options.c.orig 2003-05-08 23:28:09.000000000 +0200
+++ fs/hfsplus/options.c 2003-05-08 23:30:28.000000000 +0200
@@ -47,23 +47,6 @@
}
#endif

-/* My own little ultra-paranoid version of strtok (yes, there is strtok...) */
-static char *my_strtok(char *input, char **next, char delim)
-{
- char *d;
-
- if (!input || !*input || !next)
- return NULL;
-
- *next = NULL;
- d = strchr(input, delim);
- if (d) {
- *d = '\0';
- *next = d+1;
- }
- return input;
-}
-
/* convert a "four byte character" to a 32 bit int with error checks */
static int fill_fourchar(u32 *result, char *input)
{
@@ -102,14 +85,16 @@
/* input is the options passed to mount() as a string */
int parse_options(char *input, struct hfsplus_sb_info *results)
{
- char *next, *curropt, *value;
+ char *curropt, *value;
int tmp;

if (!input)
return 1;

- for (curropt = my_strtok(input, &next, ','); curropt != NULL;
- curropt = my_strtok(next, &next, ',')) {
+ while ((curropt = strsep(&input,",")) != NULL) {
+ if (!*curropt)
+ continue;
+
if ((value = strchr(curropt, '=')) != NULL)
*value++ = '\0';



--
J.A. Magallon <[email protected]> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-rc1-jam2 (gcc 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk))

2003-05-08 21:35:13

by flar

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

On Thu, May 08, 2003 at 11:34:01PM +0200, J.A. Magallon wrote:
> How about this ?

Yes, this is a good patch. I originally started on 2.2.x, which
doesn't have strsep, and I didn't trust strtok (with good reason).
I'll get rid of my little hacked up function and use strsep instead.
Thanks for taking a look at the code.

Brad Boyer
[email protected]

2003-05-08 21:59:40

by J.A. Magallon

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver


On 05.08, Brad Boyer wrote:
> On Thu, May 08, 2003 at 11:34:01PM +0200, J.A. Magallon wrote:
> > How about this ?
>
> Yes, this is a good patch. I originally started on 2.2.x, which
> doesn't have strsep, and I didn't trust strtok (with good reason).
> I'll get rid of my little hacked up function and use strsep instead.
> Thanks for taking a look at the code.
>

Just by chance... I was looking for options...

BTW, i could look for it but perhaps you know the answer. I use a zip
to move files between osx at the uni and my home linux. I have always been
hit bit the short name length in hfs. Does hfs+ increase it ? If not, have
you been able to read UFS filesystems created on osx with Linux UFS ?

And finally, while we are at it, I also did some other changes, some aesthetic
and some needed to patch on top of 2.4.21-rc1:

- Changed a bit the description strings in Config.in and Configure.help to
uniformize HFS and HFS+.
- Moved HFS+ next to HFS in Configure.in
- Killed your new_inode() macro, that function is already in -rc1 (yup, if
you want to maintain backwards compat, it would be better to wrap it
with a LINUX_VERSION_CODE < KERNEL_VERSION(2,4,???), since when is
new_inode() in ?)

Modified version, including the hfsplus dir and the 64 bit changes, is at
http://giga.cps.unizar.es/~magallon/linux/hfsplus-20030507-2.bz2

Can you check it ?

TIA

--
J.A. Magallon <[email protected]> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.21-rc1-jam2 (gcc 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk))

2003-05-12 09:51:39

by Andreas Schwab

[permalink] [raw]
Subject: Re: [ANNOUNCE] HFS+ driver

"J.A. Magallon" <[email protected]> writes:

|> Modified version, including the hfsplus dir and the 64 bit changes, is at
|> http://giga.cps.unizar.es/~magallon/linux/hfsplus-20030507-2.bz2

There is a warning in btree.c:hfsplus_btree_alloc_node. Does this make
sense?

--- btree.c.~1~ 2003-05-12 11:53:42.000000000 +0200
+++ btree.c 2003-05-12 11:53:51.000000000 +0200
@@ -204,7 +204,7 @@ hfsplus_bnode *hfsplus_btree_alloc_node(
}
}
}
- if (++off >= PAGE_CACHE_MASK) {
+ if (++off >= PAGE_CACHE_SIZE) {
hfsplus_kunmap(*pagep++);
data = hfsplus_kmap(*pagep);
off = 0;

Andreas.

--
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N?rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."