> Typically Linux destroys processes the below way during shutdown:
> 
>       killall5 -SIGTERM
>       sleep 5
>       killall5 -SIGKILL
> 
> ntfs-3g catches SIGTERM and initiates a clean unmount. If the 5 sec is not 
> enough then bad things can happen due to killall5 -SIGKILL.
> 

As you pointed out, the killall5 -SIGTERM will be handled by NTFS-3g and 
it would normally unmount the partition. But not in my current case. I 
am not using lazy unmounts, but there are still open files during the 
SIGTERM on my NTFS disk so all attempts to unmount the partition will 
fail as well as the SIGTERM signal, NTFS-3g would just silently ignore 
it (as the filesystem is busy); this is the main reason that SIGTERM 
doesn't do anything, and then SIGKILL causes troubles because it kills 
the ntfs-3g process which is still required to handle all the open files.

So I really think my problem is in killall5, which should NOT kill my 
ntfs-3g processes at the time I need it.

But here comes a suggestion for you: if ntfs-3g receives the SIGTERM 
signal but is not able to end/unmount the filesystem cleanly, it should 
prepare itself (it should expect) to be terminated by SIGKILL soon 
(perhaps it should sync and ignore further writes or something). Just a 
suggestion :) This will not help me in my case, but perhaps would be a 
nice feature for others.


Tomas M

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to