freebsd-dev/sys/fs/msdosfs
Bruce Evans 416e232cc6 Fix clobbering of the fatchain cache for clustered i/o's when full
clustering is not done.  The bug caused extreme slowness for large
files in some cases.

There is no way to tell VOP_BMAP() how many blocks are wanted, so for
all file systems it has to waste time in some cases by searching for
more contiguous blocks than will be accessed.  For msdosfs, it also
clobbered the fatchain cache in these cases by advancing the cache to
point to the chain entry for block that won't be read.  This makes
the cache useless for the next sequential i/o (or VOP_BMAP()), so the
fat chain is searched from the beginning.  The cache only has 1 relevant
entry, so it is similarly useless for random i/o.

Fix this by only advancing the cache to point to the chain entry for
the first block that will be read.  Clustering uses results from
VOP_BMAP(), so when more than 1 block is read by clustering, the cache
is not advanced as optimally as before, but it is at most 1 cluster
size behind and searching the chain through the blocks for this cluster
doesn't take too long.
2018-12-21 21:17:45 +00:00
..
bootsect.h msdosfs: use C99 types 2017-05-19 18:13:41 +00:00
bpb.h msdosfs: use C99 types 2017-05-19 18:13:41 +00:00
denode.h msdosfs: use same max filesize #define as NetBSD and move to header 2018-07-30 20:36:51 +00:00
direntry.h Revert msdosfs MAKEFS #ifdef changes from r319870 2018-07-24 21:10:17 +00:00
fat.h Revert msdosfs MAKEFS #ifdef changes from r319870 2018-07-24 21:10:17 +00:00
msdosfs_conv.c msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
msdosfs_denode.c msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
msdosfs_fat.c msdosfs: fixes for Undefined Behavior. 2018-08-08 15:08:22 +00:00
msdosfs_iconv.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
msdosfs_lookup.c msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
msdosfs_vfsops.c Quick fix for initialization of mnt_iosize_max. (This limit controls 2018-12-21 20:12:43 +00:00
msdosfs_vnops.c Fix clobbering of the fatchain cache for clustered i/o's when full 2018-12-21 21:17:45 +00:00
msdosfsmount.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00