sys/vfs/hammer: Rename macros for consistency
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 7 Jul 2015 10:33:27 +0000 (19:33 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 7 Jul 2015 10:33:42 +0000 (19:33 +0900)
- Rename HAMMER_SHORT_OFF_ENCODE() to HAMMER_OFF_SHORT_ENCODE()
  and HAMMER_LONG_OFF_ENCODE() to HAMMER_OFF_LONG_ENCODE() for
  consistency with the existing macros HAMMER_OFF_SHORT_MASK
  and HAMMER_OFF_LONG_MASK.

- These two are used by ENCODE() macros and haven't been used
  independently elsewhere, so there is no effect to others.
  (if external userspace programs are using these then those
  programs are probably doing something strange)

sys/vfs/hammer/hammer_disk.h

index 1253137..53b8657 100644 (file)
@@ -186,15 +186,15 @@ typedef u_int32_t hammer_crc_t;
 #define HAMMER_VOL_DECODE(ham_off)                     \
        (int32_t)(((hammer_off_t)(ham_off) >> 52) & 255)
 
-#define HAMMER_SHORT_OFF_ENCODE(offset)                        \
+#define HAMMER_OFF_SHORT_ENCODE(offset)                        \
        ((hammer_off_t)(offset) & HAMMER_OFF_SHORT_MASK)
-#define HAMMER_LONG_OFF_ENCODE(offset)                 \
+#define HAMMER_OFF_LONG_ENCODE(offset)                 \
        ((hammer_off_t)(offset) & HAMMER_OFF_LONG_MASK)
 
 #define HAMMER_ENCODE(zone_base, vol_no, offset)       \
        ((zone_base) |                                  \
        HAMMER_VOL_ENCODE(vol_no) |                     \
-       HAMMER_SHORT_OFF_ENCODE(offset))
+       HAMMER_OFF_SHORT_ENCODE(offset))
 #define HAMMER_ENCODE_RAW_VOLUME(vol_no, offset)       \
        HAMMER_ENCODE(HAMMER_ZONE_RAW_VOLUME, vol_no, offset)
 #define HAMMER_ENCODE_RAW_BUFFER(vol_no, offset)       \