Oops, fix the fix for the i/o size of the fsinfo block. Its log

message explained why the size is 1 sector, but the code used a
size of 1 cluster.

I/o sizes larger than necessary may cause serious coherency problems
in the buffer cache.  Here I think there were only minor efficiency
problems, since a too-large fsinfo buffer could only get far enough
to overlap buffers for the same vnode (the device vnode), so mappings
are coherent at the page level although not at the buffer level, and
the former is probably enough due to our limited use of the fsinfo
buffer.

Approved by:	re (kensmith)
This commit is contained in:
bde 2007-08-03 23:13:50 +00:00
parent 32aa3c3c0d
commit e8377e738c
2 changed files with 2 additions and 2 deletions

View File

@ -376,7 +376,7 @@ updatefats(pmp, bp, fatbn)
+ ffs(pmp->pm_inusemap[cn / N_INUSEBITS]
^ (u_int)-1) - 1;
}
if (bread(pmp->pm_devvp, pmp->pm_fsinfo, pmp->pm_bpcluster,
if (bread(pmp->pm_devvp, pmp->pm_fsinfo, pmp->pm_BytesPerSec,
NOCRED, &bpn) != 0) {
/*
* Ignore the error, but turn off FSInfo update for the future.

View File

@ -654,7 +654,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td)
if (pmp->pm_fsinfo) {
struct fsinfo *fp;
if ((error = bread(devvp, pmp->pm_fsinfo, pmp->pm_bpcluster,
if ((error = bread(devvp, pmp->pm_fsinfo, pmp->pm_BytesPerSec,
NOCRED, &bp)) != 0)
goto error_exit;
fp = (struct fsinfo *)bp->b_data;