Skip to contentSkip to conversation

Kernel 2.6.4 Hang in utime() on swap file

DISCUSSION Michael W. Shaffer 1 participant 1 message Mar 20, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

ho hum. We do this to prevent anyone from ftruncate()ing the swapfile while it is in use. That can destroy filesystems. Let me think about it a bit.

If it's a 'feature' and we just need to know to exclude swapfiles from backups (since they don't need to be backed up anyway), then that's an acceptable workaround, I just wanted to make sure that it wasn't buggy behavior.

It is especially baffling because it leaves mysteriously un-killable processes (not even kill -9 will get them, but I guess you know that already). I don't know the internals behind this, but is there a non- hideous way to have utime() return an error in this case rather than entering this unkillable sleep or whatever? That might be a little nicer since applications trying to do this would presumably handle the error and proceed or exit rather than hanging infinitely with no obvious way to free them.

Thanks for explaining what's going on anyway.

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html