[lkml]   [2002]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectBUG: 2.4.19pre1 & journal_thread & open filehandles
Hello everybody!

I think I have discovered a bug in the way the kernel journal thread is
I tested with ext3 but believe that every fs using jbd has this bug.


A kernel journaling thread is created for every journaled filesystem which
gets mounted. The problem is, that the thread gets every open filehandle of
the mount-process added to the thread-filedescriptor-table.

Process 4 is a kjournald
On the shell (bash) I do a
exec 10< /etc/services
to open fd 10, then
mount -t ext3 /usr
to create a new kjournald with pid (eg) 25.
ls -la /proc/4/fd
ls -la /proc/25/fd
BOTH show a link "10 -> /etc/services".

I tried a short program which closes all filehandles and then execs mount,
but as of this test the filehandles get only added, never removed.

I believe this to be a serious bug as it's impossible to umount the
underlying filesystems (devfs and /) as AT LEAST 0,1 & 2 are used with
mount, and using pivot_root to change to a shmfs and then umounting
everything INCLUDING / isn't possible - the kjournald for / has
/dev/console open, and /dev is mounted below / ...

BTW: is the VFS-lock patch already in 2.4.19preX or will it be included in
the near future??

Thanks for reading and giving some replies.



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.045 / U:2.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site