git: usr.sbin/makefs/hammer2: Use blkno -1 for logical vnode for clarity

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Tue Apr 25 00:27:37 PDT 2023


commit aea8f7767fd608c1754389b6ebd4732e0b77015a
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Mon Apr 24 23:30:19 2023 -0700

    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.

Summary of changes:
 usr.sbin/makefs/hammer2/hammer2_buf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/aea8f7767fd608c1754389b6ebd4732e0b77015a


-- 
DragonFly BSD source repository


More information about the Commits mailing list