HAMMER: adjustments to flush on umount
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Jan 2009 00:50:18 +0000 (16:50 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 20 Jan 2009 00:50:18 +0000 (16:50 -0800)
Instead of waiting for up to 25 hammer sync sequences before giving up,
instead wait up to 25 seconds before giving up.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_vfsops.c

index 376cf14..46758e8 100644 (file)
@@ -128,6 +128,10 @@ typedef u_int32_t hammer_crc_t;
  * zone 9 (z,v,o):     Record          - actually zone-2 address
  * zone 10 (z,v,o):    Large-data      - actually zone-2 address
  * zone 15:            reserved for sanity
+ *
+ * layer1/layer2 direct map:
+ *     zzzzvvvvvvvvoooo oooooooooooooooo oooooooooooooooo oooooooooooooooo
+ *     ----111111111111 1111112222222222 222222222ooooooo oooooooooooooooo
  */
 
 #define HAMMER_ZONE_RAW_VOLUME         0x1000000000000000ULL
index 599e8e8..8bf5f2e 100644 (file)
@@ -674,6 +674,7 @@ hammer_free_hmp(struct mount *mp)
        struct hammer_mount *hmp = (void *)mp->mnt_data;
        hammer_flush_group_t flg;
        int count;
+       int dummy;
 
        /*
         * Flush anything dirty.  This won't even run if the
@@ -688,7 +689,7 @@ hammer_free_hmp(struct mount *mp)
                                kprintf("HAMMER: umount flushing.");
                        else
                                kprintf(".");
-                       tsleep(hmp, 0, "hmrufl", hz);
+                       tsleep(&dummy, 0, "hmrufl", hz);
                }
                if (count == 30) {
                        kprintf("giving up\n");