* Solve the problem that umount will fail when an opened file isn't closed
@ 2006-06-16 2:56 colin
2006-06-16 15:34 ` Jan Engelhardt
0 siblings, 1 reply; 5+ messages in thread
From: colin @ 2006-06-16 2:56 UTC (permalink / raw)
To: linux-kernel
Hi all,
I have implemented an auto-mount & auto-umount facility based on USB
hotplug.
An annoying problem will occur when some process doesn't close its open file
and auto-umount is trying to umount that mount point after usb disk has been
unplugged.
Is there any way to force it to be umounted in this situation?
Regards,
Colin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Solve the problem that umount will fail when an opened file isn't closed
2006-06-16 2:56 Solve the problem that umount will fail when an opened file isn't closed colin
@ 2006-06-16 15:34 ` Jan Engelhardt
2006-06-19 7:27 ` colin
0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2006-06-16 15:34 UTC (permalink / raw)
To: colin; +Cc: linux-kernel
>
>Hi all,
>I have implemented an auto-mount & auto-umount facility based on USB
>hotplug.
>An annoying problem will occur when some process doesn't close its open file
>and auto-umount is trying to umount that mount point after usb disk has been
>unplugged.
>Is there any way to force it to be umounted in this situation?
>
fs/super.c:
/* Forget any remaining inodes */
if (invalidate_inodes(sb)) {
printk("VFS: Busy inodes after unmount of %s. "
"Self-destruct in 5 seconds. Have a nice day...\n",
sb->s_id);
}
That's what happens if you eject a CD. The box won't explode though.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Solve the problem that umount will fail when an opened file isn't closed
2006-06-16 15:34 ` Jan Engelhardt
@ 2006-06-19 7:27 ` colin
0 siblings, 0 replies; 5+ messages in thread
From: colin @ 2006-06-19 7:27 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-kernel
Hi Jan,
I found that if the process doesn't close the file after usb disk is
unplugged, generic_shutdown_super won't be invoked.
generic_shutdown_super will be invoked right after all opened files are
closed.
Regards,
Colin
----- Original Message -----
From: "Jan Engelhardt" <jengelh@linux01.gwdg.de>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-kernel@vger.kernel.org>
Sent: Friday, June 16, 2006 11:34 PM
Subject: Re: Solve the problem that umount will fail when an opened file
isn't closed
> >
> >Hi all,
> >I have implemented an auto-mount & auto-umount facility based on USB
> >hotplug.
> >An annoying problem will occur when some process doesn't close its open
file
> >and auto-umount is trying to umount that mount point after usb disk has
been
> >unplugged.
> >Is there any way to force it to be umounted in this situation?
> >
>
> fs/super.c:
>
> /* Forget any remaining inodes */
> if (invalidate_inodes(sb)) {
> printk("VFS: Busy inodes after unmount of %s. "
> "Self-destruct in 5 seconds. Have a nice day...\n",
> sb->s_id);
> }
>
> That's what happens if you eject a CD. The box won't explode though.
>
>
> Jan Engelhardt
> --
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Solve the problem that umount will fail when an opened file isn't closed
2006-06-16 16:39 Mike Smullin
@ 2006-06-19 2:36 ` colin
0 siblings, 0 replies; 5+ messages in thread
From: colin @ 2006-06-19 2:36 UTC (permalink / raw)
To: Mike Smullin, Jan Engelhardt; +Cc: linux-kernel
Hi Mike,
Do you want to see the hotplug agent code?
I can mail it to you and I would be very grateful if you can give me any
suggestion to improve it.
It will be used on a consumer product and would be better to be very stable.
Regards,
Colin
----- Original Message -----
From: "Mike Smullin" <mikesmullin@s161200816.onlinehome.us>
To: "Jan Engelhardt" <jengelh@linux01.gwdg.de>; "colin"
<colin@realtek.com.tw>
Cc: <linux-kernel@vger.kernel.org>
Sent: Saturday, June 17, 2006 12:39 AM
Subject: Re: Solve the problem that umount will fail when an opened file
isn't closed
> Thanks for that, Jan. What a great idea!
>
> > >I have implemented an auto-mount & auto-umount
> > facility based on USB
> > >hotplug.
>
> Colin can you explain how you implemented this? I would like to try it,
too.
>
> Thanks,
> Mike
>
> --
> Mike Smullin
> "The day I come in front of the Gartner audience and say we have a
> better Unix than Linux, that'll be a good day" -- Steve Ballmer
> http://www.mikesmullin.com
>
> --- Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
>
> > >
> > >Hi all,
> > >I have implemented an auto-mount & auto-umount
> > facility based on USB
> > >hotplug.
> > >An annoying problem will occur when some process
> > doesn't close its open file
> > >and auto-umount is trying to umount that mount
> > point after usb disk has been
> > >unplugged.
> > >Is there any way to force it to be umounted in this
> > situation?
> > >
> >
> > fs/super.c:
> >
> > /* Forget any remaining inodes */
> > if (invalidate_inodes(sb)) {
> > printk("VFS: Busy inodes after unmount of
> > %s. "
> > "Self-destruct in 5 seconds. Have a nice
> > day...\n",
> > sb->s_id);
> > }
> >
> > That's what happens if you eject a CD. The box won't
> > explode though.
> >
> >
> > Jan Engelhardt
> > --
> > -
> > To unsubscribe from this list: send the line
> > "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Solve the problem that umount will fail when an opened file isn't closed
@ 2006-06-16 16:39 Mike Smullin
2006-06-19 2:36 ` colin
0 siblings, 1 reply; 5+ messages in thread
From: Mike Smullin @ 2006-06-16 16:39 UTC (permalink / raw)
To: Jan Engelhardt, colin; +Cc: linux-kernel
Thanks for that, Jan. What a great idea!
> >I have implemented an auto-mount & auto-umount
> facility based on USB
> >hotplug.
Colin can you explain how you implemented this? I would like to try it, too.
Thanks,
Mike
--
Mike Smullin
"The day I come in front of the Gartner audience and say we have a
better Unix than Linux, that'll be a good day" -- Steve Ballmer
http://www.mikesmullin.com
--- Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> >
> >Hi all,
> >I have implemented an auto-mount & auto-umount
> facility based on USB
> >hotplug.
> >An annoying problem will occur when some process
> doesn't close its open file
> >and auto-umount is trying to umount that mount
> point after usb disk has been
> >unplugged.
> >Is there any way to force it to be umounted in this
> situation?
> >
>
> fs/super.c:
>
> /* Forget any remaining inodes */
> if (invalidate_inodes(sb)) {
> printk("VFS: Busy inodes after unmount of
> %s. "
> "Self-destruct in 5 seconds. Have a nice
> day...\n",
> sb->s_id);
> }
>
> That's what happens if you eject a CD. The box won't
> explode though.
>
>
> Jan Engelhardt
> --
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-19 7:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-16 2:56 Solve the problem that umount will fail when an opened file isn't closed colin
2006-06-16 15:34 ` Jan Engelhardt
2006-06-19 7:27 ` colin
2006-06-16 16:39 Mike Smullin
2006-06-19 2:36 ` colin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®