diff options
author | bde <bde@FreeBSD.org> | 2007-08-03 23:13:50 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2007-08-03 23:13:50 +0000 |
commit | e8377e738c6b5d23fad5f7125437708639bc0253 (patch) | |
tree | a13a38e659fa5a5329b63a56fbdf40ee2ff2ed3e /sys/fs/msdosfs | |
parent | 32aa3c3c0da1f6b4a0dab583a48ec99fdfbaf4fa (diff) | |
download | FreeBSD-src-e8377e738c6b5d23fad5f7125437708639bc0253.zip FreeBSD-src-e8377e738c6b5d23fad5f7125437708639bc0253.tar.gz |
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)
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index dcef681..495afb0 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -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. diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index b495edb..d92188c 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -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; |