[cgl_discussion] Updated Forced unmount
sdake at mvista.com
Mon Nov 1 10:14:47 PST 2004
On Sun, 2004-10-31 at 23:16, Daniel Phillips wrote:
> On Wednesday 27 October 2004 19:37, Villalovos, John L wrote:
> > Here is my update of Atul's port to the 2.6.8 kernel.
> > This is working on my system but I would love for people to look at
> > it and give me feedback.
> > I realize that it has sections which are big and ugly and I am hoping
> > to fix that.
> > Comments on its actual operation would be appreciated. Bug reports
> > and the like.
> This looks fishy:
> cloned_file = clone_filp(file); /* clone the file */
> list_move(&cloned_file->f_list, &sb->s_files);
> I don't see where you initialized the ->f_list of the cloned file.
> This is a really bad idea:
> + /* wait a bit, in hopes that the processes will take
> + * their errors, close out their files (and hope
> + schedule_timeout(5*HZ);
I've always thought the 5 second timeout is suboptimal but currently
necessary. The reason is because of the locking mechanism of the file
system. The filesystem uses lockless reference counting where the
reference count only increases to 1. This makes "knowing" when we can
blow away the filesystem difficult.. So the 5 seconds is a hack to
solve a complex race condition. Wait for 5 seconds until all system
calls have exited the filesystem code (and new requests get an error
because they are walled off). Without the 5 second wait, system calls
could get a reference after the filesystem was forcibly removed.
This is the biggest problem in the current patch and needs to be
> It's only going to make you miss bugs that will rear their heads later,
> never mind the extra time 5 seconds it leaves the poor admin wringing
> their hands.
> Sorry, I only had time for a superficial look. It's challenging, to say
> the least.
> cgl_discussion mailing list
> cgl_discussion at lists.osdl.org
More information about the cgl_discussion