Deleting Inodes From Disk
Deleting inodes from disk is done using the super-block's delete_inode
operation, and the stamfs_delete_inode() function:
- Sanity check - make sure this is not a "bad inode" (i.e. an invalid inode).
- Set the inode's size field to zero, and if it contains any data blocks -
invoke stamfs_inode_truncate() (see below).
- Finally, free the inode, using stamfs_inode_free_ino() (which merely
frees the inode number, the inodes block and its block index block).
Originally written by
guy keren