Re: fallocate creating fragmented files

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

 



On Thu, Jan 31, 2013 at 08:21:50AM +1100, Robert Mueller wrote:
> 
> For that matter, one big question I have is why each of these results is
> so different.
> 
> [robm@imap14 conf]$ for i in 1 2 3 4 5 6 7 8 9 10; do fallocate -l 20m
> testfile3; filefrag testfile3; /bin/rm testfile3; done

The most likely reason is that it depends on transaction boundaries.
After a block has been released, we can't reuse it until after the
jbd2 transaction which contains the deletion of the inode has
committed.  So even after you've deleted the file, we can't reuse the
blocks right away.  The other thing which will influence the block
allocation is which block group the last allocation was for that
particular file.  So if blocks become available after a commit
completes, if we've started allocating in another block group, we
won't go back to the initial block group.

Cheers,

					- Ted

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


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux