Overwrite Mechanism

Andreas Dilger adilger at sun.com
Wed Feb 24 21:37:26 UTC 2010


On 2010-02-24, at 01:49, Schrittesser, Florian wrote:
> i wanted to ask you all about the exact overwrite mechanism used in  
> ext3; is the information in the datablocks overwritten or written to  
> a new location and the information in the referring inode is  
> changed? Is it depending on the application used (and the functions  
> it calls) or independent from that?
>
> Please don't hesitate to go into further details and thanks for your  
> help!


It depends on what your application is doing.  If it is opening the  
file with open(O_TRUNC) then writing it, the new data is written to  
wherever it is allocated.  If O_TRUNC is not used, then the data is  
written into the same blocks as were previously allocated to the file.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.




More information about the Ext3-users mailing list