diff options
author | mckusick <mckusick@FreeBSD.org> | 1999-12-01 19:33:12 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 1999-12-01 19:33:12 +0000 |
commit | 579c93e79305fd5f203f4fb5546c42fa53c347c0 (patch) | |
tree | f128e2ee241fdde3343c5d32e48d220b57808dfa | |
parent | 0636e4261d54b2b0f427976e6858d7674d6dba3e (diff) | |
download | FreeBSD-src-579c93e79305fd5f203f4fb5546c42fa53c347c0.zip FreeBSD-src-579c93e79305fd5f203f4fb5546c42fa53c347c0.tar.gz |
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.
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 7444380..f676937 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -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); } |