cvs commit: src/sys/ufs/ffs ffs_alloc.c ffs_extern.h ffs_rawread.c
ffs_snapshot.c ffs_softdep.c ffs_vfsops.c ffs_vnops.c
src/sys/ufs/ufs inode.h ufs_vnops.c ufsmount.h
Poul-Henning Kamp
phk at FreeBSD.org
Fri Oct 29 03:15:57 PDT 2004
phk 2004-10-29 10:15:56 UTC
FreeBSD src repository
Modified files:
sys/ufs/ffs ffs_alloc.c ffs_extern.h ffs_rawread.c
ffs_snapshot.c ffs_softdep.c ffs_vfsops.c
ffs_vnops.c
sys/ufs/ufs inode.h ufs_vnops.c ufsmount.h
Log:
Move UFS from DEVFS backing to GEOM backing.
This eliminates a bunch of vnode overhead (approx 1-2 % speed
improvement) and gives us more control over the access to the storage
device.
Access counts on the underlying device are not correctly tracked and
therefore it is possible to read-only mount the same disk device multiple
times:
syv# mount -p
/dev/md0 /var ufs rw 2 2
/dev/ad0 /mnt ufs ro 1 1
/dev/ad0 /mnt2 ufs ro 1 1
/dev/ad0 /mnt3 ufs ro 1 1
Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches
things in RAM) this is not possible with read-write mounts, and the system
will correctly reject this.
Details:
Add a geom consumer and a bufobj pointer to ufsmount.
Eliminate the vnode argument from softdep_disk_prewrite().
Pick the vnode out of bp->b_vp for now. Eventually we
should find it through bp->b_bufobj->b_private.
In the mountcode, use g_vfs_open() once we have used
VOP_ACCESS() to check permissions.
When upgrading and downgrading between r/o and r/w do the
right thing with GEOM access counts. Remove all the
workarounds for not being able to do this with VOP_OPEN().
If we are the root mount, drop the exclusive access count
until we upgrade to r/w. This allows fsck of the root
filesystem and the MNT_RELOAD to work correctly.
Set bo_private to the GEOM consumer on the device bufobj.
Change the ffs_ops->strategy function to call g_vfs_strategy()
In ufs_strategy() directly call the strategy on the disk
bufobj. Same in rawread.
In ffs_fsync() we will no longer see VCHR device nodes, so
remove code which synced the filesystem mounted on it, in
case we came there. I'm not sure this code made sense in
the first place since we would have taken the specfs route
on such a vnode.
Redo the highly bogus readblock() function in the snapshot
code to something slightly less bogus: Constructing an uio
and using physio was really quite a detour. Instead just
fill in a bio and ship it down.
Revision Changes Path
1.126 +0 -3 src/sys/ufs/ffs/ffs_alloc.c
1.61 +1 -1 src/sys/ufs/ffs/ffs_extern.h
1.18 +1 -5 src/sys/ufs/ffs/ffs_rawread.c
1.89 +17 -13 src/sys/ufs/ffs/ffs_snapshot.c
1.163 +6 -24 src/sys/ufs/ffs/ffs_softdep.c
1.250 +63 -60 src/sys/ufs/ffs/ffs_vfsops.c
1.141 +2 -11 src/sys/ufs/ffs/ffs_vnops.c
1.47 +1 -0 src/sys/ufs/ufs/inode.h
1.249 +3 -7 src/sys/ufs/ufs/ufs_vnops.c
1.32 +2 -0 src/sys/ufs/ufs/ufsmount.h
More information about the cvs-src
mailing list