linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] HFS+ driver
@ 2003-05-07 15:06 Roman Zippel
  2003-05-07 15:40 ` David S. Miller
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Roman Zippel @ 2003-05-07 15:06 UTC (permalink / raw)
  To: linux-hfsplus-devel; +Cc: linux-fsdevel, linux-kernel

Hi,

I'm proud to announce a complete new version of the HFS+ fs driver. This 
work was made possible by Ardis Technologies (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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-07 15:06 [ANNOUNCE] HFS+ driver Roman Zippel
@ 2003-05-07 15:40 ` David S. Miller
  2003-05-07 16:14 ` Daniele Pala
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: David S. Miller @ 2003-05-07 15:40 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-hfsplus-devel, linux-fsdevel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

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 <davem@redhat.com>

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 2353 bytes --]

--- extents.c.~1~	Fri May  2 04:25:09 2003
+++ extents.c	Wed May  7 08:34:55 2003
@@ -216,7 +216,7 @@
 					break;
 			}
 			data[off] = cpu_to_be32(~word);
-			m = 1 << (8 * sizeof(unsigned long) - 1);
+			m = 1UL << (8 * sizeof(unsigned long) - 1);
 		} while (++off < size);
 	done:
 		mark_buffer_dirty_inode(bh, anode);
@@ -341,7 +341,7 @@
 			word = be32_to_cpu(data[off]);
 			if (!~word)
 				continue;
-			m = 1 << (sizeof(unsigned long) * 8 - 1);
+			m = 1UL << (sizeof(unsigned long) * 8 - 1);
 			for (i = 0; m; i++, m >>= 1) {
 				if (word & m)
 					continue;
--- dir.c.~1~	Fri May  2 07:32:04 2003
+++ dir.c	Wed May  7 08:36:06 2003
@@ -69,14 +69,14 @@
 				inode = NULL;
 				goto out;
 			}
-			dentry->d_fsdata = (void *)cnid;
+			dentry->d_fsdata = (void *)(unsigned long)cnid;
 			linkid = be32_to_cpu(entry.file.permissions.dev);
 			str.len = sprintf(name, "iNode%d", linkid);
 			str.name = name;
 			hfsplus_fill_cat_key(fd.search_key, HFSPLUS_SB(sb).hidden_dir->i_ino, &str);
 			goto again;
 		} else if (!dentry->d_fsdata)
-			dentry->d_fsdata = (void *)cnid;
+			dentry->d_fsdata = (void *)(unsigned long)cnid;
 	} else {
 		printk("HFS+-fs: Illegal catalog entry type in lookup\n");
 		err = -EIO;
@@ -267,7 +267,7 @@
 	if (HFSPLUS_IS_RSRC(inode))
 		return -EPERM;
 
-	if (inode->i_ino == (u32)src_dentry->d_fsdata) {
+	if (inode->i_ino == (u32)(unsigned long)src_dentry->d_fsdata) {
 		for (;;) {
 			get_random_bytes(&id, sizeof(cnid));
 			id &= 0x3fffffff;
@@ -283,7 +283,7 @@
 		}
 		HFSPLUS_I(inode).dev = id;
 		cnid = HFSPLUS_SB(sb).next_cnid++;
-		src_dentry->d_fsdata = (void *)cnid;
+		src_dentry->d_fsdata = (void *)(unsigned long)cnid;
 		res = hfsplus_create_cat(cnid, src_dir, &src_dentry->d_name, inode);
 		if (res)
 			/* panic? */
@@ -296,7 +296,7 @@
 		return res;
 
 	inode->i_nlink++;
-	dst_dentry->d_fsdata = (void *)cnid;
+	dst_dentry->d_fsdata = (void *)(unsigned long)cnid;
 	d_instantiate(dst_dentry, inode);
 	atomic_inc(&inode->i_count);
 	inode->i_ctime = CURRENT_TIME;
@@ -319,7 +319,7 @@
 	if (HFSPLUS_IS_RSRC(inode))
 		return -EPERM;
 
-	cnid = (u32)dentry->d_fsdata;
+	cnid = (u32)(unsigned long)dentry->d_fsdata;
 	if (inode->i_ino == cnid &&
 	    atomic_read(&HFSPLUS_I(inode).opencnt)) {
 		str.name = name;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-07 15:06 [ANNOUNCE] HFS+ driver Roman Zippel
  2003-05-07 15:40 ` David S. Miller
