mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
Preferentially allocate the first indirect block in the same
cylinder group as the inode. This makes a 15% difference in read speed for files in the 96K to 500K size range.
This commit is contained in:
parent
35d9646783
commit
9f54c05286
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53996
@ -691,7 +691,7 @@ ffs_blkpref(ip, lbn, indx, bap)
|
||||
|
||||
fs = ip->i_fs;
|
||||
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
|
||||
if (lbn < NDADDR) {
|
||||
if (lbn < NDADDR + NINDIR(fs)) {
|
||||
cg = ino_to_cg(fs, ip->i_number);
|
||||
return (fs->fs_fpg * cg + fs->fs_frag);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user