Re: how to get the file name




Måns Rullgård wrote:

>
> What happens if the file is renamed/deleted and replaced with a
> different file while it is open?
>
>
>>From the perspective of your process, nothing. If I open /tmp/foo,
and then someone else executes 'rm /tmp/foo'. I really don't
notice. I've still got the open file. It is probably true that no
other processes can now open the file, since they won't
see it in the filesystem, so whatever changes I make to
the file will be lost as soon as I close it. Of course, any
other processes that have opened the file before it was
removed will see changes.

If someone creates another file named with the name '/tmp/foo',
again, I won't notice. It's a different file with a different inode.

.



Relevant Pages

  • [PATCH 1/2] VFS: update overview document
    ... -The Virtual File System (otherwise known as the Virtual Filesystem ... The pathname argument is used by the VFS to search through the ... -directory entry cache (dentry cache or "dcache"). ... -An individual dentry usually has a pointer to an inode. ...
    (Linux-Kernel)
  • Re: [PATCH] prune_icache_sb
    ... In Linux a filesystem is a dumb layer which sits between the VFS and the ... inode (that this cluster lock is created for). ...
    (Linux-Kernel)
  • [RFC][0/21]extend file size and filesystem size
    ... I have tried to extend the filesystem size and file size in ext2/3 ... A summary of my reform to extend the specs in ext2/3 is as below. ... type of variables in relation to block and inode, ... Change the type of 4byte variables manipulating a block or ...
    (Linux-Kernel)
  • [UPDATE][0/24]extend file size and filesystem size
    ... i_blocks of VFS inode is sector unit. ... There is not really a reason to make a filesystem ... filesystem-block unit. ... Change the type of 4byte variables manipulating a block or ...
    (Linux-Kernel)
  • Re: errors on an 11Tb filesystem... need suggestions
    ... >>and I can then traverse the filesystem in question and look for a file ... >>with the inode number of '133'. ... That's where the logfile ends and the lun bouncing from controller 'a' ...
    (comp.sys.sgi.admin)