Re: inode of anonymity file

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

 



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.

Attachment: pgprQ3YgyP8QR.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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