git: usr.sbin/makefs/hammer2: Support recursive read for "-o R" option

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri Jun 30 01:28:58 PDT 2023


commit 5e8b0eb766966577a1da788053d7ccaa443fa222
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Tue Jun 27 01:25:15 2023 -0700

    usr.sbin/makefs/hammer2: Support recursive read for "-o R" option
    
    "-o R" option currently creates 0 byte file if a given path is
    a directory, as directory inode size is set to 0.
    
    Change this to recursively walk directories, and retrieve directories
    and regular files under that directory. Specifying "-o R=/" does
    the reverse of what makefs(8) does.
    
    It currently has following limitations.
    - Only directory and regular file are supported, other types are ignored.
    - Hard links are not ignored, but files are retrieved as different inodes
     and link count is not preserved.
    - Inode timestamp is not preserved.
    - Anything that HAMMER2 and this option support, but underlying
     file system doesn't is unsupported.

Summary of changes:
 usr.sbin/makefs/hammer2.c                | 167 +++++++++++++++++++++++--------
 usr.sbin/makefs/hammer2/hammer2.h        |   3 +
 usr.sbin/makefs/hammer2/hammer2_buf.c    |   2 +-
 usr.sbin/makefs/hammer2/hammer2_compat.h |   1 +
 usr.sbin/makefs/hammer2/hammer2_vnops.c  |  77 +++++++++++++-
 usr.sbin/makefs/makefs.8                 |   5 +-
 6 files changed, 211 insertions(+), 44 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5e8b0eb766966577a1da788053d7ccaa443fa222


-- 
DragonFly BSD source repository


More information about the Commits mailing list