Hi...

2009/1/5 Paraneetharan Chandrasekaran <[email protected]>:
> Hi Mulyadi,
>          These are the sequence of commands i used..
>
> dd if=/dev/zero of=./fsimage.img bs=1k count=10000
> /sbin/losetup /dev/loop0 ./fsimage.img
> /sbin/mke2fs /de/loop0 10000
> mkdir mntpoint
> mount /dev/loop0 ./mntpoint
> cd mntpoint
> vim newfile
> /* entered some contents, saved and exited*/
> cd ..
> rm fsimage.img
> cd mntpoint
> /* I am now able to change to this directory ! */
> cat newfile
> /* the contents are here without any change ! */

I think, by directly doing "rm <image file>" without first detaching
the loop device from the backing file, it still makes  /dev/loop
associated with the disk blocks. In other word, backing file inode is
not needed in this context, because that's replaced by /dev/loop
metadata (or inode). That's why you can still access the directories
and the files and their contents.

These are all my humble interpretation on how VFS works...CMIIW people

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to