2

Possible Duplicate:
Understanding the linux kernel source

I am sure that I must be missing something, here. I cannot for the life of me find the source code for these system calls. I can find their numbers, and I can find their prototypes, but I cannot seem to actually find the functions that implement them.

In case anyone's interested: the reason that I am trying to find them is so that I can debug a problem with the kernel's floppy driver and/or my floppy drive itself. I can dd to/from it just fine. The drive works in DOS and Windows just fine. But when I mount a disk (any disk, doesn't matter what), the disk is mounted for approximately 1/10 of a second and then automatically unmounted. I am trying to find out why and if there is a way that I can patch my kernel locally to work around it.

I know, I know, nobody uses floppies anymore. But I guess I am a nobody. :)

1
  • Yeah, the question that this is allegedly a duplicate of doesn't actually say anything about these system calls. I did see that question. I did read it. But the answers were basically "uh, they're somewhere, but it's not regular". Additionally, I am looking for the switching points, not the implementations (I don't care about ext3 umount, I want VFS umount). Jul 22, 2011 at 16:00

1 Answer 1

1

They are were in fs/super.c in Linux 2.4:

In my machine (Linux 2.6.24) they are in fs/namespace.c:

In Linux 2.6.39 (which is latest stable) I could not find sys_mount function but I found compat_sys_mount function in /fs/compat.c.

Thanks to Gilles for pointing out obsolete information.

4
  • They were in fs/super.c in a very old version of the kernel. They're in fs/namespace.c now. LXR is the place to search. Jul 22, 2011 at 13:10
  • @Gilles You are right, but there is no version info in question. So haven't realized that my information is obsolete. Anyway, I have updated my answer with additional references. Jul 22, 2011 at 14:06
  • Awesome! How did you trace them to fs/namespace.c? I guess I was grepping for the wrong thing? Jul 22, 2011 at 16:00
  • @Michael Actually I used Google Code Search and then verify the existance of files and functions in my system. Jul 22, 2011 at 17:59

Not the answer you're looking for? Browse other questions tagged .