Bug #1500

HAMMER undo broken for unlinked files in a PFS?

Added by qhwt+dfly about 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hi.
I'm not sure if it's new, but at the very least 2.2.x-RELEASE is unaffected.
The same problem does not occur if I perform the same operation on HAMMER
root filesystem, it's only specific to PFSes. I also tried version 1 and 2
of HAMMER filesystem, but so far I observed no differences between two
versions.

[2.2-RELEASE]
$ uname -mrs
DragonFly 2.2-RELEASE i386
$ for i in `seq 1 3`; do echo $i > a; fsync a; done
$ undo -i a
a: objid=0x00000002f3de74e0
0x000000034b1fcb60 11-Sep-2009 19:23:27
0x000000034b1fcb80 11-Sep-2009 19:23:27
0x000000034b1fcba0 11-Sep-2009 19:23:27
$ rm a;sync
$ undo -i a
a: objid=0x00000002f3de74e0
0x000000034b1fcb60 11-Sep-2009 19:23:27
0x000000034b1fcb80 11-Sep-2009 19:23:27
0x000000034b1fcba0 11-Sep-2009 19:23:27
0x000000034b1fcbe0 11-Sep-2009 19:23:36
$ undo -i .
WARNING: . was renamed at some point in the past,
attempting to continue with current version
.: objid=0x0000000346d6c1e0
0x000000034b1fcb60 11-Sep-2009 19:23:27
0x000000034b1fcbe0 11-Sep-2009 19:23:36

[-DEVELOPMENT (the kernel/world was built on Tuesday)]
$ uname -mrs
DragonFly 2.3.2-DEVELOPMENT i386
$ ls -dlo .
drwxr-xr-x 1 qhwt qhwt - 0 Sep 11 19:24 .
$ for i in `seq 1 3`; do echo $i > a; fsync a; done
$ undo -i a
a: ITERATE ENTIRE HISTORY
0x00000056c425fde0 11-Sep-2009 19:25:25
0x00000056c425fe00 11-Sep-2009 19:25:25
0x00000056c425fe20 11-Sep-2009 19:25:25
$ rm a;sync
$ undo -i a
a: ITERATE ENTIRE HISTORY: Unknown error: 0
$ undo -i .
.: ITERATE ENTIRE HISTORY: Unknown error: 0

History

#1 Updated by dillon about 5 years ago

:Hi.
:I'm not sure if it's new, but at the very least 2.2.x-RELEASE is unaffected.
:The same problem does not occur if I perform the same operation on HAMMER
:root filesystem, it's only specific to PFSes. I also tried version 1 and 2
:of HAMMER filesystem, but so far I observed no differences between two
:versions.

Ah, I think it is due to the directory optimization (HAMMER version 2).
The ioctl code doesn't know that the directory entries were moved
to a different localization. I should be able to fix it today.

-Matt

#2 Updated by qhwt+dfly about 5 years ago

Fixed in 881c6bee2f8ef57efa0a72764251e1fd60bb2673

Also available in: Atom PDF