History log of /dragonfly/usr.sbin/makefs/ffs/buf.h (Results 1 – 8 of 8)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b709ee55 22-Apr-2023 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs/ffs: Remove m_buf::b_is_hammer2

FreeBSD makefs(8) now calls brelse() on bwrite(), whereas DragonFly
has had that behavior specifically for HAMMER2 to emulate VFS behavior.

m_buf::b_

usr.sbin/makefs/ffs: Remove m_buf::b_is_hammer2

FreeBSD makefs(8) now calls brelse() on bwrite(), whereas DragonFly
has had that behavior specifically for HAMMER2 to emulate VFS behavior.

m_buf::b_is_hammer2 flag which was introduced for this reason now
needs to be removed, otherwise it attempts to double free struct m_buf.

show more ...


# 02f727fe 24-Jan-2023 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Use `char *` not `void *` for buf b_data

, drop casts in msdos

Only struct m_buf change applies in this commit.
"drop casts in msdos" part had already been applied.

taken-from Fre

usr.sbin/makefs: Use `char *` not `void *` for buf b_data

, drop casts in msdos

Only struct m_buf change applies in this commit.
"drop casts in msdos" part had already been applied.

taken-from FreeBSD ef63362055dcf60ea2eb532991584c67aab911e2

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.


# 6bcbb706 24-Jan-2023 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Rename struct vnode -> m_vnode

to reduce unnecessary diff vs FreeBSD makefs.


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0
# e00b9e51 06-Jun-2022 Tomohiro Kusumi <tkusumi@netbsd.org>

usr.sbin/makefs: Rename vnode::logical,vflushed,malloced to start with v_

Almost all vnode fields in sys/sys/vnode.h start with v_,
so follow that naming rule in makefs(8) vnode as well.

These fiel

usr.sbin/makefs: Rename vnode::logical,vflushed,malloced to start with v_

Almost all vnode fields in sys/sys/vnode.h start with v_,
so follow that naming rule in makefs(8) vnode as well.

These fields are currently only used by HAMMER2.

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


Revision tags: v6.2.2, v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2
# 811c2036 10-Feb-2019 Sascha Wildner <saw@online.de>

makefs(8): DragonFly porting.

Some notes:

* UFS2 support has been disabled for now. It would require more UFS2
related pieces in our UFS kernel headers. I might look at enabling
this in the fut

makefs(8): DragonFly porting.

Some notes:

* UFS2 support has been disabled for now. It would require more UFS2
related pieces in our UFS kernel headers. I might look at enabling
this in the future.

* Our CGSIZE() macro causes issues when used in makefs(8), which is
why I'm using FreeBSD's currently.

* makefs(8) uses a local daddr_t type which is 64 bits wide, since
ours is 32 bits.

* I added cg_blks() and cg_blktot() calls in a few places because
our fsck(8) checks them in pass 5. I'm not sure if the associated
fields are actually needed anymore.

show more ...


# 5978408c 10-Feb-2019 Sascha Wildner <saw@online.de>

Bring in most of makefs(8) from FreeBSD unchanged.

To create filesystem images without kernel involvement. We can use it
to create our initrd without needing vn(4).

Originally from NetBSD.