Question

I've been looking at the ext3 source code to get some hints for my current work and orphan list is a term which I'm coming across very often. Please explain what is it.

I'm aware of the directory and the block map structure and wanted to study the transaction management for truncate.

Was it helpful?

Solution

Orphan files are files that are still open by a process, but have been deleted (hence have no link to any directory in the filesystem). Does that help?

OTHER TIPS

Detailed answer for ext3 spec:

If we have a file which has been unlinked on disk, but is still open (by another process), then on the reboot, we need to make sure that file is deleted. EXT3 adds a new data structure on the disk. It has an entry in the superblock which points to a linked list of inodes on disk which need to be deleted on reboot. And whenever you unlink an open file, it gets added on to that list. And when you finally close that file, the delete operation which happens as a result of that close will remove the inode from that list. [50m, 37s]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top