Skip to contentSkip to conversation

checkpointing VFS internals

DISCUSSION Dave Hansen 1 participant 1 message Dec 4, 2008

lore
Share & tools
lore
#0 lore raw

Try the following:

mkdir foo bar
mount --bind foo bar
(date; cat) > bar/file

In another terminal:

cat bar/file
umount bar # should say busy
umount -l bar
cat bar/file # -EEXIST

# ls -l /proc/`pidof cat`/fd/
total 0
lrwx------ 1 dave dave 64 2008-12-04 06:50 0 -> /dev/pts/22
l-wx------ 1 dave dave 64 2008-12-04 06:50 1 -> barfile
lrwx------ 1 dave dave 64 2008-12-04 06:50 2 -> /dev/pts/22

You can still read and write to /proc/pidof cat/fd/1 as you would probably expect. But, there's no sign of the mount in /proc/mounts or /proc/$pid/{mounts,mountinfo,stats}. There's no apparent way to checkpoint this from userspace currently. This is basically the unlinked but open file problem, but with mounts.

Should we work on getting the lazy unmounts in those files? Or, is this a case for checkpointing the mounts internally to the kernel just as we do with unlinked files?

-- Dave