On Thu, Jan 18, 2007 at 11:37:26PM +0100, Henk Langeveld
wrote:> When ZFS was first announced, one argument was how ZFS complexity and
> code size was actually significantly less than for instance, UFS+SVM.
>
> Over a year has passed, and I wonder how code size has grown since, with
> all of the features that have been added.
>
> Has anyone kept track of this? Would it be easy to generate such
statistics
> from the code repository?
The attached script yields the following result on the current gate:
-------------------------------------------------
UFS: kernel= 47188 user= 40045 total= 87233
SVM: kernel= 77711 user=162522 total=240233
TOTAL: kernel=124899 user=202567 total=327466
-------------------------------------------------
ZFS: kernel= 59813 user= 27932 total= 87745
-------------------------------------------------
Note that this doesn''t include ZFS-related fmd plugins or java APIs,
since UFS has no equivalent.
- Eric
--
Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
-------------- next part --------------
#!/bin/ksh
if [ "z$GATE" == "z" ]; then
GATE=/ws/onnv-gate
fi
NT=Codemgr_wsdata/nametable
cd $GATE
kfufs=`egrep ^usr/src/uts/common/.*/ufs $NT | nawk ''{print
$1}''`
kfsvm=`egrep ''^usr/src/uts/common/(io|sys)/lvm/'' $NT | nawk
''{print $1}''`
kfufs="$kfufs usr/src/uts/common/os/bio.c
usr/src/uts/common/os/fbio.c"
ufufs=`egrep ^usr/src/cmd/fs.d/ufs/ $NT | nawk ''{print $1}''`
ufsvm=`egrep ''^usr/src/(cmd|lib)/lvm/'' $NT | nawk
''{print $1}''`
klufs=`cat $kfufs | wc -l`
klsvm=`cat $kfsvm | wc -l`
ulufs=`cat $ufufs | wc -l`
ulsvm=`cat $ufsvm | wc -l`
((tlufs=klufs+ulufs))
((tlsvm=klsvm+ulsvm))
((tk=klufs+klsvm))
((tu=ulufs+ulsvm))
((tt=tk+tu))
kfzfs=`egrep ''^usr/src/uts/common/fs/zfs/'' $NT | nawk
''{print $1}''`
ufzfs=`egrep
''^usr/src/(common/|cmd/|lib/lib)(zfs|zpool|zdb|zinject)/'' $NT
|
nawk ''{print $1}''`
ufzfs_fm=`egrep ^usr/src/cmd/fm/modules/common/zfs.* $NT | nawk ''{print
$1}''`
klzfs=`cat $kfzfs | wc -l`
ulzfs=`cat $ufzfs $ufzfs_fm | wc -l`
((tlzfs=klzfs+ulzfs))
printf "-------------------------------------------------\n"
printf " UFS: kernel=%6d user=%6d total=%6d\n" $klufs $ulufs
$tlufs
printf " SVM: kernel=%6d user=%6d total=%6d\n" $klsvm $ulsvm
$tlsvm
printf "TOTAL: kernel=%6d user=%6d total=%6d\n" $tk $tu $tt
printf "-------------------------------------------------\n"
printf " ZFS: kernel=%6d user=%6d total=%6d\n" $klzfs $ulzfs
$tlzfs
printf "-------------------------------------------------\n"