[DragonFlyBSD - Bug #2863] HAMMER synch tid is zero

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Fri Dec 11 06:54:40 PST 2015


Issue #2863 has been updated by shamaz.


Again, it's copy-paste time.

# mount /dev/vkd1s0a /mnt/
HAMMER(TEST) recovery check seqno=000fbfff
HAMMER(TEST) recovery range 3000000000000000-3000000000000000
HAMMER(TEST) recovery nexto 3000000000000000 endseqno=000fc000
HAMMER(TEST) mounted clean, no recovery needed
# touch /mnt/me
# hammer snapq /mnt/
/mnt/@@0x0000000100008040
# touch /mnt/filename
# hammer snapq /mnt/
/mnt/@@0x00000001000080e0
# mount -u -o ro /mnt
HAMMER read-write -> read-only
# Warning: vfsync skipped 1 dirty bufs in pass2!
mount -u -o rw /mnt/
HAMMER read-only -> read-write
# Warning: vfsync skipped 1 dirty bufs in pass2!
Warning: vfsync skipped 1 dirty bufs in pass2!
hammer snapq /mnt
/mnt@@0x00000001000080e0
# touch /mnt/hammer
# hammer snapq /mnt
/mnt@@0x00000001000081a0
# hammer snapq /mnt
/mnt@@0x00000001000081a0
# umount /mnt
# mount /dev/vkd1s0a /mnt
HAMMER(TEST) recovery check seqno=000fc055
HAMMER(TEST) recovery range 3000000000007d68-3000000000007d68
HAMMER(TEST) recovery nexto 3000000000007d68 endseqno=000fc056
HAMMER(TEST) mounted clean, no recovery needed
# hammer snapq /mnt
/mnt@@0x0000000100008230
# hammer snapls /mnt
Snapshots on /mnt       PFS #0
Transaction ID          Timestamp               Note
0x0000000100008040      2015-12-11 14:28:52 UTC -
0x00000001000080e0      2015-12-11 14:29:22 UTC -
0x00000001000081a0      2015-12-11 14:30:42 UTC -
0x0000000100008230      2015-12-11 14:31:02 UTC -
# umount /mnt

As you can see, there is no zero TIDs. The problem is solved, but snapshot with TID 0x0000000100008230 actually should not be there, as there is no writes to filesystem between 0x00000001000081a0 and 0x0000000100008230. I just allocate a new TID for hmp->flusher.tid on mount in order to keep it from being 0. Unfortunately, I cannot set hmp->flusher.tid to a previous value before (re-)mount (which would be the best), because it is not stored on disk. There is two choices: ether just allocate a new tid or write a whole new function to recover hmp->flusher.tid from hmp->next_tid. Maybe you can show this to dillon to know his opinion.

----------------------------------------
Bug #2863: HAMMER synch tid is zero
http://bugs.dragonflybsd.org/issues/2863#change-12776

* Author: shamaz
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Hello. This appears on DragonFlyBSD 4.2 (and maybe newer) if you try the
following with HAMMER filesystem:

1) Create a new vnode device.
# dd if=/dev/zero of=test.img bs=1m count=15000
# vnconfig -c vn test.img
# disklabel64  -w -r vn4s0 auto
# disklabel64 -e vn4s0
Add a line like "a:      *      0     HAMMER"

2) Create a HAMMER filesystem:
newfs_hammer -f -L TEST /dev/vn4s0a

3) Mount it:
mount /dev/vn4s0a /mnt

4) Try to sync it:
hammer synctid /mnt

You will see zero sync tid (0x0000000000000000). If you try to set some
debug-related sysctls, it will get you no info at all when syncing. Also
hammer pfs-status /mnt will show that sync-end-tid does not increment in
time as it should. I am not sure if it happens with any non-root hammer FS,
or just with those based on vn pseudo disks.

---Files--------------------------------
flusher_tid.patch (492 Bytes)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list