]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r243641:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 5 Dec 2012 22:47:45 +0000 (22:47 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 5 Dec 2012 22:47:45 +0000 (22:47 +0000)
commit05787cf9c397b31acd55fc5a98c2f9d178bb6263
treec2f083102c0c9a37b1902262797e2f216a9ae374
parent3ba9e4f3a5d9ed721992e1d363a50efcf5a9177f
MFC r243641:
Partially bring r242520 to ext2fs.

When a file is first being written, the dynamic block reallocation
(implemented by ext2_reallocblks) relocates the file's blocks
so as to cluster them together into a contiguous set of blocks on
the disk.

When the cluster crosses the boundary into the first indirect block,
the first indirect block is initially allocated in a position
immediately following the last direct block.  Block reallocation
would usually destroy locality by moving the indirect block out of
the way to keep the data blocks contiguous.

The issue was diagnosed long ago by Bruce Evans on ffs and surfaced
on ext2fs when block reallocaton was ported. This is only a partial
solution based on the similarities with FFS. We still require more
review of the allocation details that vary in ext2fs.

Reported by:    bde

git-svn-id: svn://svn.freebsd.org/base/stable/9@243913 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/ext2fs/ext2_alloc.c