usr.sbin/makefs/hammer2: Use blkno -1 for logical vnode for clarity
authorTomohiro Kusumi <tkusumi@netbsd.org>
Tue, 25 Apr 2023 06:30:19 +0000 (23:30 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Tue, 25 Apr 2023 07:05:07 +0000 (00:05 -0700)
commitaea8f7767fd608c1754389b6ebd4732e0b77015a
tree8ab841f36678fe255f26b499fa88a84801c7d59d
parentb709ee55c4465fe56ef95aa90bc90307e1fbe0a6
usr.sbin/makefs/hammer2: Use blkno -1 for logical vnode for clarity

At logical vnode layer, only bio_offset from uio_offset is used,
in the same way DragonFly VFS does. Since blkno should never be used,
set it to -1.

Then the bio_offset turns into bref's data_off through chain lookup.
At physical vnode layer, bref's data_off turns into a buf associated
with dio's devvp.

At this point dio's devvp buf needs a valid blkno (but not a valid
offset as getblk/bread/bwrite functions in ffs/buf.c are based on
FreeBSD VFS) to calculate file offset within image.
usr.sbin/makefs/hammer2/hammer2_buf.c