Re: how can i get an orphaned inode?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 04, 2003 at 12:41:42PM +0200, Ales Ledvinka wrote:
> > > can some please explain what is exactly an orphaned inode, so i can trace
> > > my implementation for bugs??
> > 
> > You are probably doing the reference-counting wrong. You should check,
> > that when you delete a dentry, the inode's nlink count is decremented
> > and the inode is properly marked dirty (so the nlink count makes it to
> > disk).
> 
> i have come across this and have no idea if it might be helpful but hth
> http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/tsld021.htm
> or http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/index.htm
> 
> and answer to subject... one way to get orphaned inodes probably is:
> 
> 	one process opens file and keeps sleeping forever or cycling
> 		while still having the file opened
> 	another process deletes/unlinks file ()and on exit immediatly 
> 		powers off or reboots or you switch the power off...

fsck should drop in and remove the inode before mount. Or a journal
replay should. Because in this situation the filesystem can't be marked
clean (it can't be unmounted if it's dcache can't be purged and it can't
be purged when there are open files).

So if orphaned inode is seen beyond fsck and/or journal replay, it's
a driver bug.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux