Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs Use fsbtodb() rather than multiplying by NSPF().



details:   https://anonhg.NetBSD.org/src/rev/2843787ae93e
branches:  trunk
changeset: 525344:2843787ae93e
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Apr 10 07:46:10 2002 +0000

description:
Use fsbtodb() rather than multiplying by NSPF().

diffstat:

 sys/ufs/ffs/fs.h |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r a4fe0bf98d21 -r 2843787ae93e sys/ufs/ffs/fs.h
--- a/sys/ufs/ffs/fs.h  Wed Apr 10 06:12:04 2002 +0000
+++ b/sys/ufs/ffs/fs.h  Wed Apr 10 07:46:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fs.h,v 1.23 2002/01/07 15:25:22 lukem Exp $    */
+/*     $NetBSD: fs.h,v 1.24 2002/04/10 07:46:10 mycroft Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -475,10 +475,10 @@
 #define        blkmap(fs, map, loc) \
     (((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
 #define        cbtocylno(fs, bno) \
-    ((bno) * NSPF(fs) / (fs)->fs_spc)
+    (fsbtodb(fs, bno) / (fs)->fs_spc)
 #define        cbtorpos(fs, bno) \
-    (((bno) * NSPF(fs) % (fs)->fs_spc / (fs)->fs_nsect * (fs)->fs_trackskew + \
-     (bno) * NSPF(fs) % (fs)->fs_spc % (fs)->fs_nsect * (fs)->fs_interleave) % \
+    ((fsbtodb(fs, bno) % (fs)->fs_spc / (fs)->fs_nsect * (fs)->fs_trackskew + \
+      fsbtodb(fs, bno) % (fs)->fs_spc % (fs)->fs_nsect * (fs)->fs_interleave) % \
      (fs)->fs_nsect * (fs)->fs_nrpos / (fs)->fs_npsect)
 
 /*



Home | Main Index | Thread Index | Old Index