@ 2003-05-07 16:14 ` Daniele Pala
  2003-05-07 19:39 ` Brad Boyer
  2003-05-08 21:34 ` J.A. Magallon
  3 siblings, 0 replies; 11+ messages in thread
From: Daniele Pala @ 2003-05-07 16:14 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-kernel

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 (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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-07 15:06 [ANNOUNCE] HFS+ driver Roman Zippel
  2003-05-07 15:40 ` David S. Miller
  2003-05-07 16:14 ` Daniele Pala
@ 2003-05-07 19:39 ` Brad Boyer
  2003-05-07 23:53   ` Roman Zippel
  2003-05-08 21:34 ` J.A. Magallon
  3 siblings, 1 reply; 11+ messages in thread
From: Brad Boyer @ 2003-05-07 19:39 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-hfsplus-devel, linux-fsdevel, linux-kernel

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 (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
	flar@allandria.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-07 19:39 ` Brad Boyer
@ 2003-05-07 23:53   ` Roman Zippel
  0 siblings, 0 replies; 11+ messages in thread
From: Roman Zippel @ 2003-05-07 23:53 UTC (permalink / raw)
  To: Brad Boyer; +Cc: linux-hfsplus-devel, linux-fsdevel, linux-kernel

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-07 15:06 [ANNOUNCE] HFS+ driver Roman Zippel
                   ` (2 preceding siblings ...)
  2003-05-07 19:39 ` Brad Boyer
@ 2003-05-08 21:34 ` J.A. Magallon
  2003-05-08 21:47   ` Brad Boyer
  3 siblings, 1 reply; 11+ messages in thread
From: J.A. Magallon @ 2003-05-08 21:34 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-hfsplus-devel, linux-fsdevel, linux-kernel


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 (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 <jamagallon@able.es>      \                 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))

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-08 21:34 ` J.A. Magallon
@ 2003-05-08 21:47   ` Brad Boyer
  2003-05-08 22:12     ` J.A. Magallon
  0 siblings, 1 reply; 11+ messages in thread
From: Brad Boyer @ 2003-05-08 21:47 UTC (permalink / raw)
  To: J.A. Magallon
  Cc: Roman Zippel, linux-hfsplus-devel, linux-fsdevel, linux-kernel

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
	flar@allandria.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-08 21:47   ` Brad Boyer
@ 2003-05-08 22:12     ` J.A. Magallon
  2003-05-12  9:58       ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: J.A. Magallon @ 2003-05-08 22:12 UTC (permalink / raw)
  To: Brad Boyer
  Cc: J.A. Magallon, Roman Zippel, linux-hfsplus-devel, linux-fsdevel,
	linux-kernel


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 <jamagallon@able.es>      \                 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))

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-08 22:12     ` J.A. Magallon
@ 2003-05-12  9:58       ` Andreas Schwab
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2003-05-12  9:58 UTC (permalink / raw)
  To: J.A. Magallon
  Cc: Brad Boyer, Roman Zippel, linux-hfsplus-devel, linux-fsdevel,
	linux-kernel

"J.A. Magallon" <jamagallon@able.es> 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, schwab@suse.de
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."

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
  2003-05-07 15:55 Jeffrey Baker
@ 2003-05-07 16:38 ` Miles Lane
  0 siblings, 0 replies; 11+ messages in thread
From: Miles Lane @ 2003-05-07 16:38 UTC (permalink / raw)
  To: Jeffrey Baker; +Cc: linux-kernel


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
>> (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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANNOUNCE] HFS+ driver
@ 2003-05-07 15:55 Jeffrey Baker
  2003-05-07 16:38 ` Miles Lane
  0 siblings, 1 reply; 11+ messages in thread
From: Jeffrey Baker @ 2003-05-07 15:55 UTC (permalink / raw)
  To: linux-kernel

> I'm proud to announce a complete new version of the HFS+ fs
> driver. This work was made possible by Ardis Technologies
> (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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-05-12  9:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-07 15:06 [ANNOUNCE] HFS+ driver Roman Zippel
2003-05-07 15:40 ` David S. Miller
2003-05-07 16:14 ` Daniele Pala
2003-05-07 19:39 ` Brad Boyer
2003-05-07 23:53   ` Roman Zippel
2003-05-08 21:34 ` J.A. Magallon
2003-05-08 21:47   ` Brad Boyer
2003-05-08 22:12     ` J.A. Magallon
2003-05-12  9:58       ` Andreas Schwab
2003-05-07 15:55 Jeffrey Baker
2003-05-07 16:38 ` Miles Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).