History log of /dragonfly/usr.sbin/makefs/hammer2/hammer2_xops.c (Results 1 – 3 of 3)
Revision Date Author Comments
# 00e4ae5c 11-Nov-2022 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 185ae703d726eb41fe0f44e432a9575d06b2ba45.. -- sys/vfs/hammer2/
ae4718daaa sys/vfs/

usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 185ae703d726eb41fe0f44e432a9575d06b2ba45.. -- sys/vfs/hammer2/
ae4718daaa sys/vfs/hammer2: Remove redundant "spmp->iroot = NULL;"
ee92f60939 sys/vfs/hammer2: Fix many comments
be41253d2a sys/vfs/hammer2: Rename HAMMER2_BREF_FLAG_ZERO -> HAMMER2_BREF_FLAG_UNUSED
64eadfb368 sys/vfs/hammer2: Fix incorrect reservedXXX names in ondisk structure
6feb58ab26 sys/vfs/hammer2: Minor cleanups for hammer2_disk.h
4b2ec0813c sys/vfs/hammer2: Move HAMMER2_{CHECK,COMP}_STRINGS to sbin/hammer2
cca587dd52 sys/vfs/hammer2: Move HAMMER2_METH_DEFAULT from hammer2_disk.h to hammer2.h
d21704d78e sys/vfs/hammer2: Fix a typo in a source code comment
fac0c41fdd sys/vfs/hammer2: Fix "already initialized" multi-volumes error message
6763396fd5 sys/vfs/hammer2: Remove redundant error check in hammer2_vfs_mount()
12757b74e2 sys/vfs/hammer2: Make fchain/vchain dump on last drop consistent
a011271d2d sys/vfs/hammer2: Remove comments on removed stuff
e6a1580946 sys/vfs/hammer2: Remove obsolete comment on HAMMER2_RESOLVE_RDONLY
e8e30c7644 sys/vfs/hammer2: Remove obsolete comment in hammer2_vop_readdir()
25b8f48546 sys/vfs/hammer2: #if0 hammer2_chain_lock_unhold()/hammer2_chain_unlock_hold()
b5513ad07d sys/vfs/hammer2: Use correct XOP struct in hammer2_xop_{lookup,delete}
5b691df11e sys/vfs/hammer2: hammer2_dump_chain() should belong to hammer2_chain.c
92931eab21 sys/vfs/hammer2: Use HAMMER2_PFSTYPE_NONE rather than 0
16f0b63d7f sys/vfs/hammer2: Make sure PFS exists after chain lookup on mount
4b0205e630 sys/vfs/hammer2: hammer2_ioctl_inode_{get,set} never returns error
634b6e30ca sys/vfs/hammer2: Add include guard for hammer2_xxhash.h
bc7ea12e61 sbin/hammer2: Remove HAMMER1 comment from dirhash()
47f63aa5d3 sys/vfs/hammer2: Rename hammer2_chain_core_init() -> hammer2_chain_init()
507074cda8 sys/vfs/hammer2: Change readonly purpose sysctls to CTLFLAG_RD
39b691836e sys/vfs/hammer2: Use __debugvar for RB_INSERT() result only used in KKASSERT
a4959f8900 sys/vfs/hammer2: Use __debugvar rather than trying to use it outside KASSERT
9944926ceb sys/vfs/hammer2: Avoid unused warning when !INVARIANTS

show more ...


# 8a656edf 12-Aug-2022 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

# git log --pretty="%h %s" 2d60b848f2503f28d840ceae174d07eb149ccce9.. -- sys/vfs/hammer2/
668318c124 sys/vf

usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

# git log --pretty="%h %s" 2d60b848f2503f28d840ceae174d07eb149ccce9.. -- sys/vfs/hammer2/
668318c124 sys/vfs/hammer2: Remove comment on nonexistent hammer2_pfs_moderate()
adbe992149 sys/vfs/hammer2: Remove unused pmp local variable
ebb25fd8bc sys/vfs/hammer2: Remove redundant *dev local variable
b9777b339d sys/vfs/hammer2: Remove no longer used hammer2_cluster_forcegood()
e239545684 sys/vfs/hammer2: Fix indentation
18aaa4b139 sys/vfs/hammer2: Remove unused local variables in hammer2_chain.c
fc134ad976 sys/vfs/hammer2: Remove unused pmp local variable
73503323eb sys/vfs/hammer2: Remove unused local variables in hammer2_primary_xops_thread()
26ded3a850 sys/vfs/hammer2: Remove unused smpresent local variable
353c2689d5 sys/vfs/hammer2: Remove unused local pmp variable

show more ...


# 2d60b848 04-Jun-2022 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Add HAMMER2 support

This commit adds HAMMER2 image creation support for makefs(8).
It runs newfs_hammer2(8) and then sys/vfs/hammer2 logic in userspace
to create HAMMER2 image from

usr.sbin/makefs: Add HAMMER2 support

This commit adds HAMMER2 image creation support for makefs(8).
It runs newfs_hammer2(8) and then sys/vfs/hammer2 logic in userspace
to create HAMMER2 image from a given directory.

This commit splits newfs_hammer2(8) into newfs and mkfs part simlarly
to newfs_msdos(8), so that makefs(8) can use newfs functionality.
The entire sys/vfs/hammer2 (with exception of unneeded
hammer2_{bulkfree,ccms,iocom,ioctl,msgops,synchro}.[hc] and reusable
hammer2_disk.h) is copied to usr.sbin/makefs with below modification.
It intends to have minimum amount of diff against sys/vfs/hammer2.

* Header includes are modified so that it compiles in userspace.
* VFS and other kernel functions are usually implemented as simple
stub functions in hammer2_compat.h and hammer2_buf.c, but some are
commented out.
* Kernel functions such as kprintf, kmalloc, kprintf, kstrdup, etc
are implemented using corresponding libc functions.
* Lock primitives are basically NOP, and they (should) never block
as makefs(8) is a single thread program.
* struct vnode and struct buf (the ones defined locally in makefs(8),
not sys/sys/*) have new struct members only used by HAMMER2 to
emulate VFS behavior required by HAMMER2.
* Since makefs(8) is write-only, VOP_{NRESOLVE,NCREATE,NMKDIR,NLINK,
NSYMLINK,WRITE,STRATEGY} are implemented, but other VOPs just
return EOPNOTSUPP.
* VOP_{INACTIVE,RECLAIM} may be implemented and used in future to
better emulate VFS behavior to address current limitation.
* VOP_WRITE is modified to directly call VOP_STRATEGY function.
* The XOP kernel thread is modified to act as a regular function
called from VOPs, along with simplified admin code.

It currently has following limitations.

* multi-volumes is unsupported, simply due to makefs(8) only taking 1
image file path.
* Not necessarily a limitation, but it only supports populating 1 PFS,
which is "DATA" by default. Other PFSes if any won't have anything
under the root PFS inode.
* makefs(8) process gets killed by OOM for a directory with *extremely*
large number of files, depending on available memory. This is due to
the way it currently tries to flush all chains in a single VFS_SYNC.
Supporting multiple VFS_SYNC calls by checking available memory along
the way gives chance to free unused vnodes/inodes and chains. This
may be implemented in future. This limitation is specific to HAMMER2,
as all other makefs(8) filesystems are not CoW, meaning they allow
in-place write based objects creation from a top directory to bottom
whereas HAMMER2 flushes chains in bottom-up direction.

show more ...