History log of /dragonfly/usr.sbin/makefs/hammer2/hammer2_io.c (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6b47f3ea 29-Nov-2023 Tomohiro Kusumi <tkusumi@netbsd.org>

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

Sync with following sys/vfs/hammer2 commits.
Also remove unused makefs specific function hammer2_pfs_inode_count().

$ git log --pretty="%h %s" 961db90e96d

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

Sync with following sys/vfs/hammer2 commits.
Also remove unused makefs specific function hammer2_pfs_inode_count().

$ git log --pretty="%h %s" 961db90e96d4d039edbd15dd78ecc822445405ec.. -- sys/vfs/hammer2/
bb70b93b8e sys/vfs/hammer2: Rename HAMMER2_INODE_ONRBTREE -> HAMMER2_INODE_ONHASH
ad82725233 sys/vfs/hammer2: Remove REGFILE/SOFTLINK test in hammer2_inode_create_pfs()
258074ba74 sys/vfs/hammer2: Minor cleanup
0130729cda sys/vfs/hammer2: Fix comments on comp|check macros
9046282cb0 hammer2: Use HAMMER2_CHECK_DEFAULT when creating inode
a071436b39 hammer2: Rename HAMMER2_COMP_NEWFS_DEFAULT -> HAMMER2_COMP_DEFAULT
da9dedd0a7 sys/vfs/hammer2: Remove unused lbase local variables for hammer2_calc_logical()
caf661fcf8 hammer2 - Try to reduce no-activity stalls during complex flushes
34fb48c236 hammer2 - Multitude of SMP contention fixes, work on flush
34a86030d9 sys/vfs/hammer2: Remove obsolete comments on common parent
74fa7b92b4 sys/vfs/hammer2: Remove obsolete comments on hidden inode
3a3a7c0e9c sys/vfs/hammer2: vnops need to return unix errno
2b3f93ea6d kernel - Add per-process capability-based restrictions
eeb5b5dd2c sys/vfs/hammer2: Use hammer2_off_t in hammer2_io_alloc()
68e37e5676 sys/vfs/hammer2: Fix double count of hammer2_iod_file_{read,write}
7cf689a5ea sys/vfs/hammer2: Don't fail to lockinit diolk for fchain / vchain
73da171931 sys/vfs/hammer2: Use HAMMER2_VOLUME_BYTES for volume header size
41fa929b83 sys/vfs/hammer2: Fix XOP structure used in hammer2_inode_chain_flush()
4fe5868fa3 usr.sbin/makefs/hammer2: Fix -Wunused-but-set-variable warnings on Linux

show more ...


# 556932ec 30-Sep-2023 Matthew Dillon <dillon@apollo.backplane.com>

makefs - Deconflict hammer2 function

* Deconflict and fix build


# a0373a75 14-Apr-2023 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" e49cd5358c56593a7923a00706d26dbc4e8bdaed.. -- sys/vfs/hammer2/
d6f11ef8ed sys/vfs/

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

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" e49cd5358c56593a7923a00706d26dbc4e8bdaed.. -- sys/vfs/hammer2/
d6f11ef8ed sys/vfs/hammer2: Remove unneeded (char *)bp->b_data cast
0a7ab00601 sys/vfs/hammer2: Comment out unused local variables
8fd12ec463 sys/vfs/hammer2: Remove KKASSERT expecting path to start with "/dev/"
2e3d3c15cd sys/vfs/hammer2: Use HAMMER2_ROOT_VOLUME instead of 0
9be1b0c77a Revert "sys/vfs/hammer2: Avoid void* pointer arithmetic"

show more ...


# 4e2eefe9 24-Jan-2023 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Rename struct buf -> m_buf

to reduce unnecessary diff vs FreeBSD makefs.


# 347169d4 20-Jan-2023 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" 00e4ae5c88a85b6def00615f726e7a037ba13934.. -- sys/vfs/hammer2/
3f53c53686 sys/vfs/

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

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 00e4ae5c88a85b6def00615f726e7a037ba13934.. -- sys/vfs/hammer2/
3f53c53686 sys/vfs/hammer2: Avoid void* pointer arithmetic

show more ...


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0
# 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 ...


# 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 ...