diff options
author | trhodes <trhodes@FreeBSD.org> | 2007-10-25 08:23:08 +0000 |
---|---|---|
committer | trhodes <trhodes@FreeBSD.org> | 2007-10-25 08:23:08 +0000 |
commit | 9d167f82e426b3c6481ebd3bcdba5afbae063a7d (patch) | |
tree | c51089d8c2600066bea1ed81ec0a5db3ae7ed506 /sys/fs | |
parent | 94fbc001c8703dcde08373077f205386188204a9 (diff) | |
download | FreeBSD-src-9d167f82e426b3c6481ebd3bcdba5afbae063a7d.zip FreeBSD-src-9d167f82e426b3c6481ebd3bcdba5afbae063a7d.tar.gz |
Remove some debugging code that, while useful, doesn't belong in the committed
version. While here, expand a macro only used once.
Discussed with/oked by: bde
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/msdosfs/denode.h | 7 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 15 |
2 files changed, 6 insertions, 16 deletions
diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index da9eca2..fbd95aa 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -132,13 +132,6 @@ struct fatcache { (dep)->de_fc[(slot)].fc_frcn = (frcn); \ (dep)->de_fc[(slot)].fc_fsrcn = (fsrcn); -#define fc_last_to_nexttolast(dep) do { \ - (dep)->de_fc[FC_NEXTTOLASTFC].fc_frcn = \ - (dep)->de_fc[FC_LASTFC].fc_frcn; \ - (dep)->de_fc[FC_NEXTTOLASTFC].fc_fsrcn = \ - (dep)->de_fc[FC_LASTFC].fc_fsrcn; \ -} while (0) - /* * This is the in memory variant of a dos directory entry. It is usually * contained within a vnode. diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index fa8741c..32da0e3e 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -72,8 +72,6 @@ static int fc_bmapcalls; /* # of times pcbmap was called */ static int fc_lmdistance[LMMAX];/* counters for how far off the last * cluster mapped entry was. */ static int fc_largedistance; /* off by more than LMMAX */ -static int fc_wherefrom, fc_whereto, fc_lastclust; -static int pm_fatblocksize; static int chainalloc(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith, u_long *retcluster, @@ -114,7 +112,6 @@ fatblock(pmp, ofs, bnp, sizep, bop) *sizep = size; if (bop) *bop = ofs % pmp->pm_fatblocksize; - pm_fatblocksize = pmp->pm_fatblocksize; } /* @@ -206,12 +203,9 @@ pcbmap(dep, findcn, bnp, cnp, sp) */ i = 0; fc_lookup(dep, findcn, &i, &cn); - if ((bn = findcn - i) >= LMMAX) { + if ((bn = findcn - i) >= LMMAX) fc_largedistance++; - fc_wherefrom = i; - fc_whereto = findcn; - fc_lastclust = dep->de_fc[FC_LASTFC].fc_frcn; - } else + else fc_lmdistance[bn]++; /* @@ -1007,7 +1001,10 @@ extendfile(dep, count, bpp, ncp, flags) return (error); } - fc_last_to_nexttolast(dep); + dep->de_fc[FC_NEXTTOLASTFC].fc_frcn = + dep->de_fc[FC_LASTFC].fc_frcn; + dep->de_fc[FC_NEXTTOLASTFC].fc_fsrcn = + dep->de_fc[FC_LASTFC].fc_fsrcn; while (count > 0) { /* * Allocate a new cluster chain and cat onto the end of the |