Project

General

Profile

Submit #3254

[PATCH] Add initial multi-volumes support for HAMMER2

Added by tkusumi 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
12/18/2020
Due date:
% Done:

0%

Estimated time:

Description

This commit adds initial multi-volumes support for HAMMER2. Maximum
supported volumes is 64. The feature and implementation is similar to
multi-volumes support in HAMMER1.

See commit message in below for details.
https://leaf.dragonflybsd.org/~tkusumi/diff/0001-sys-vfs-hammer2-Add-initial-multi-volumes-support-fo.patch

The patch applies on top of below commit or after.
064b66eab3015e74bb4b2ab05de363471dd314e6 ("usr.sbin/fstyp: Minor HAMMER2 fixes")

If no comments, I'll commit this in another week or so.

History

#1

Updated by dillon 6 months ago

  • Assignee set to dillon

This looks very nice! And it also looks like you are validating the volume set by checking that the fsid uuid matches. I did a quick review and came up with the following:

  • In hammer2_get_volume() you return a non-NULL vol in the case of failure, because 'vol' is assigned inside the loop. This definitely needs to be fixed to avoid corrupting the filesystem when the volume set is incomplete.

-Matt

#2

Updated by tkusumi 6 months ago

I've uploaded v2.
https://leaf.dragonflybsd.org/~tkusumi/diff/0001-sys-vfs-hammer2-Add-initial-multi-volumes-support-fo.v2.patch

  • Changed hammer2_get_volume() to panic if a volume happens to be not found.
  • A few other minor changes/cleanups.
#3

Updated by tkusumi 6 months ago

v3
https://leaf.dragonflybsd.org/~tkusumi/diff/0001-sys-vfs-hammer2-Add-initial-multi-volumes-support-fo.v3.patch

  • Changed hammer2(8) "volhdr" to print all volume headers (not just root volume).
  • A few other minor changes/cleanups.

Applies on top of the current master.

#5

Updated by liweitianux 3 months ago

  • Status changed from New to Closed

Committed in 0b7381572b131c74051832dc251604e7f77b5a54.

Also available in: Atom PDF