inode of anonymity file
binoy.jayan at wipro.com
binoy.jayan at wipro.com
Thu Sep 12 01:08:24 EDT 2013
Are you talking about an orphaned inode? In that case the e2fsck utility should be able to repair your file system to remove the orphaned inode in case your file system is a standard one like ext3 / ext4 etc.
If its a custom file system written by you, you may have to write a similar utility.
Regards,
Binoy Jayan
WIPRO TECHNOLOGIES | Electronic City 5 | Bangalore | Mob: +91-9742870916, +91-9745783048
________________________________________
From: kernelnewbies-bounces at kernelnewbies.org [kernelnewbies-bounces at kernelnewbies.org] on behalf of Valdis.Kletnieks at vt.edu [Valdis.Kletnieks at vt.edu]
Sent: Thursday, September 12, 2013 9:34 AM
To: Grissiom
Cc: kernelnewbies at kernelnewbies.org
Subject: Re: inode of anonymity file
On Thu, 12 Sep 2013 11:38:18 +0800, Grissiom said:
> One question about the unlinked file: if I write a lot of data into a
> unlinked file, where
> will the data be? On the disk or in the RAM? If the data will be on
> the disk, where is it?
Maybe on disk, maybe in RAM, same as any other file data. Depends if the
disk writeback has gotten around to flushing it yet, if anybody has done
a sync() or fsync(), etc etc. It behaves exactly the same way as any
other inode, except it's not in a directory. You keep writing to it,
the file system will keep allocating blocks just like if it was linked,
because blocks are allocated to inodes, not directory entries (and it's
incredibly painful to check where (or even if) a file is linked if your
file system has hundreds of millions of files on it). So basically everything
that uses an inode or file descriptor will work just the same (even stuff
like fchmod() even though it's sort of meaningless) - it's just things
that use a pathname that no longer work for an unlinked file.
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
More information about the Kernelnewbies
mailing list