Re: ext3 block layout after deleting previous drive contents

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

 



On Tue, Apr 08, 2008 at 09:33:32AM -0700, Bock, Tony wrote:
> Is there any ext3 feature that would cause disk layout to vary if one were to delete all the files on disk and then rewrite them in the same order?  We've been doing some simple read/write file system tests in our lab that sometimes result in short delays being distributed throughout several files.  As long as we don't re-wipe the drive, these delays occur at repeatable offsets within the affected files, suggesting disk seeks at the affected locations.
> 
> To my understanding, deleting a file should mark all the data blocks as free.  Thus, any previous disk state should no longer affect files that are written thereafter.  Is this correct?
>

As a general rule you cannot re-use the blocks (in ordered mode anyway) that are
involved in a truncate until the transaction for the truncate is completed in
order to make sure that everything is consistent after a recovery in the case of
a crash.  So if you are rm -rf *'ing and then immediately re-writing stuff you
are going to end up with weirdness, as there will be blocks that cannot be
reused until the entire truncate is completed.  Best bet is to do  you rm -rf *
and then run sync, and then do your writing, that should garuntee that the
blocks that you have freed up from the truncate are actually able to be used by
new stuff.  Thanks much,

Josef 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux