Skip to contentSkip to conversation

amiga affs support broken in 2.4.x kernels??

DISCUSSION Mark Hounschell 2 participants 7 messages Apr 12, 2001 – Apr 17, 2001

lore
Share & tools
lore
#0 lore raw

I'm not a list member so IF you respond to this mail please CC me.
I've been looking at the archives and see some problems with the 2.3.x kernel versions and affs support. I havn't tried any 2.3.x versions but starting with 2.4.0 I can no longer mount an affs file system. No matter if loopback or an actual device. 2.2.x kernels work greate. Does anyone KNOW whether this still works or not and if not maybe a patch somwhere for the 2.4.x kernels. It doesn't appear that anything has changed in the
/usr/src/linux/fs/affs dircetory since at least 2.2.14 so I beleive the problem to be else where. I've tried all the versions of util-linux and all work with 2.2.14/2.2.18. What happens whin I try to mount an affs fs using the command "mount -t affs /dev/sdc1 /mnt" is the mount command just hangs and CANNOT be killed. If I access any files on the system after
the hang I get major file corruption. If I imediatly hit the kill switch then it is usually recoverable. Any response/help would be greatly appc'd

Regards
Mark Hounschell
[email protected]

#2 lore raw
In reply to Mark Hounschell
Quoted 5 lines · Roman Zippel

Hi,

Mark Hounschell wrote:

Quoted 8 lines
Quoted 3 lines

I'm not a list member so IF you respond to this mail please CC me.
I've been looking at the archives and see some problems with the 2.3.x kernel versions and affs support.

I've put a new version at
http://www.xs4all.nl/~zippel/affs.010414.tar.gz

bye, Roman

Thanks, I can now mount affs filesystems. However when I try to write to it via "cp somefile /amiga/somefile" I get a segmentation fault. If I then do a "df -h" it hangs the system very much like the mount command did before I installed your tar-ball. Was write support expected from it.
Are you the NEW maintainer of the affs stuff. I very much appreciate your
response and if I can help in any way just let me know. I use affs quite a bit here at work in conjunction with UAE and real amigas.

I also received a response from I guess the original
maintainer, Hans-Joachim Widmaier <[email protected]>.
I quote:

"?affs is broken since somewhere in 2.3.xx. Alas, I do not have the time
anymore to do anything about it, and my Amiga ran its last program, too,
so I cannot test anymore. Last I know is that several guys wanted to
look after affs in 2.4--at least make it run--, but it seems that nothing
much has been done in that way. :-(

Sorry for not bearing better news."

unquote:

I was very much relieved to from you as I know have HOPE for a completely working affs again.

Thanks

Mark Hounschell
[email protected]
--

#3 lore raw
In reply to Mark Hounschell

Hi,

Quoted 5 lines · Mark Hounschell

Thanks, I can now mount affs filesystems. However when I try to write to it via "cp somefile /amiga/somefile" I get a segmentation fault. If I then do a "df -h" it hangs the system very much like the mount command did before I installed your tar-ball. Was write support expected from it.

Yes, it should work.
What sort of filesystem is it (ffs or ofs)? Did you check the dmesg output for an oops? Which kernel version did you use?

Quoted 1 line

Are you the NEW maintainer of the affs stuff.

Yes and as soon this problem is solved, I'm sending the changes to Linus and Alan.

bye, Roman

#4 lore raw
In reply to Mark Hounschell
Quoted 15 lines · Roman Zippel

Hi,

Quoted 5 lines · Mark Hounschell

Thanks, I can now mount affs filesystems. However when I try to write to it via "cp somefile /amiga/somefile" I get a segmentation fault. If I then do a "df -h" it hangs the system very much like the mount command did before I installed your tar-ball. Was write support expected from it.

Yes, it should work.
What sort of filesystem is it (ffs or ofs)? Did you check the dmesg output for an oops? Which kernel version did you use?

Quoted 6 lines
Quoted 1 line

Are you the NEW maintainer of the affs stuff.

Yes and as soon this problem is solved, I'm sending the changes to Linus and Alan.

bye, Roman

Hello Roman,
Sorry I didn't get back to you yesterday afternoon. I was out of town. Attached is the output from dmesg and the relavent info from
/var/log/messages. I am using a vanilla 2.4.3 kernel with the affs support compiled in. (No Modules). I beleive the filesystem is ffs but not exactly sure. How do I tell?

Mark

#5 lore raw
In reply to Mark Hounschell

Hi,

Quoted 3 lines · Mark Hounschell

Sorry I didn't get back to you yesterday afternoon. I was out of town. Attached is the output from dmesg and the relavent info from
/var/log/messages.

Could you try the attached patch? I forgot to initialize a variable correctly.
(I also put a new version at
http://www.xs4all.nl/~zippel/affs.010417.tar.gz)

Quoted 2 lines

I beleive the filesystem is ffs
but not exactly sure. How do I tell?

It's printed if you mount with '-overbose', but it shouldn't be needed anymore. :)

bye, Roman

affs/bitmap.c renamed from affs/bitmap.c.org +4 -2
@@ -124,7 +124,7 @@
 err_bh_read:
 	affs_error(sb,"affs_free_block","Cannot read bitmap block %u", bm->bm_key);
 	AFFS_SB->s_bmap_bh = NULL;
-	AFFS_SB->s_last_bmap = 0;
+	AFFS_SB->s_last_bmap = ~0;
 	up(&AFFS_SB->s_bmlock);
 	return;
 
@@ -262,7 +262,7 @@
 err_bh_read:
 	affs_error(sb,"affs_read_block","Cannot read bitmap block %u", bm->bm_key);
 	AFFS_SB->s_bmap_bh = NULL;
-	AFFS_SB->s_last_bmap = 0;
+	AFFS_SB->s_last_bmap = ~0;
 err_full:
 	pr_debug("failed\n");
 	up(&AFFS_SB->s_bmlock);
@@ -288,6 +288,8 @@
 		return 0;
 	}
 
+	AFFS_SB->s_last_bmap = ~0;
+	AFFS_SB->s_bmap_bh = NULL;
 	AFFS_SB->s_bmap_bits = sb->s_blocksize * 8 - 32;
 	AFFS_SB->s_bmap_count = (AFFS_SB->s_partition_size - AFFS_SB->s_reserved +
 				 AFFS_SB->s_bmap_bits - 1) / AFFS_SB->s_bmap_bits;
#6 lore raw
In reply to Mark Hounschell
Quoted 12 lines · Roman Zippel

Could you try the attached patch? I forgot to initialize a variable correctly.
(I also put a new version at
http://www.xs4all.nl/~zippel/affs.010417.tar.gz)

Quoted 2 lines

I beleive the filesystem is ffs
but not exactly sure. How do I tell?

It's printed if you mount with '-overbose', but it shouldn't be needed anymore. :)

Quoted 6 lines

bye, Roman

------------------------------------------------------------------------
Name: affs.diff
affs.diff Type: Plain Text (text/plain)
Encoding: 7bit

Roman,
That seems to have done it. I'm now able to mount,read,and write to
affs
file systems. With an scsi zip drive with 3 affs partitions on it and an affs hardfile(loop) that I use with UAE occasionally. Looks good to me. I'll be using this functionality quite a bit so I'll notify you of any anomalies if it's ok. Thank you for your efforts.

Regards
Mark Hounschell
[email protected]