sys/vfs/hammer: Cleanups on undo
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 11 Mar 2015 13:57:44 +0000 (22:57 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 12 Mar 2015 13:56:01 +0000 (22:56 +0900)
- hunk1 - These macros were added in 36f82b23 in 2008 but never used.

- hunk2 - Not only zone1 but also zone2 can generate undo.

- hunk3 - Show there is no undo on undo.

sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_undo.c

index 8838d4b..0b3e611 100644 (file)
@@ -449,10 +449,6 @@ typedef struct hammer_fifo_tail *hammer_fifo_tail_t;
 #define HAMMER_HEAD_SIGNATURE  0xC84EU
 #define HAMMER_TAIL_SIGNATURE  0xC74FU
 
-#define HAMMER_HEAD_SEQ_BEG    0x80000000U
-#define HAMMER_HEAD_SEQ_END    0x40000000U
-#define HAMMER_HEAD_SEQ_MASK   0x3FFFFFFFU
-
 /*
  * Misc FIFO structures.
  *
@@ -460,7 +456,7 @@ typedef struct hammer_fifo_tail *hammer_fifo_tail_t;
  */
 struct hammer_fifo_undo {
        struct hammer_fifo_head head;
-       hammer_off_t            undo_offset;    /* zone-1 offset */
+       hammer_off_t            undo_offset;    /* zone-1,2 offset */
        int32_t                 undo_data_bytes;
        int32_t                 undo_reserved01;
        /* followed by data */
index 9e644a2..e58b68c 100644 (file)
@@ -157,6 +157,7 @@ hammer_generate_undo(hammer_transaction_t trans,
                }
                if (error)
                        break;
+               /* no undo recursion */
                hammer_modify_buffer(NULL, buffer, NULL, 0);
 
                /*