* [ANNOUNCE] HFS+ driver
@ 2003-05-07 15:06 Roman Zippel
2003-05-07 15:40 ` David S. Miller
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Roman Zippel @ 2003-05-07 15:06 UTC (permalink / raw)
To: linux-hfsplus-devel=5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: linux-fsdevel=u79uwXL29TY76Z2rM5mHXA,
linux-kernel=u79uwXL29TY76Z2rM5mHXA
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
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 9+ 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 19:39 ` Brad Boyer
2003-05-08 21:34 ` J.A. Magallon
2 siblings, 0 replies; 9+ messages in thread
From: David S. Miller @ 2003-05-07 15:40 UTC (permalink / raw)
To: Roman Zippel
Cc: linux-hfsplus-devel=5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-fsdevel=u79uwXL29TY76Z2rM5mHXA,
linux-kernel=u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 323 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=H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
[-- 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] 9+ 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 19:39 ` Brad Boyer
2003-05-07 23:53 ` Roman Zippel
2003-05-08 21:34 ` J.A. Magallon
2 siblings, 1 reply; 9+ messages in thread
From: Brad Boyer @ 2003-05-07 19:39 UTC (permalink / raw)
To: Roman Zippel
Cc: linux-hfsplus-devel=5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-fsdevel=u79uwXL29TY76Z2rM5mHXA,
linux-kernel=u79uwXL29TY76Z2rM5mHXA
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=POGeQm5F+FGB+jHODAdFcQ@public.gmane.org
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 9+ 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; 9+ messages in thread
From: Roman Zippel @ 2003-05-07 23:53 UTC (permalink / raw)
To: Brad Boyer
Cc: linux-hfsplus-devel=5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-fsdevel=u79uwXL29TY76Z2rM5mHXA,
linux-kernel=u79uwXL29TY76Z2rM5mHXA
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
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 9+ 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 19:39 ` Brad Boyer
@ 2003-05-08 21:34 ` J.A. Magallon
2003-05-08 21:47 ` Brad Boyer
2 siblings, 1 reply; 9+ 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] 9+ 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; 9+ 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] 9+ messages in thread
* Re: [ANNOUNCE] HFS+ driver
2003-05-08 21:47 ` Brad Boyer
@ 2003-05-08 22:12 ` J.A. Magallon
2003-05-08 22:50 ` Brad Boyer
2003-05-12 9:58 ` Andreas Schwab
0 siblings, 2 replies; 9+ 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] 9+ messages in thread
* Re: [ANNOUNCE] HFS+ driver
2003-05-08 22:12 ` J.A. Magallon
@ 2003-05-08 22:50 ` Brad Boyer
2003-05-12 9:58 ` Andreas Schwab
1 sibling, 0 replies; 9+ messages in thread
From: Brad Boyer @ 2003-05-08 22:50 UTC (permalink / raw)
To: J.A. Magallon; +Cc: Roman Zippel, linux-hfsplus-devel, linux-fsdevel
Just as a note, I've removed linux-kernel from the cc: list, since it
seems like we've wandered off anything of general interest...
On Fri, May 09, 2003 at 12:12:02AM +0200, J.A. Magallon wrote:
> Just by chance... I was looking for options...
I guess I should write some documentation. :)
> 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 ?
Well, HFS+ does allow 255 character filenames, but some versions of the
MacOS will choke on anything longer than the old limit. I haven't tried
any UFS filesystems on any of my Macs. I have some pretty strong comments
from people inside Apple warning against trusting their implementation
of UFS, which kind of scared me off of it. The official word out of Apple
seems to be to use HFS+ unless you have a really, really good reason.
> 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+.
Always a good idea...
> - Moved HFS+ next to HFS in Configure.in
That's where I originally put it, but then a new filesystem showed up
and I didn't pay close enough attention to the merge, I guess.
> - 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 ?)
That would have to be in the code from Roman. I'm not quite done reading
it yet, I must admit. I've been busy with other stuff.
However, I have tended to keep the code clean for as many versions
as possible. There was one major change that keeps really old 2.4.x
versions from being easily source compatible without the horrible
KERNEL_VERSION hacks, and I'd like to avoid such hacks if possible.
> 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 ?
I'll take a look when I get a chance. Thanks for taking an interest
in the project.
Brad Boyer
flar@allandria.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ANNOUNCE] HFS+ driver
2003-05-08 22:12 ` J.A. Magallon
2003-05-08 22:50 ` Brad Boyer
@ 2003-05-12 9:58 ` Andreas Schwab
1 sibling, 0 replies; 9+ 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=5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-fsdevel=u79uwXL29TY76Z2rM5mHXA,
linux-kernel=u79uwXL29TY76Z2rM5mHXA
"J.A. Magallon" <jamagallon=cer70A47DaU@public.gmane.org> 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=l3A5Bk7waGM@public.gmane.org
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."
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-05-12 9:58 UTC | newest]
Thread overview: 9+ 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 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-08 22:50 ` Brad Boyer
2003-05-12 9:58 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox