]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix check & repair of filesystems w/ realtime vols
authorEric Sandeen <sandeen@sgi.com>
Wed, 23 Jun 2004 05:10:16 +0000 (05:10 +0000)
committerEric Sandeen <sandeen@sgi.com>
Wed, 23 Jun 2004 05:10:16 +0000 (05:10 +0000)
use of isset macro was incorrectly checking rt bitmap
use our xfs_isset macro not system's isset,
which assumes a byte-sized bitfield

db/check.c
include/irix.h
include/libxfs.h
repair/rt.c

index ad09eb3e43171860cec57aa924ea8ccca1c3664d..90b229123d66206c90d873e2043e0a4828c8979a 100644 (file)
@@ -3472,7 +3472,7 @@ process_rtbitmap(
                for (bit = 0;
                     bit < bitsperblock && extno < mp->m_sb.sb_rextents;
                     bit++, extno++) {
-                       if (isset(words, bit)) {
+                       if (xfs_isset(words, bit)) {
                                rtbno = extno * mp->m_sb.sb_rextsize;
                                set_rdbmap(rtbno, mp->m_sb.sb_rextsize,
                                        DBM_RTFREE);
index 732dadc8de150a16330aca2d5d43e1591d1a431e..8d61b30091d34ba4d31f1b32b18676b2ccdff2c9 100644 (file)
@@ -79,7 +79,6 @@ typedef flock64_t     xfs_flock64_t;
 #define UINT_MAX       UINT32_MAX
 #define PATH_MAX       MAXPATHLEN
 #define constpp                char * const *
-#define isset(a,i)     ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
 
 static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
 {
index 0e5ef4d31f9ee50b383047846e947e07e47bb28e..c971a9875edf7f394f254d4c4679d959a3cd3eeb 100644 (file)
@@ -79,6 +79,8 @@
 #define XFS_SUPER_MAGIC 0x58465342
 #endif
 
+#define xfs_isset(a,i) ((a)[(i)/(sizeof((a))*NBBY)] & (1<<((i)%(sizeof((a))*NBBY))))
+
 /*
  * Argument structure for libxfs_init().
  */
index 8514462329e7ea87534bcbf7317ea79c05c27730..63e1a4b00d4b7dee990c0525a48ee0f53382e8bf 100644 (file)
@@ -230,7 +230,7 @@ process_rtbitmap(xfs_mount_t        *mp,
                for (bit = 0;
                     bit < bitsperblock && extno < mp->m_sb.sb_rextents;
                     bit++, extno++) {
-                       if (isset(words, bit)) {
+                       if (xfs_isset(words, bit)) {
                                set_rtbno_state(mp, extno, XR_E_FREE);
                                sb_frextents++;
                                if (prevbit == 0) {