/linux/include/linux/fs.h defines get_sb_nodev as: extern int get_sb_nodev(struct file_system_type *fs_type, int flags, void *data, int (*fill_super)(struct super_block *, void *, int), struct vfsmount *mnt); While subfs.c calls: newmount->sb = get_sb_nodev(fst, flags, data, subfs_fill_super); I don't know much about kernel symbols so I don't know how to correct that, so I can't attach a patch. Sorry for that.
Created attachment 97609 [details, diff] Patch against submount-0.9 with submount-0.9-sem2mutex.patch applied After a short while of trial-and-error and reading through the kernel's vfs documentation I have finally been able to write a patch on my own: subfs_get_super now returns an integer and takes a vfsmount structure as it's last argument. Instead of calling get_sb_nodev I call sget directly (which is not quite nice, because my solution bypasses the default vfs functions. But it works and should keep working until a new version of submount arrives). The patch is for submount-0.9 with the submount-0.9-sem2mutex.patch patch already applied. I don't know the reaction of <2.6.18 kernels against the patch, so this NEEDS FURTHER TESTING (or a neater patch with version detection. I've been too lazy to write that.)
Created attachment 98779 [details, diff] patch I think you are on the right lines but it can be done in a less intrusive way (we won't be seeing a new submount release any time soon...) Also there were a couple of other issues that needed addressing. Please test this patch.
(In reply to comment #2) > Created an attachment (id=98779) [edit] > patch > > I think you are on the right lines but it can be done in a less intrusive way > (we won't be seeing a new submount release any time soon...) > > Also there were a couple of other issues that needed addressing. Please test > this patch. Works for me. Thanx. I wanted to make a patch myself, but it crossed my mind that somebody else might have made a patch already :) I tested this with suspend2-2.6.18 kernel on Amd64. I can attach the ebuild here if needed. Just reply here, I'll be watching this bug.
I'm using ck-sources. The first patch is working fine. The second caused a kernel Oops. I added the patch at the end of src_unpack: # Fix compile on 2.6.18, bug #148381 if kernel_is ge 2 6 18; then epatch ${FILESDIR}/${P}-kernel2.6.18.patch fi
Does not work for me: subfs 0.9 BUG: unable to handle kernel NULL pointer dereference at virtual address 00000148 printing eip: e198e873 *pde = 00000000 Oops: 0002 [#1] PREEMPT Modules linked in: subfs vfat fat tun xt_multiport iptable_mangle snd_seq snd_seq_device snd_intel8x0m snd_intel8x0 snd_ac97_codec snd_ac97_bus fuse ehci_hcd uhci_hcd radeon drm intel_agp agpgart snd_pcm_oss snd_pcm snd_timer snd_page_alloc snd_mixer_oss snd soundcore joydev CPU: 0 EIP: 0060:[<e198e873>] Not tainted VLI EFLAGS: 00010246 (2.6.18 #1) EIP is at subfs_get_super+0xd2/0x10a [subfs] eax: 00000000 ebx: c3b44c00 ecx: c3b44c00 edx: 00000000 esi: c3b44c00 edi: dc436000 ebp: dc436000 esp: d3365e80 ds: 007b es: 007b ss: 0068 Process mount (pid: 19944, ti=d3364000 task=c1582550 task.ti=d3364000) Stack: c0168aae 0000000b 000000d0 c14748c0 fffffff4 e198f340 c2abc000 c01572c7 e198f340 00000001 c2abc000 dc436000 c14748c0 d0675000 e198f340 d0675005 c2abc000 c0157321 e198f340 00000001 c2abc000 dc436000 d0675000 dc436000 Call Trace: [<c0168aae>] alloc_vfsmnt+0x9e/0xc7 [<c01572c7>] vfs_kern_mount+0x35/0x66 [<c0157321>] do_kern_mount+0x29/0x39 [<c0169db5>] do_new_mount+0x67/0xa4 [<c016a3f5>] do_mount+0x153/0x16b [<c016a257>] copy_mount_options+0x49/0x94 [<c016a69b>] sys_mount+0x79/0xb3 [<c0102bd1>] sysenter_past_esp+0x56/0x79 Code: 89 c7 5a 85 ff 59 89 43 0c b8 f4 ff ff ff 74 4b be 98 ea 98 e1 ac aa 84 c0 75 fa 55 53 e8 e1 fc ff ff 5e 85 c0 5f 75 33 8b 43 14 <89> 98 48 01 00 00 ff 74 24 30 68 ee e4 98 e1 55 ff 74 24 30 ff EIP: [<e198e873>] subfs_get_super+0xd2/0x10a [subfs] SS:ESP 0068:d3365e80
Thanks, I see the silly mistake, I'll get back to this soonish...
Created attachment 99334 [details, diff] updated patch Please try this one. It would be great if someone could test it against both 2.6.17 and 2.6.18 (should work in both cases!)
*** Bug 150906 has been marked as a duplicate of this bug. ***
subfs 0.9 [...] The patch works for me in 2.6.18.
Thanks. Pretty please can someone test it agains 2.6.17 as well? :)
Works fine with 2.6.17-r4. Thanks! Waiting this patch to portage ASAP ;)
Thanks, in portage
Just an advance warning: Unless a proper maintainer steps up I'm probably going to package.mask and kill submount next time it fails to compile against a new kernel. It's simply too much hassle for me to go around fixing so many external kernel modules. Suitable replacements for this package include the in-kernel automounter, hal, ivman.
Surprise surprise, it's broken for 2.6.19. I am going to send a mail to gentoo-dev seeking new maintainers, if nobody steps up it will be removed from portage in approx 4 weeks.
Created attachment 103183 [details, diff] Patch for 2.6.19 Afaik i_blksize has been removed from the kernel (it says so in a lkml thread [1]). This patch removes the code to set i_blksize and makes submount work for me again. Ps. Is there a document on the duties and responsibilities of a package maintainer? [1] http://lkml.org/lkml/2006/7/2/164
It would involve becoming a Gentoo developer, see http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml