Date: Thu, 27 Mar 1997 16:27:03 +1100 From: Bruce Evans <bde@zeta.org.au> To: mpp@freefall.freebsd.org, nate@mt.sri.com Cc: current@FreeBSD.ORG Subject: Re: dumpfs patch for review Message-ID: <199703270527.QAA11307@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> fs_id[0] is a time_t value, and probably should be printed as such. >> is it the time that the file system was "randomized", either >> by newfs or fsirand. > >Ahh, OK. > >> fd_id[1] is a random number > >Ok, here's round two. It's still ugly. >Index: dumpfs.c >=================================================================== >RCS file: /home/CVS/src/sbin/dumpfs/dumpfs.c,v >retrieving revision 1.6 >diff -c -r1.6 dumpfs.c >*** dumpfs.c 1997/03/11 12:12:26 1.6 >--- dumpfs.c 1997/03/26 17:43:32 >*************** >*** 127,132 **** >--- 127,134 ---- > dev_bsize = afs.fs_fsize / fsbtodb(&afs, 1); > printf("magic\t%x\ttime\t%s", afs.fs_magic, > ctime(&afs.fs_time)); >+ printf("fsid\t%d\trndtime\t%s", >+ afs.fs_id[1], ctime((time_t *)&afs.fs_id[0])); ^^^^^^^^^^ Bogus cast. Just as wrong as the one in fsirand.c. >*************** >*** 143,153 **** > afs.fs_frag, afs.fs_fragshift, afs.fs_fsbtodb); > printf("cpg\t%d\tbpg\t%d\tfpg\t%d\tipg\t%d\n", > afs.fs_cpg, afs.fs_fpg / afs.fs_frag, afs.fs_fpg, afs.fs_ipg); >! printf("minfree\t%d%%\toptim\t%s\tmaxcontig %d\tmaxbpg\t%d\n", >! afs.fs_minfree, afs.fs_optim == FS_OPTSPACE ? "space" : "time", >! afs.fs_maxcontig, afs.fs_maxbpg); >! printf("rotdelay %dms\theadswitch %dus\ttrackseek %dus\trps\t%d\n", >! afs.fs_rotdelay, afs.fs_headswitch, afs.fs_trkseek, afs.fs_rps); > printf("ntrak\t%d\tnsect\t%d\tnpsect\t%d\tspc\t%d\n", > afs.fs_ntrak, afs.fs_nsect, afs.fs_npsect, afs.fs_spc); > printf("symlinklen %d\ttrackskew %d\tinterleave %d\tcontigsumsize %d\n", >--- 145,154 ---- > afs.fs_frag, afs.fs_fragshift, afs.fs_fsbtodb); > printf("cpg\t%d\tbpg\t%d\tfpg\t%d\tipg\t%d\n", > afs.fs_cpg, afs.fs_fpg / afs.fs_frag, afs.fs_fpg, afs.fs_ipg); >! printf("minfree\t%d%%\toptim\t%s\n", >! afs.fs_minfree, afs.fs_optim == FS_OPTSPACE ? "space" : "time"); >! printf("maxcontig %d\tmaxbpg\t%d\trotdelay %dms\trps\t%d\n", >! afs.fs_maxcontig, afs.fs_maxbpg, afs.fs_rotdelay, afs.fs_rps); > printf("ntrak\t%d\tnsect\t%d\tnpsect\t%d\tspc\t%d\n", > afs.fs_ntrak, afs.fs_nsect, afs.fs_npsect, afs.fs_spc); > printf("symlinklen %d\ttrackskew %d\tinterleave %d\tcontigsumsize %d\n", The minfree...maxbpg line shouldn't be changed. I'm now convinced that the old fields shouldn't have been reused. The above changes give wrong output on old and foreign file systems. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703270527.QAA11307>