git: usr.sbin/makefs: Cast daddr_t to off_t before multiplication

2022-07-07 Thread Tomohiro Kusumi


commit d0a13d2ff133469dfc81f38950a52add4ff904e7
Author: Tomohiro Kusumi 
Date:   Wed Jul 6 12:43:08 2022 -0700

usr.sbin/makefs: Cast daddr_t to off_t before multiplication

Apparently some large-file systems out there, such as my powerpc64le
Linux box, define daddr_t as a 32-bit type, which is sad and stymies
cross-building disk images.  Cast daddr_t to off_t before doing
arithmetic that overflows.

taken-from FreeBSD 7ef082733bf8989797b71025ba6d597a7d17d92b

Summary of changes:
 usr.sbin/makefs/ffs/buf.c  | 4 ++--
 usr.sbin/makefs/ffs/mkfs.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Allocate extra inodes in makefs when leaving free space in UFS images

2022-07-06 Thread Tomohiro Kusumi


commit 7660903baf65c6a52d4b9ff4d5cafb460cd3c89b
Author: Tomohiro Kusumi 
Date:   Tue Jul 5 22:31:01 2022 -0700

usr.sbin/makefs: Allocate extra inodes in makefs when leaving free space in 
UFS images

By default, makefs(8) has very few spare inodes in its output images,
which is fine for static filesystems, but not so great for VM images
where many more files will be added. Make makefs(8) use the same
default settings as newfs(8) when creating images with free space --
there isn't much point to leaving free space on the image if you
can't put files there. If no free space is requested, use current
behavior of a minimal number of available inodes.

taken-from FreeBSD afb6a168f8ee08ac74769464726c396fbef83d0b

Summary of changes:
 usr.sbin/makefs/ffs.c  |  8 +++-
 usr.sbin/makefs/ffs.h  |  2 ++
 usr.sbin/makefs/ffs/mkfs.c | 18 +-
 usr.sbin/makefs/makefs.8   |  5 -
 4 files changed, 30 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7660903baf65c6a52d4b9ff4d5cafb460cd3c89b


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Fix calculation of file sizes

2022-07-06 Thread Tomohiro Kusumi


commit 214357ff39157c4bbd99df364ed6dd28c212b0c9
Author: Tomohiro Kusumi 
Date:   Tue Jul 5 21:54:34 2022 -0700

usr.sbin/makefs: Fix calculation of file sizes

When a new FS image is created we need to calculate how much space each
file is going to consume.
Fix two bugs in that logic:

1) Count the space needed for indirect blocks for large files.
1) Normally the trailing data of a file is written to a block of frag
   size, 4 kB by default.

However for files that use indirect blocks a full block is allocated,
32kB by default.  Take that into account.

Adjust size calculations to match what is done in ffs_mkfs routine:

* Depending on the UFS version the superblock is stored at a different
  offset. Take that into account.
* Add the cylinder group block size.
* All of the above has to be aligned to the block size.

Finally, Remove "ncg" variable. It's always 1 and it was used to
multiply stuff.

taken-from FreeBSD ecdc04d006de93eb343ce3b77208abd937d4f8ac

Summary of changes:
 usr.sbin/makefs/ffs.c | 50 ++
 1 file changed, 30 insertions(+), 20 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/214357ff39157c4bbd99df364ed6dd28c212b0c9


-- 
DragonFly BSD source repository


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

2022-06-06 Thread Tomohiro Kusumi


commit e00b9e51ade2c4ced7c6fd860e5e58dcbcc09907
Author: Tomohiro Kusumi 
Date:   Mon Jun 6 19:13:33 2022 +0900

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.

Summary of changes:
 usr.sbin/makefs/ffs/buf.c| 12 ++--
 usr.sbin/makefs/ffs/buf.h|  6 +++---
 usr.sbin/makefs/hammer2/hammer2_buf.c|  3 +--
 usr.sbin/makefs/hammer2/hammer2_compat.h |  6 +++---
 usr.sbin/makefs/hammer2/hammer2_inode.c  |  6 +++---
 5 files changed, 16 insertions(+), 17 deletions(-)

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


-- 
DragonFly BSD source repository


git: sbin/newfs_msdos: Add missing MAKEFS ifdefs

2022-06-05 Thread Tomohiro Kusumi


commit c589a8b83c02c783a462c59eab7d0707e9be4e5d
Author: Tomohiro Kusumi 
Date:   Sun Jun 5 03:44:48 2022 +0900

sbin/newfs_msdos: Add missing MAKEFS ifdefs

Bring in MAKEFS related conditionals from FreeBSD commits.
162ae9c834f6d9f9cb443bd62cceb23e0b5fef48
9990450e17f79ca6e59866397b979a8a344cd5d4
f775c417fd9dd29d7bd987fc1cd30c6024540312

Summary of changes:
 sbin/newfs_msdos/mkfs_msdos.c | 54 +++
 1 file changed, 44 insertions(+), 10 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Fix warnings (in FreeBSD)

2022-06-05 Thread Tomohiro Kusumi


commit 2294e82fd7832ad43f29419fe53ee40bfd1c0509
Author: Tomohiro Kusumi 
Date:   Sun Jun 5 13:56:58 2022 +0900

usr.sbin/makefs: Fix warnings (in FreeBSD)

taken from FreeBSD cc1a53bc1aea0675d64e9547cdca241612906592

Summary of changes:
 usr.sbin/makefs/ffs.c  |  2 +-
 usr.sbin/makefs/msdos/msdosfs_denode.c | 10 --
 usr.sbin/makefs/msdos/msdosfs_vnops.c  |  3 ++-
 3 files changed, 7 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2294e82fd7832ad43f29419fe53ee40bfd1c0509


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Add HAMMER2 support

2022-06-04 Thread Tomohiro Kusumi


commit 2d60b848f2503f28d840ceae174d07eb149ccce9
Author: Tomohiro Kusumi 
Date:   Sat Jun 4 20:54:35 2022 +0900

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.

Summary of changes:
 sbin/newfs_hammer2/Makefile|2 +-
 .../{newfs_hammer2.c => mkfs_hammer2.c}|  508 +-
 sbin/newfs_hammer2/mkfs_hammer2.h  |   77 +
 sbin/newfs_hammer2/newfs_hammer2.c |  784 +--
 usr.sbin/makefs/Makefile   |5 +-
 usr.sbin/makefs/ffs/buf.c  |   52 +-
 usr.sbin/makefs/ffs/buf.h  |   15 +
 usr.sbin/makefs/hammer2.c  |  824 +++
 usr.sbin/makefs/hammer2.h  |   48 +
 usr.sbin/makefs/hammer2/Makefile.inc   |   22 +
 usr.sbin/makefs/hammer2/hammer2.h  | 2091 +++
 usr.sbin/makefs/hammer2/hammer2_admin.c| 1248 
 usr.sbin/makefs/hammer2/hammer2_buf.c  |  177 +
 usr.sbin/makefs/hammer2/hammer2_chain.c| 6143 
 usr.sbin/makefs/hammer2/hammer2_cluster.c  |  760 +++
 usr.sbin/makefs/hammer2/hammer2_compat.h   |  929 +++
 usr.sbin/makefs/hammer2/hammer2_flush.c| 1550 +
 usr.sbin/makefs/hammer2/hammer2_freemap.c  | 1284 
 usr.sbin/makefs/hammer2/hammer2_inode.c| 1864 ++
 usr.sbin/makefs/hammer2/hammer2_io.c   |  918 +++
 usr.sbin/makefs/hammer2/hammer2_lz4.c  |  527 ++
 {sys/vfs => usr.sbin/makefs}/hammer2/hammer2_lz4.h |0
 .../makefs}/hammer2/hammer2_lz4_encoder.h  |0
 usr.sbin/makefs/hammer2/hammer2_ondisk.c   |  703 +++
 usr.sbin/makefs/hammer2/hammer2_strategy.c | 1610 +
 usr.sbin/makefs/hammer2/hammer2_subr.c |  482 ++
 usr.sbin/makefs/hammer2/hammer2_vfsops.c   | 3139 ++
 usr.sbin/makefs/hammer2/hammer2_vnops.c| 2871 +
 usr.sbin/makefs/hammer2/hammer2_xops.c | 1636 ++
 .../makefs}/hammer2/zlib/hammer2_zlib.h|0
 .../makefs}/hammer2/zlib/hammer2_zlib_adler32.c|0
 .../makefs/hammer2/zlib/hammer2_zlib_deflate.c | 1210 
 .../make

git: sbin/newfs_hammer2: Fix `-V 1' option

2022-06-04 Thread Tomohiro Kusumi


commit 4efe7d95b2bef41b8d3a6d1b9a134a88db637ebb
Author: Tomohiro Kusumi 
Date:   Fri Jun 3 20:12:25 2022 +0900

sbin/newfs_hammer2: Fix `-V 1' option

It's been broken since 0b7381572b131c74051832dc251604e7f77b5a54
which introduced multi-volumes. No one probably needed to create
version 1 after that.

Remove sanity check which isn't true when using sbin/hammer2/ondisk.c
from newfs_hammer2(8).

--
$ newfs_hammer2 -V 1 /dev/ad3
Volume /dev/ad3size   5.00GB
checkvolu header 0 00014000/00014000
newfs_hammer2: Volume count 1 must be 0

Summary of changes:
 sbin/hammer2/ondisk.c | 2 --
 1 file changed, 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4efe7d95b2bef41b8d3a6d1b9a134a88db637ebb


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Mostly trailing whitespace cleanups

2022-02-21 Thread Tomohiro Kusumi


commit 022bb0a9ed6967bc18e421ed074f5727e49314e0
Author: Tomohiro Kusumi 
Date:   Tue Feb 22 01:10:05 2022 +0900

sys/vfs/hammer2: Mostly trailing whitespace cleanups

Summary of changes:
 sys/vfs/hammer2/DESIGN |  2 +-
 sys/vfs/hammer2/hammer2_bulkfree.c |  4 ++--
 sys/vfs/hammer2/hammer2_chain.c|  3 +--
 sys/vfs/hammer2/hammer2_cluster.c  |  6 +++---
 sys/vfs/hammer2/hammer2_inode.c|  4 ++--
 sys/vfs/hammer2/hammer2_ioctl.c|  2 +-
 sys/vfs/hammer2/hammer2_strategy.c | 12 ++--
 sys/vfs/hammer2/hammer2_synchro.c  |  2 +-
 sys/vfs/hammer2/hammer2_vfsops.c   |  2 +-
 sys/vfs/hammer2/hammer2_xops.c |  4 ++--
 10 files changed, 20 insertions(+), 21 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/022bb0a9ed6967bc18e421ed074f5727e49314e0


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: Fix mounting when the device sector size is >512B

2022-02-19 Thread Tomohiro Kusumi


commit 08e120530f425098d15b0861e92d67afcb80d220
Author: Tomohiro Kusumi 
Date:   Sat Feb 19 02:10:06 2022 +0900

sys/vfs/msdosfs: Fix mounting when the device sector size is >512B

HugeSectors * BytesPerSec should be computed before converting
HugeSectors to a DEV_BSIZE-based count.

taken-from FreeBSD c7cd607a4e28233ab6679ee330c0a4836414bb0a

Summary of changes:
 sys/vfs/msdosfs/msdosfs_vfsops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/08e120530f425098d15b0861e92d67afcb80d220


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix hammer2_chain_allocs calculation

2022-02-19 Thread Tomohiro Kusumi


commit 263688eb126867928a2c8f7672a81c5bb53f63f6
Author: Tomohiro Kusumi 
Date:   Sat Feb 19 02:12:38 2022 +0900

sys/vfs/hammer2: Fix hammer2_chain_allocs calculation

This counter should be decremented on freeing chains.
Currently it gets incremented on chain allocation,
but only decremented via bulkfree path.

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/263688eb126867928a2c8f7672a81c5bb53f63f6


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Improve extents verification logic (partial)

2022-02-09 Thread Tomohiro Kusumi


commit d4fdf3e6c9e302edd9d89177f15930c667f37963
Author: Tomohiro Kusumi 
Date:   Thu Feb 10 00:45:06 2022 +0900

sys/vfs/ext2fs: Improve extents verification logic (partial)

Sync with ext2fs/ext2_inode_cnv.c part of diff.
Other diff hunks are for ext4 extents which isn't supported yet.

taken from FreeBSD f1d5e2c862ef599efd1705b04d505d5415b77f82

Summary of changes:
 sys/vfs/ext2fs/ext2_inode_cnv.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Add more accurate check for root inode

2022-02-08 Thread Tomohiro Kusumi


commit 7d478d3dfbb72f42d1fa01005d30a38e17ec6f2f
Author: Tomohiro Kusumi 
Date:   Wed Feb 9 00:46:33 2022 +0900

sys/vfs/ext2fs: Add more accurate check for root inode

Check that root inode has links and is directory.

taken from FreeBSD ced21728223016429242d1f7cd5e8a160c8a88cb

Summary of changes:
 sys/vfs/ext2fs/ext2_inode_cnv.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7d478d3dfbb72f42d1fa01005d30a38e17ec6f2f


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Add more accurate directory entries check

2022-02-08 Thread Tomohiro Kusumi


commit 2532d84a015ae37901f2c367db4d0c1ec99db80d
Author: Tomohiro Kusumi 
Date:   Wed Feb 9 00:20:08 2022 +0900

sys/vfs/ext2fs: Add more accurate directory entries check

Rename ext2_dirbadentry() to ext2_check_direntry(). Add directory
entry inode value check, and call ext2_check_direntry() in all cases.
The dirchk sysctl is removed.

taken from FreeBSD bb9f1ba4b55c1f566d59cc7c7d1d28dd37715984

Summary of changes:
 sys/vfs/ext2fs/ext2_lookup.c | 39 ++-
 1 file changed, 10 insertions(+), 29 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2532d84a015ae37901f2c367db4d0c1ec99db80d


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Remove unnecessary e2fs_first_dblock value check

2022-02-08 Thread Tomohiro Kusumi


commit be29200b43db1f869b1f3fc5722243207eda15ce
Author: Tomohiro Kusumi 
Date:   Wed Feb 9 00:32:14 2022 +0900

sys/vfs/ext2fs: Remove unnecessary e2fs_first_dblock value check

taken from FreeBSD 5034b44574c44d50bcb5fadec1d6aae152855bc0

Summary of changes:
 sys/vfs/ext2fs/ext2_vfsops.c | 7 ---
 1 file changed, 7 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Fix a few typos in source code comments

2022-02-07 Thread Tomohiro Kusumi


commit 2946f1738fa116a9d76b9b9b9c5657e4c2349648
Author: Tomohiro Kusumi 
Date:   Tue Feb 8 00:36:15 2022 +0900

usr.sbin/makefs: Fix a few typos in source code comments

- s/concearned/concerned/
- s/quadradically/quadratically/

taken-from FreeBSD 164fa411b9244ce3f4ae0d6f17a7f64f6b9ee941

Summary of changes:
 usr.sbin/makefs/cd9660/cd9660_write.c | 2 +-
 usr.sbin/makefs/ffs/ffs_alloc.c   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2946f1738fa116a9d76b9b9b9c5657e4c2349648


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Fix a few common typos in source code comments

2022-02-07 Thread Tomohiro Kusumi


commit f39b800bc954bee16684e380160af0419155
Author: Tomohiro Kusumi 
Date:   Tue Feb 8 01:01:22 2022 +0900

sys/vfs/ext2fs: Fix a few common typos in source code comments

- s/quadradically/quadratically/

taken-from FreeBSD 8ea3ceda7644b7b93532d0c31b50ac5fa61e51a3

Summary of changes:
 sys/vfs/ext2fs/ext2_alloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: denode some style

2022-02-05 Thread Tomohiro Kusumi


commit 3c6f531528a468eeb1a8409efdbf93bbb1c56279
Author: Tomohiro Kusumi 
Date:   Fri Feb 4 00:34:16 2022 +0900

sys/vfs/msdosfs: denode some style

taken-from FreeBSD d51b0786a2f60c3d188cae812cc0a3e0ab1a9893

Summary of changes:
 sys/vfs/msdosfs/msdosfs_denode.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3c6f531528a468eeb1a8409efdbf93bbb1c56279


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: Plug the rest of undef behavior places

2022-02-05 Thread Tomohiro Kusumi


commit b4dc4e98fc3b5dcf0525e35c00202f74d8b604c4
Author: Tomohiro Kusumi 
Date:   Sat Feb 5 01:12:08 2022 +0900

sys/vfs/msdosfs: Plug the rest of undef behavior places

There are three more places in msdosfs_fat.c which might shift one
into the sign bit.  While there, fix formatting of KASSERTs.

taken-from FreeBSD 53fcc6c96090f03c35d5e3dd4c6d0e6652c4404c

Summary of changes:
 sys/vfs/msdosfs/msdosfs_fat.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: Do no allow lookup to return vdp except for dot lookups

2022-02-02 Thread Tomohiro Kusumi


commit 6f26ce0a44c226faaf4bda2fa1f3371c5d33fa7f
Author: Tomohiro Kusumi 
Date:   Thu Feb 3 00:10:09 2022 +0900

sys/vfs/msdosfs: Do no allow lookup to return vdp except for dot lookups

taken-from FreeBSD aec97963cd03f10e04083537ed449a84a5e42f87

Summary of changes:
 sys/vfs/msdosfs/msdosfs_lookup.c | 38 --
 1 file changed, 32 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6f26ce0a44c226faaf4bda2fa1f3371c5d33fa7f


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: Sanity check sector count from BPB

2022-02-02 Thread Tomohiro Kusumi


commit 12069653227cc541aa138ed6673a81662ad67bfe
Author: Tomohiro Kusumi 
Date:   Thu Feb 3 00:59:42 2022 +0900

sys/vfs/msdosfs: Sanity check sector count from BPB

taken-from FreeBSD ba2c98389b78b548aedac0be53121df909c3fe2f

Summary of changes:
 sys/vfs/msdosfs/msdosfs_vfsops.c | 11 +++
 1 file changed, 11 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/12069653227cc541aa138ed6673a81662ad67bfe


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: Handle a case when non-dot lookup returned dvp

2022-02-01 Thread Tomohiro Kusumi


commit 9645701edcf1b66368bb79ff127ae5f0e29a6df2
Author: Tomohiro Kusumi 
Date:   Wed Feb 2 01:49:57 2022 +0900

sys/vfs/msdosfs: Handle a case when non-dot lookup returned dvp

This means that filesystem is corrupted, there is a loop.

taken-from FreeBSD 1319c433f4e5d67f8ea6fd2369c604069f733c94

Summary of changes:
 sys/vfs/msdosfs/msdosfs_lookup.c | 4 
 1 file changed, 4 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9645701edcf1b66368bb79ff127ae5f0e29a6df2


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: Take inusemap inconsistency as an error, not invariants violation

2022-02-01 Thread Tomohiro Kusumi


commit 5dd3291fafdd28db2c56c917307681b3869a11c4
Author: Tomohiro Kusumi 
Date:   Wed Feb 2 01:23:17 2022 +0900

sys/vfs/msdosfs: Take inusemap inconsistency as an error, not invariants 
violation

In other words, stop silently accepting freeing free cluster in
non-debug kernels, but return the error to the caller.  Modify callers
to handle errors from usemap_free().

taken-from FreeBSD 2c9a1c22c323b069d1f4883170349545c94b7b8d

Summary of changes:
 sys/vfs/msdosfs/msdosfs_fat.c | 33 -
 1 file changed, 24 insertions(+), 9 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/msdosfs: mountmsdosfs() some style

2022-01-31 Thread Tomohiro Kusumi


commit b346beab2a7be3daf6d3925ef23bb46710c2350b
Author: Tomohiro Kusumi 
Date:   Tue Feb 1 00:23:08 2022 +0900

sys/vfs/msdosfs: mountmsdosfs() some style

taken-from FreeBSD 04fd468da0d0baea535da418b92df74101a9659d

Summary of changes:
 sys/vfs/msdosfs/msdosfs_vfsops.c | 46 ++--
 1 file changed, 21 insertions(+), 25 deletions(-)

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


-- 
DragonFly BSD source repository


git: msdosfs: clusterfree() is used only in error handling cases

2022-01-30 Thread Tomohiro Kusumi


commit 011c75d35238f71e76c704a45cc3eab082f4b5ce
Author: Tomohiro Kusumi 
Date:   Sun Jan 30 23:30:07 2022 +0900

msdosfs: clusterfree() is used only in error handling cases

Change its return type to void, because its result is ignored in both
call sites.  Remove oldcnp argument as well, it is NULL always.

taken-from FreeBSD 65990b68a2cd89a08f0350e187df1968b16f4255

Summary of changes:
 sys/vfs/msdosfs/fat.h |  2 +-
 sys/vfs/msdosfs/msdosfs_fat.c | 13 +
 sys/vfs/msdosfs/msdosfs_vnops.c   |  2 +-
 usr.sbin/makefs/msdos/msdosfs_fat.c   | 13 +
 usr.sbin/makefs/msdos/msdosfs_vnops.c |  2 +-
 5 files changed, 13 insertions(+), 19 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/011c75d35238f71e76c704a45cc3eab082f4b5ce


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Remove set but not used variables

2022-01-30 Thread Tomohiro Kusumi


commit cbbc68fdfdc15b5cac358ab3cdbc9d076a7f3158
Author: Tomohiro Kusumi 
Date:   Mon Jan 31 00:07:01 2022 +0900

usr.sbin/makefs: Remove set but not used variables

These were leftovers from the port from NetBSD (where they are used).

taken-from FreeBSD 093cf790569775b80662926efea6d9d3464bde94

Summary of changes:
 usr.sbin/makefs/msdos.c| 2 --
 usr.sbin/makefs/msdos/msdosfs_vfsops.c | 2 --
 2 files changed, 4 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Add hammer2_ prefixed spin_[un]lock_update()

2022-01-28 Thread Tomohiro Kusumi


commit 7379b65c34b6e0a20fd9c2d407b301251be99aec
Author: Tomohiro Kusumi 
Date:   Fri Jan 28 01:03:32 2022 +0900

sys/vfs/hammer2: Add hammer2_ prefixed spin_[un]lock_update()

like any other spin lock variants.

Summary of changes:
 sys/vfs/hammer2/hammer2.h   |  2 ++
 sys/vfs/hammer2/hammer2_vnops.c | 12 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7379b65c34b6e0a20fd9c2d407b301251be99aec


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Use hammer2_ prefixed spin_init() for portability

2022-01-28 Thread Tomohiro Kusumi


commit fc6a1f2564a17f998f1cf46826c944bf711feaad
Author: Tomohiro Kusumi 
Date:   Fri Jan 28 01:02:36 2022 +0900

sys/vfs/hammer2: Use hammer2_ prefixed spin_init() for portability

Summary of changes:
 sys/vfs/hammer2/hammer2_ccms.c   |  2 +-
 sys/vfs/hammer2/hammer2_inode.c  |  2 +-
 sys/vfs/hammer2/hammer2_vfsops.c | 12 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Add missing hammer2_spin_init() for chain core

2022-01-25 Thread Tomohiro Kusumi


commit 345e2178abbf928baa5957102684128f975f0910
Author: Tomohiro Kusumi 
Date:   Tue Jan 25 01:10:10 2022 +0900

sys/vfs/hammer2: Add missing hammer2_spin_init() for chain core

This happened to be harmless, as all it does is zero initialize
some fields that are already zero.
Other spinlocks are explicitly initialized.

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c | 1 +
 1 file changed, 1 insertion(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/345e2178abbf928baa5957102684128f975f0910


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove wrong comments in hammer2_chain_core_init()

2022-01-24 Thread Tomohiro Kusumi


commit d2a0e9b447cec869b58b78390dd95ee5838fd38d
Author: Tomohiro Kusumi 
Date:   Mon Jan 24 02:00:18 2022 +0900

sys/vfs/hammer2: Remove wrong comments in hammer2_chain_core_init()

No such arguments *trans, *nchain, *ochain since
da6f36f44bb9c76612e31b56cdfe4d787e53d61f in 2014 and
23c7c7dd4e59da5bdb6ffa7fe2074c5b7ffe5e4f in 2015.

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c | 5 -
 1 file changed, 5 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Use HAMMER2_METH_DEFAULT

2021-12-28 Thread Tomohiro Kusumi


commit 9371b097511d9a0d775b7d3cc43d56a1f45d1260
Author: Tomohiro Kusumi 
Date:   Wed Dec 29 01:14:03 2021 +0900

sys/vfs/hammer2: Use HAMMER2_METH_DEFAULT

hammer2_chain_create() callers use HAMMER2_METH_DEFAULT, not '-1'.

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9371b097511d9a0d775b7d3cc43d56a1f45d1260


-- 
DragonFly BSD source repository


git: ext2fs: Remove sys/gnu/vfs/ext2fs and make sys/vfs/ext2fs the default

2021-12-07 Thread Tomohiro Kusumi


commit fcfd9e22061b8fa31303c1c21a9241afe7077238
Author: Tomohiro Kusumi 
Date:   Mon Dec 6 01:23:39 2021 +0900

ext2fs: Remove sys/gnu/vfs/ext2fs and make sys/vfs/ext2fs the default

This commit removes the old+unstable GPL ext2 implementation,
and makes the new FreeBSD based ext2 implementation
(since cfe603905713d4e92a7956678970d5dff8e913f2) the default.

- Remove sys/gnu/vfs.
- Rename sys/vfs/ext2fs/ext2fs_freebsd.ko -> ext2fs.ko.
- Modify unusual userspace program which includes kernel struct.
- Bump __DragonFly_version to 600107.

Summary of changes:
 etc/mtree/BSD.include.dist |8 +-
 include/Makefile   |3 +-
 lib/libfsid/ext2.c |   28 +-
 sys/conf/files |   28 +-
 sys/gnu/Makefile   |2 +-
 sys/gnu/vfs/Makefile   |3 -
 sys/gnu/vfs/ext2fs/COPYRIGHT.INFO  |   54 -
 sys/gnu/vfs/ext2fs/Makefile|   10 -
 sys/gnu/vfs/ext2fs/dinode.h|  133 --
 sys/gnu/vfs/ext2fs/dir.h   |  157 ---
 sys/gnu/vfs/ext2fs/ext2_alloc.c|  535 
 sys/gnu/vfs/ext2fs/ext2_balloc.c   |  311 -
 sys/gnu/vfs/ext2fs/ext2_bitops.h   |  114 --
 sys/gnu/vfs/ext2fs/ext2_bmap.c |  336 --
 sys/gnu/vfs/ext2fs/ext2_extern.h   |  121 --
 sys/gnu/vfs/ext2fs/ext2_fs.h   |  634 --
 sys/gnu/vfs/ext2fs/ext2_fs_sb.h|   84 --
 sys/gnu/vfs/ext2fs/ext2_ihash.c|  210 
 sys/gnu/vfs/ext2fs/ext2_inode.c|  573 -
 sys/gnu/vfs/ext2fs/ext2_inode_cnv.c|  136 ---
 sys/gnu/vfs/ext2fs/ext2_linux_balloc.c |  622 --
 sys/gnu/vfs/ext2fs/ext2_linux_ialloc.c |  515 
 sys/gnu/vfs/ext2fs/ext2_linux_super.c  |  133 --
 sys/gnu/vfs/ext2fs/ext2_lookup.c   | 1045 
 sys/gnu/vfs/ext2fs/ext2_mount.h|  120 --
 sys/gnu/vfs/ext2fs/ext2_quota.c|  925 --
 sys/gnu/vfs/ext2fs/ext2_readwrite.c|  291 -
 sys/gnu/vfs/ext2fs/ext2_subr.c |   83 --
 sys/gnu/vfs/ext2fs/ext2_vfsops.c   | 1241 ---
 sys/gnu/vfs/ext2fs/ext2_vnops.c| 2079 
 sys/gnu/vfs/ext2fs/fs.h|  198 ---
 sys/gnu/vfs/ext2fs/inode.h |  159 ---
 sys/gnu/vfs/ext2fs/quota.h |  200 ---
 sys/sys/param.h|3 +-
 sys/vfs/ext2fs/Makefile|2 +-
 usr.bin/fstat/ext2fs.c |6 +-
 36 files changed, 40 insertions(+), 11062 deletions(-)
 delete mode 100644 sys/gnu/vfs/Makefile
 delete mode 100644 sys/gnu/vfs/ext2fs/COPYRIGHT.INFO
 delete mode 100644 sys/gnu/vfs/ext2fs/Makefile
 delete mode 100644 sys/gnu/vfs/ext2fs/dinode.h
 delete mode 100644 sys/gnu/vfs/ext2fs/dir.h
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_alloc.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_balloc.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_bitops.h
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_bmap.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_extern.h
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_fs.h
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_fs_sb.h
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_ihash.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_inode.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_inode_cnv.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_linux_balloc.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_linux_ialloc.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_linux_super.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_lookup.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_mount.h
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_quota.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_readwrite.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_subr.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_vfsops.c
 delete mode 100644 sys/gnu/vfs/ext2fs/ext2_vnops.c
 delete mode 100644 sys/gnu/vfs/ext2fs/fs.h
 delete mode 100644 sys/gnu/vfs/ext2fs/inode.h
 delete mode 100644 sys/gnu/vfs/ext2fs/quota.h

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


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Check for e2fs_first_dblock in ext2_compute_sb_data()

2021-12-05 Thread Tomohiro Kusumi


commit d7cd4e5da13c837a602745fbbf838a15e5773350
Author: Tomohiro Kusumi 
Date:   Sun Dec 5 22:00:23 2021 +0900

sys/vfs/ext2fs: Check for e2fs_first_dblock in ext2_compute_sb_data()

This prevents a kernel panic on a damaged ext2 superblock.

taken-from FreeBSD 3dd3a395ba975d0fbe13320e6e69fb85b037da5e

Summary of changes:
 sys/vfs/ext2fs/ext2_vfsops.c | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused local variables in freemap

2021-11-21 Thread Tomohiro Kusumi


commit 9b5ac5f8a2c66835334e94732ef4a6a32507
Author: Tomohiro Kusumi 
Date:   Mon Nov 22 00:23:40 2021 +0900

sys/vfs/hammer2: Remove unused local variables in freemap

Summary of changes:
 sys/vfs/hammer2/hammer2_freemap.c | 8 
 1 file changed, 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9b5ac5f8a2c66835334e94732ef4a6a32507


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Rename **bresp -> **brefp

2021-11-21 Thread Tomohiro Kusumi


commit 7a7fe9e96e3bb965b619ba7e7ab8eab56be13b83
Author: Tomohiro Kusumi 
Date:   Sun Nov 21 21:02:19 2021 +0900

sys/vfs/hammer2: Rename **bresp -> **brefp

hammer2_blockref_t pointer is *bref, then
the double pointer should be **brefp.

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7a7fe9e96e3bb965b619ba7e7ab8eab56be13b83


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix wrong comment on freemap zone/rotation

2021-11-15 Thread Tomohiro Kusumi


commit 641a6901d8de26d56405c4347db9b8bba886a54b
Author: Tomohiro Kusumi 
Date:   Tue Nov 16 01:12:06 2021 +0900

sys/vfs/hammer2: Fix wrong comment on freemap zone/rotation

Freemaps are in every 1GB, and there are 8 rotations in each freemap.
It was 2GB and 4 when this was written in
1a7cfe5ae3c897f704a358fd3e556a55e430dcb1 in 2013.

Summary of changes:
 sys/vfs/hammer2/hammer2_freemap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/641a6901d8de26d56405c4347db9b8bba886a54b


-- 
DragonFly BSD source repository


git: sbin/fsck_msdosfs: truncate directory entry when the head pointer is invalid.

2021-11-09 Thread Tomohiro Kusumi


commit 1351cfd71b069b3338915f3ac9908051ac283d6f
Author: Tomohiro Kusumi 
Date:   Wed Nov 10 01:12:26 2021 +0900

sbin/fsck_msdosfs: truncate directory entry when the head pointer is 
invalid.

As far as we know, there is no FAT implementation that supported hard
links, and our msdosfs driver assumed one cluster chain is only
referenced by one directory entry and clears it out when the file is
deleted.  On the other hand, the current code would proceed with
checkchain() when the directory entry's head cluster is a valid numbered
cluster without checking if it was a valid head node of a cluster chain.

So if the cluster do not being a chain (e.g. CLUST_FREE, CLUST_BAD),
or was already referenced by another directory entry, this would
trigger an assertion in check_chain() at a later time.

Fix this by giving the user an option to truncate the directory entry
when the head cluster is an invalid cluster, an visited head node,
or not a head node.

taken from FreeBSD 890cae197737b463e56d1cc5a3f61f84cb49c807

Summary of changes:
 sbin/fsck_msdosfs/dir.c | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1351cfd71b069b3338915f3ac9908051ac283d6f


-- 
DragonFly BSD source repository


git: usr.sbin/fstyp: Fix intra-object buffer overread for labeled msdosfs volumes

2021-11-03 Thread Tomohiro Kusumi


commit bc425cd926be5780293e34a801f97124ce041690
Author: Tomohiro Kusumi 
Date:   Wed Nov 3 22:35:00 2021 +0900

usr.sbin/fstyp: Fix intra-object buffer overread for labeled msdosfs volumes

Volume labels, like directory entries, are padded with spaces and so
have no NUL terminator. Whilst the MIN for the dsize argument to strlcpy
ensures that the copy does not overflow the destination, strlcpy is
defined to return the number of characters in the source string,
regardless of the provided dsize, and so keeps reading until it finds a
NUL, which likely exists somewhere within the following fields, but On
CHERI with the subobject bounds enabled in the compiler this buffer
overread will be detected and trap with a bounds violation.

taken from FreeBSD
34fb1c133c5b8616f14f1d740d99747b427f5571
63d24336fd1aad81a4bdefb11d8c487cee5f88a0

Summary of changes:
 usr.sbin/fstyp/msdosfs.c | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Ignore the "tags" keyword in mtree manifests

2021-10-31 Thread Tomohiro Kusumi


commit 32357d2acfd467795886f13d62427207578d24db
Author: Tomohiro Kusumi 
Date:   Mon Nov 1 00:27:28 2021 +0900

usr.sbin/makefs: Ignore the "tags" keyword in mtree manifests

An install using -DNO_ROOT emits mtree entries containing tags used by
pkgbase.  makefs(8) can safely ignore them, so do that rather than
emitting a warning for each entry.

taken from FreeBSD ed42b22abc48ba53aaa38e1e64438b6d71e7e944

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

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/32357d2acfd467795886f13d62427207578d24db


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Fix -Wpointer-sign warnings in makefs

2021-10-31 Thread Tomohiro Kusumi


commit c3ba2018f9c7e075ad7429043b57c2fe146306d7
Author: Tomohiro Kusumi 
Date:   Mon Nov 1 00:14:25 2021 +0900

usr.sbin/makefs: Fix -Wpointer-sign warnings in makefs

UFS part taken from FreeBSD fe41c64b577251fd1df89aa6c722a877b88b402b
iso9660 part is unchanged.

Summary of changes:
 usr.sbin/makefs/ffs/ffs_subr.c | 2 +-
 usr.sbin/makefs/ffs/mkfs.c | 3 ++-
 usr.sbin/makefs/makefs.h   | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: fix use-after-free in read_mtree_keywords()

2021-10-31 Thread Tomohiro Kusumi


commit 2a7b29081fc07850383b0a851c4d32b553412522
Author: Tomohiro Kusumi 
Date:   Mon Nov 1 00:25:27 2021 +0900

usr.sbin/makefs: fix use-after-free in read_mtree_keywords()

The st variable is used as a shortcut for >inode->st, but in one
branch just before the exit we update node->inode without changing st.

taken from FreeBSD 12ad8bdb34aa990bcc4f3faa92a6e0557385d2b2

Summary of changes:
 usr.sbin/makefs/mtree.c | 2 ++
 1 file changed, 2 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2a7b29081fc07850383b0a851c4d32b553412522


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Also set UFS di_birthtime when building on Linux

2021-10-31 Thread Tomohiro Kusumi


commit a318d7ce8ac61299d56c159eec1709514389c075
Author: Tomohiro Kusumi 
Date:   Sun Oct 31 23:45:06 2021 +0900

usr.sbin/makefs: Also set UFS di_birthtime when building on Linux

Since st_birthtime doesn't exists on Linux (unless you use statx(2)),
we instead populate it with the st_ctime value.

taken from FreeBSD 1e9f67e2e4bcfb5aff72b184b5fce5f1faf3ca68

Summary of changes:
 usr.sbin/makefs/ffs.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Fix "time" mtree attribute handling

2021-10-31 Thread Tomohiro Kusumi


commit 58306fcd2a8b47e570ba1490e659bd570ce8be8a
Author: Tomohiro Kusumi 
Date:   Sun Oct 31 21:34:33 2021 +0900

usr.sbin/makefs: Fix "time" mtree attribute handling

When processing mtree(5) MANIFEST files, makefs(8) previously threw an
error if it encountered an entry whose "time" attribute contained a
non-zero subsecond component (e.g. time=1551620152.98722).

Update the handling logic to properly assign the subsecond component if
built with nanosecond support, or silently discard it otherwise.

Also, re-enable the time attribute for the kyua tests.

taken from FreeBSD 286258a9a0e39cfce79d3b072a665b88bfb422c7

Summary of changes:
 usr.sbin/makefs/mtree.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/58306fcd2a8b47e570ba1490e659bd570ce8be8a


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Improve error handling

2021-10-31 Thread Tomohiro Kusumi


commit e949eabd1a3dd3cd979a0d7426fccfb9f99b64e2
Author: Tomohiro Kusumi 
Date:   Sun Oct 31 21:30:06 2021 +0900

usr.sbin/makefs: Improve error handling

Bail out if one of the files
scheduled to go to the FS image we are making cannot be read (e.g. EPERM).
Current behaviour when we issue waring but still proceeed and return success
is definitely not correct: masking out error condition as well as making a
slighly inconsistent FS where attempt to access the file in question ends up
in EBADF.

taken from FreeBSD 781e78182da4fb382485b9cb71127a7c2a2588b0

Summary of changes:
 usr.sbin/makefs/ffs.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/makefs: Add FAT support (taken from FreeBSD)

2021-10-27 Thread Tomohiro Kusumi


commit 20f6ddd0df90767e1eba2d12dfa8e1769be7cec7
Author: Tomohiro Kusumi 
Date:   Wed Oct 27 00:21:14 2021 +0900

usr.sbin/makefs: Add FAT support (taken from FreeBSD)

Basically same as FreeBSD version, except that several denode
functions (that makefs(8) is trying to override kernel ones using
the same name) have slightly different arguments in DragonFly.

This commit adds #ifdef MAKEFS here and there in
sys/vfs/msdosfs/*.h, which is the same in FreeBSD makefs(8).

FreeBSD makefs(8) now uses m_buf and m_vnode instead of overriding
kernel structs (using that they can't be included in userspace),
but DragonFly still uses buf and vnode defined in makefs(8).

Summary of changes:
 sys/vfs/msdosfs/denode.h   |9 +-
 sys/vfs/msdosfs/direntry.h |4 +-
 sys/vfs/msdosfs/fat.h  |4 +-
 sys/vfs/msdosfs/msdosfsmount.h |   10 +-
 usr.sbin/makefs/Makefile   |3 +-
 usr.sbin/makefs/makefs.c   |1 +
 usr.sbin/makefs/makefs.h   |2 +
 usr.sbin/makefs/msdos.c|  273 +
 usr.sbin/makefs/msdos.h|   70 ++
 usr.sbin/makefs/msdos/Makefile.inc |8 +
 usr.sbin/makefs/msdos/denode.h |   40 +
 .../msdosfs => usr.sbin/makefs/msdos}/direntry.h   |   38 +-
 usr.sbin/makefs/msdos/msdosfs_conv.c   |  507 ++
 usr.sbin/makefs/msdos/msdosfs_denode.c |  376 +++
 usr.sbin/makefs/msdos/msdosfs_fat.c| 1057 
 usr.sbin/makefs/msdos/msdosfs_lookup.c |  303 ++
 usr.sbin/makefs/msdos/msdosfs_vfsops.c |  390 
 usr.sbin/makefs/msdos/msdosfs_vnops.c  |  643 
 18 files changed, 3703 insertions(+), 35 deletions(-)
 create mode 100644 usr.sbin/makefs/msdos.c
 create mode 100644 usr.sbin/makefs/msdos.h
 create mode 100644 usr.sbin/makefs/msdos/Makefile.inc
 create mode 100644 usr.sbin/makefs/msdos/denode.h
 copy {sys/vfs/msdosfs => usr.sbin/makefs/msdos}/direntry.h (85%)
 create mode 100644 usr.sbin/makefs/msdos/msdosfs_conv.c
 create mode 100644 usr.sbin/makefs/msdos/msdosfs_denode.c
 create mode 100644 usr.sbin/makefs/msdos/msdosfs_fat.c
 create mode 100644 usr.sbin/makefs/msdos/msdosfs_lookup.c
 create mode 100644 usr.sbin/makefs/msdos/msdosfs_vfsops.c
 create mode 100644 usr.sbin/makefs/msdos/msdosfs_vnops.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/20f6ddd0df90767e1eba2d12dfa8e1769be7cec7


-- 
DragonFly BSD source repository


git: sys/kern: Add fdatasync(2)

2021-09-12 Thread Tomohiro Kusumi


commit 74fa2560ac77f9db4a34b2a7c72450126fec4ed6
Author: Tomohiro Kusumi 
Date:   Sun Sep 12 01:57:53 2021 +0900

sys/kern: Add fdatasync(2)

Based on the following FreeBSD commits in 2016.
295af703a0d7987c6cf4987e7b7f5f07b3ca1221
1c1cc89580f0fbfabaf6f6c7f0f6440eef0c128e

Add the syscall and also add it to pthread's cancellation point.
The default behavior is same as fsync(2), which is fine but inefficient.

Summary of changes:
 include/unistd.h   |  2 --
 lib/libc/sys/Symbol.map|  3 +++
 lib/libthread_xu/pthread.map   |  2 ++
 lib/libthread_xu/thread/thr_syscalls.c | 18 +
 sys/kern/init_sysent.c |  1 +
 sys/kern/syscalls.c|  1 +
 sys/kern/syscalls.master   |  1 +
 sys/kern/vfs_default.c |  7 +++
 sys/kern/vfs_syscalls.c| 35 ++
 sys/kern/vfs_vopops.c  | 35 ++
 sys/sys/kern_syscall.h |  1 +
 sys/sys/param.h|  3 ++-
 sys/sys/syscall.h  |  3 ++-
 sys/sys/syscall.mk |  3 ++-
 sys/sys/sysproto.h |  4 
 sys/sys/sysunion.h |  1 +
 sys/sys/vfsops.h   | 18 +
 sys/sys/vnode.h|  1 +
 18 files changed, 126 insertions(+), 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/74fa2560ac77f9db4a34b2a7c72450126fec4ed6


-- 
DragonFly BSD source repository


git: sys/kern: Move vop_stdallocate() within vfs_default.c

2021-09-11 Thread Tomohiro Kusumi


commit 815bacc95516b55f0c2bfd9eb2be96f8b0f2a6f8
Author: Tomohiro Kusumi 
Date:   Sun Sep 12 00:40:04 2021 +0900

sys/kern: Move vop_stdallocate() within vfs_default.c

vop_allocate stuff are usually placed after vop_markatime,
but looking at vfs_default.c this std function should probably
be the last.

Summary of changes:
 sys/kern/vfs_default.c | 222 -
 1 file changed, 111 insertions(+), 111 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/815bacc95516b55f0c2bfd9eb2be96f8b0f2a6f8


-- 
DragonFly BSD source repository


git: sys/kern: Add posix_fallocate(2)

2021-09-08 Thread Tomohiro Kusumi


commit 09d96b9c7c1b6575f2ca53ae7c03876bdfa2413b
Author: Tomohiro Kusumi 
Date:   Wed Sep 8 23:09:44 2021 +0900

sys/kern: Add posix_fallocate(2)

Based on the initial posix_fallocate(2) implementation in FreeBSD
from d91f88f7f38078ac6dd4b0f0e77470d605d1518e in 2011.

There is nothing special or efficient about the default behavior.
VFS has no knowledge of fs details.

Summary of changes:
 lib/libc/sys/Symbol.map  |   3 ++
 sys/kern/init_sysent.c   |   1 +
 sys/kern/syscalls.c  |   1 +
 sys/kern/syscalls.master |   1 +
 sys/kern/vfs_default.c   | 113 +++
 sys/kern/vfs_syscalls.c  |  55 +++
 sys/kern/vfs_vopops.c|  33 ++
 sys/sys/fcntl.h  |   2 -
 sys/sys/kern_syscall.h   |   1 +
 sys/sys/param.h  |   3 +-
 sys/sys/syscall.h|   3 +-
 sys/sys/syscall.mk   |   3 +-
 sys/sys/sysproto.h   |   6 +++
 sys/sys/sysunion.h   |   1 +
 sys/sys/vfsops.h |  17 +++
 sys/sys/vnode.h  |   1 +
 16 files changed, 239 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/09d96b9c7c1b6575f2ca53ae7c03876bdfa2413b


-- 
DragonFly BSD source repository


git: usr.sbin/fstyp: Add BeFS support

2021-08-27 Thread Tomohiro Kusumi


commit 6025be5878fc8286162a074592be39505968dbee
Author: Tomohiro Kusumi 
Date:   Fri Aug 27 00:04:26 2021 +0900

usr.sbin/fstyp: Add BeFS support

from FreeBSD 0e92585cde5101506720ca1b904372317b7d84b6

Summary of changes:
 usr.sbin/fstyp/Makefile   |  2 +-
 usr.sbin/{autofs/token.l => fstyp/befs.c} | 59 +--
 usr.sbin/fstyp/fstyp.8|  6 ++--
 usr.sbin/fstyp/fstyp.c|  1 +
 usr.sbin/fstyp/fstyp.h|  1 +
 5 files changed, 40 insertions(+), 29 deletions(-)
 copy usr.sbin/{autofs/token.l => fstyp/befs.c} (68%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6025be5878fc8286162a074592be39505968dbee


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Correct a typo in an error message

2021-08-27 Thread Tomohiro Kusumi


commit cde80429c4bb1c8b293920dd0528753302218da8
Author: Tomohiro Kusumi 
Date:   Thu Aug 26 23:15:07 2021 +0900

sys/vfs/ext2fs: Correct a typo in an error message

from FreeBSD 47f880ebeb3092b1b7bbc6d75e82532e43bbf010

Summary of changes:
 sys/vfs/ext2fs/ext2_vfsops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sbin/hammer2: Fix total_size inconsistency check

2021-08-11 Thread Tomohiro Kusumi


commit c5fda8154f8b7af35a1c76971fac62ae925e3cb6
Author: Tomohiro Kusumi 
Date:   Tue Aug 10 15:18:57 2021 +0900

sbin/hammer2: Fix total_size inconsistency check

This should be errx(). The ondisk total_size != sum of volumes
means total_size is corrupted or volume(s) missing, regardless of
<4 bad volume headers.

Summary of changes:
 sbin/hammer2/ondisk.c | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

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


-- 
DragonFly BSD source repository


git: sbin/hammer2: Silence -Waddress-of-packed-member warnings

2021-08-11 Thread Tomohiro Kusumi


commit bc092eeff3c6f3eaf4bf1c3cd75c47c317ced9fe
Author: Tomohiro Kusumi 
Date:   Tue Aug 10 06:35:52 2021 +0900

sbin/hammer2: Silence -Waddress-of-packed-member warnings

Not a problem on x86_64, but silence warnings caused by callers
passing address of packed (possibly unaligned) struct fields.

Summary of changes:
 sbin/fsck_hammer2/test.c   | 19 ---
 sbin/hammer2/cmd_debug.c   | 22 ++
 sbin/hammer2/cmd_info.c|  4 +++-
 sbin/hammer2/ondisk.c  | 11 +++
 sbin/hammer2/print_inode.c | 15 +--
 5 files changed, 45 insertions(+), 26 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Fix incorrect VFS_VGET() argument in ext2_fhtovp()

2021-07-24 Thread Tomohiro Kusumi


commit f241f77e618b922710488641e753c169d8a60a77
Author: Tomohiro Kusumi 
Date:   Sat Jul 24 01:34:50 2021 +0900

sys/vfs/ext2fs: Fix incorrect VFS_VGET() argument in ext2_fhtovp()

A bug introduced when porting from FreeBSD.

Summary of changes:
 sys/vfs/ext2fs/ext2_vfsops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix bulkfree message/comments on old ondisk format

2021-07-22 Thread Tomohiro Kusumi


commit 63a8b78d9f23c88ed00fd8329b54c6e067a9dcf8
Author: Tomohiro Kusumi 
Date:   Fri Jul 23 02:09:34 2021 +0900

sys/vfs/hammer2: Fix bulkfree message/comments on old ondisk format

in addition to b0ac2d2999bc7ac111dbb5ffbc0f7ffbb4c92988.
The bulkfree descriptions written in 2015 or before were not uptodate
with the current ondisk spec.

freemap leaf block: 64KB -> 32KB (out of 64KB)
freemap level0: 2MB -> 4MB
freemap level1: 2GB -> 1GB

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/63a8b78d9f23c88ed00fd8329b54c6e067a9dcf8


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix "2MB segs cleaned" message to 4MB

2021-07-21 Thread Tomohiro Kusumi


commit b0ac2d2999bc7ac111dbb5ffbc0f7ffbb4c92988
Author: Tomohiro Kusumi 
Date:   Thu Jul 22 02:54:33 2021 +0900

sys/vfs/hammer2: Fix "2MB segs cleaned" message to 4MB

HAMMER2_FREEMAP_LEVEL0_RADIX was 21 (now 22) when this message
first appeared in d0fcd3ec4a1cbbfa32581cf24ecd6f3509f1f57c in 2015.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Rename hammer2_bulk_scan() to hammer2_bulkfree_scan()

2021-07-21 Thread Tomohiro Kusumi


commit 76fc35db470b1d22b717b080356cfc83971ae407
Author: Tomohiro Kusumi 
Date:   Thu Jul 22 01:03:28 2021 +0900

sys/vfs/hammer2: Rename hammer2_bulk_scan() to hammer2_bulkfree_scan()

Sync with function name in kprintf messages.
This was also the only function without "free" prefix.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/76fc35db470b1d22b717b080356cfc83971ae407


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_chain_save::pri

2021-07-21 Thread Tomohiro Kusumi


commit bfdcc5989fee49d9ae36bae9aae076f1f563f560
Author: Tomohiro Kusumi 
Date:   Thu Jul 22 00:04:10 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_chain_save::pri

Never used since first appeared in 125966e80c1aba734d3d5f12a8fcfde2bbcdb018 
in 2015.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 1 -
 1 file changed, 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_bulkfree_info::saved_mirror_tid

2021-07-21 Thread Tomohiro Kusumi


commit f9255826e3efc02aae9bdda17a407bb81d82668c
Author: Tomohiro Kusumi 
Date:   Thu Jul 22 00:22:00 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_bulkfree_info::saved_mirror_tid

No longer used since c8c0a18a66946d3ec5fd24de73f593da9c4af6ba in 2017.

Summary of changes:
 sys/vfs/hammer2/hammer2_bulkfree.c | 3 ---
 1 file changed, 3 deletions(-)

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


-- 
DragonFly BSD source repository


git: sbin/hammer2: Print freemap leaf's linear offset when "show"

2021-07-18 Thread Tomohiro Kusumi


commit 66b8e023faf81dca5a7f84d8eec956d797b9da9b
Author: Tomohiro Kusumi 
Date:   Sun Jul 18 01:23:28 2021 +0900

sbin/hammer2: Print freemap leaf's linear offset when "show"

Summary of changes:
 sbin/hammer2/cmd_debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/66b8e023faf81dca5a7f84d8eec956d797b9da9b


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix compilation when HAMMER2_IO_DEBUG enabled

2021-07-17 Thread Tomohiro Kusumi


commit cba5eccd875f1ec8aa76dd0ae5103b287f6e23b9
Author: Tomohiro Kusumi 
Date:   Fri Jul 16 01:45:08 2021 +0900

sys/vfs/hammer2: Fix compilation when HAMMER2_IO_DEBUG enabled

No such field debug_data in struct hammer2_io.

Summary of changes:
 sys/vfs/hammer2/hammer2_io.c | 2 ++
 1 file changed, 2 insertions(+)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: #if0 incomplete HAMMER2_FREEMAP_{DOMAYFREE, DOREALFREE} related

2021-07-17 Thread Tomohiro Kusumi


commit cfde014494a5f6b6c452bf296cc827bd2697c80b
Author: Tomohiro Kusumi 
Date:   Thu Jul 15 01:12:28 2021 +0900

sys/vfs/hammer2: #if0 incomplete HAMMER2_FREEMAP_{DOMAYFREE,DOREALFREE} 
related

Disable related code in addition to already #if0'd parts.

Neither "how == HAMMER2_FREEMAP_DOMAYFREE" nor "how == 
HAMMER2_FREEMAP_DOREALFREE"
happen. Looks like these weren't completely implemented since first
appeared in 10136ab6cde1969ab6ca22168b2a10ed5d9cc557 in 2013.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 2 ++
 sys/vfs/hammer2/hammer2_freemap.c | 4 
 2 files changed, 6 insertions(+)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused HAMMER2_XOP_IROOT

2021-07-17 Thread Tomohiro Kusumi


commit a7bb180bab3b5111dc7ad6f0fae394e530bffc0d
Author: Tomohiro Kusumi 
Date:   Tue Jul 13 02:02:23 2021 +0900

sys/vfs/hammer2: Remove unused HAMMER2_XOP_IROOT

Never used since first appeared in 6f445d15835c6677a0a79c8d168ef44d0b9b22c3 
in 2018.
Also remove a comment for nonexistent HAMMER2_XOP_RECURSE.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 2 --
 1 file changed, 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused HAMMER2_OFFSET_{MIN,MAX}

2021-07-11 Thread Tomohiro Kusumi


commit 7be2bcd461fd29f67cdfb0bb927fcb2c4dda3b41
Author: Tomohiro Kusumi 
Date:   Thu Jul 8 02:18:06 2021 +0900

sys/vfs/hammer2: Remove unused HAMMER2_OFFSET_{MIN,MAX}

Never used since first appeared in 504565062f34ec55037ac0cf308fe3562f091460 
in 2014.

Summary of changes:
 sys/vfs/hammer2/hammer2_disk.h | 2 --
 1 file changed, 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7be2bcd461fd29f67cdfb0bb927fcb2c4dda3b41


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Use HAMMER2_IND_COUNT_XXX

2021-07-07 Thread Tomohiro Kusumi


commit eadf1e6edecd0c6813085fce22defd9e7fd68de8
Author: Tomohiro Kusumi 
Date:   Mon Jul 5 02:32:28 2021 +0900

sys/vfs/hammer2: Use HAMMER2_IND_COUNT_XXX

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c | 6 +++---
 sys/vfs/hammer2/hammer2_disk.h  | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: HAMMER2_CHAIN_BMAP* should be HAMMER2_CHAIN_BLKMAP*

2021-07-07 Thread Tomohiro Kusumi


commit b70cecb798447d052d6e5ac455962fc0c3a4b051
Author: Tomohiro Kusumi 
Date:   Mon Jul 5 01:30:10 2021 +0900

sys/vfs/hammer2: HAMMER2_CHAIN_BMAP* should be HAMMER2_CHAIN_BLKMAP*

The freemap code uses "bmap" and "BMAP" for bitmap,
so these two macros should be "BLKMAP" as the comment implies.

Summary of changes:
 sys/vfs/hammer2/hammer2.h   |  8 
 sys/vfs/hammer2/hammer2_chain.c | 34 +-
 sys/vfs/hammer2/hammer2_flush.c | 14 +++---
 3 files changed, 28 insertions(+), 28 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix function name in xop kprintf's

2021-07-04 Thread Tomohiro Kusumi


commit e1dcd957e5d66b342fa838ce852361d2ec3d6346
Author: Tomohiro Kusumi 
Date:   Sun Jul 4 01:54:09 2021 +0900

sys/vfs/hammer2: Fix function name in xop kprintf's

Summary of changes:
 sys/vfs/hammer2/hammer2_xops.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: #if0 unused HAMMER2_DIRHASH_{HIMASK,FORCED}

2021-07-04 Thread Tomohiro Kusumi


commit e632e5af5a7405daa3e4aa924bcd99662a4249b9
Author: Tomohiro Kusumi 
Date:   Sun Jul 4 02:50:42 2021 +0900

sys/vfs/hammer2: #if0 unused HAMMER2_DIRHASH_{HIMASK,FORCED}

HIMASK was no longer used since e028fa747e9825425f74da7e9c57a50a82b48e82 in 
2012.
FORCED bit was never used since first appeared in above commit.

Only LOMASK bits are relevant for dirent lookup.

Summary of changes:
 sys/vfs/hammer2/hammer2_disk.h | 2 ++
 1 file changed, 2 insertions(+)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Move cache_xops global variable to hammer2_admin.c

2021-07-02 Thread Tomohiro Kusumi


commit c96b5d1011730eac636eff35209cb53f1362ed01
Author: Tomohiro Kusumi 
Date:   Sat Jul 3 02:55:42 2021 +0900

sys/vfs/hammer2: Move cache_xops global variable to hammer2_admin.c

Not much to do with vnops.

Summary of changes:
 sys/vfs/hammer2/hammer2_admin.c | 2 ++
 sys/vfs/hammer2/hammer2_vnops.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Avoid two hammer2_knote() implementation

2021-07-02 Thread Tomohiro Kusumi


commit 0a27f7ce96abc9f5191d90363b7fcdeccdf95c60
Author: Tomohiro Kusumi 
Date:   Sat Jul 3 02:19:13 2021 +0900

sys/vfs/hammer2: Avoid two hammer2_knote() implementation

Summary of changes:
 sys/vfs/hammer2/hammer2.h   | 8 
 sys/vfs/hammer2/hammer2_inode.c | 8 
 sys/vfs/hammer2/hammer2_vnops.c | 8 
 3 files changed, 8 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0a27f7ce96abc9f5191d90363b7fcdeccdf95c60


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Fix volhdrno initialization bug

2021-06-26 Thread Tomohiro Kusumi


commit 75d9730a687fcff22414364698e4ba023b466437
Author: Tomohiro Kusumi 
Date:   Sun Jun 27 01:14:18 2021 +0900

sys/vfs/hammer2: Fix volhdrno initialization bug

While hammer2_init_volumes() returned correct root volume header,
hmp->volhdrno was always initialized with 0.

This resulted in always flushing volume header in 1->2->3->0->... order,
instead of starting off from where previous mount had written +1.

Summary of changes:
 sys/vfs/hammer2/hammer2.h| 1 +
 sys/vfs/hammer2/hammer2_ondisk.c | 2 ++
 sys/vfs/hammer2/hammer2_vfsops.c | 4 ++--
 3 files changed, 5 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/75d9730a687fcff22414364698e4ba023b466437


-- 
DragonFly BSD source repository


git: sbin/hammer2: Introduce HAMMER2_SHOW_ALL_VOLUME_HEADERS to show all volhdrs when -q

2021-06-26 Thread Tomohiro Kusumi


commit d490438fc14a707977eb2091b58c3636b0f556aa
Author: Tomohiro Kusumi 
Date:   Sat Jun 26 02:21:11 2021 +0900

sbin/hammer2: Introduce HAMMER2_SHOW_ALL_VOLUME_HEADERS to show all volhdrs 
when -q

Previously only VerboseOpt>=3 printed all volume headers,
and because of this quiet mode could only print best zone.

Summary of changes:
 sbin/hammer2/cmd_debug.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: sbin/hammer2: Introduce HAMMER2_SHOW_MIN_XXX_TID to limit blockrefs

2021-06-24 Thread Tomohiro Kusumi


commit 71782ce36f3953b7ba35612c81b8c60a4fe10fa1
Author: Tomohiro Kusumi 
Date:   Wed Jun 23 01:24:07 2021 +0900

sbin/hammer2: Introduce HAMMER2_SHOW_MIN_XXX_TID to limit blockrefs

Blockrefs with smaller tid are ignored as if HAMMER2_BREF_TYPE_EMPTY.
The default is 0 which means it prints all blockrefs.

Summary of changes:
 sbin/hammer2/cmd_debug.c | 25 +
 1 file changed, 25 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/71782ce36f3953b7ba35612c81b8c60a4fe10fa1


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused HAMMER2_INODE_METAGOOD

2021-06-21 Thread Tomohiro Kusumi


commit 8e4aa7a7b0029b6176f7dc64eed96b636aa24922
Author: Tomohiro Kusumi 
Date:   Tue Jun 22 02:19:33 2021 +0900

sys/vfs/hammer2: Remove unused HAMMER2_INODE_METAGOOD

This appeared in 7a9b14a0e3b0630905b28addf32dfdef68b39014 in 2015,
but was only used for kasserts which never failed as it was always set.

Summary of changes:
 sys/vfs/hammer2/hammer2.h   | 2 +-
 sys/vfs/hammer2/hammer2_inode.c | 2 --
 sys/vfs/hammer2/hammer2_subr.c  | 2 --
 3 files changed, 1 insertion(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8e4aa7a7b0029b6176f7dc64eed96b636aa24922


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused HAMMER2_INODE_SROOT

2021-06-21 Thread Tomohiro Kusumi


commit 7b47769b5466e2a133fc43a93021156ac1036303
Author: Tomohiro Kusumi 
Date:   Tue Jun 22 02:07:17 2021 +0900

sys/vfs/hammer2: Remove unused HAMMER2_INODE_SROOT

No longer used since 504565062f34ec55037ac0cf308fe3562f091460 in 2014.

Summary of changes:
 sys/vfs/hammer2/hammer2.h   | 2 +-
 sys/vfs/hammer2/hammer2_inode.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7b47769b5466e2a133fc43a93021156ac1036303


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove if0'd HAMMER2_TRANS_PREFLUSH

2021-06-21 Thread Tomohiro Kusumi


commit 55e28d189990229c33c6aa2e7933bcf91f6213af
Author: Tomohiro Kusumi 
Date:   Tue Jun 22 01:31:57 2021 +0900

sys/vfs/hammer2: Remove if0'd HAMMER2_TRANS_PREFLUSH

This no longer exists since 2085215738c03d949e60de63843cb91e84836eb9 in 
2016.

Summary of changes:
 sys/vfs/hammer2/hammer2_flush.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/55e28d189990229c33c6aa2e7933bcf91f6213af


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused FLUSH_DEBUG

2021-06-21 Thread Tomohiro Kusumi


commit fb431ac42365f2163f6ad5e978d63c4016848701
Author: Tomohiro Kusumi 
Date:   Tue Jun 22 00:20:08 2021 +0900

sys/vfs/hammer2: Remove unused FLUSH_DEBUG

No longer used since 8138a154be31c3db1d8bd046ca7b003a6c79c01c in 2014.

Summary of changes:
 sys/vfs/hammer2/hammer2_flush.c | 2 --
 1 file changed, 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove redundant local dedup mask variable initialization

2021-06-20 Thread Tomohiro Kusumi


commit bed1f76bab37a278bbe6976dfe768b6ea6adaa16
Author: Tomohiro Kusumi 
Date:   Sun Jun 20 00:34:07 2021 +0900

sys/vfs/hammer2: Remove redundant local dedup mask variable initialization

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 1 -
 1 file changed, 1 deletion(-)

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


-- 
DragonFly BSD source repository


Re: git: hammer2 - Fix growfs issue with multi-volume support + one other bug

2021-06-15 Thread Tomohiro Kusumi
2021年6月15日(火) 5:20 Matthew Dillon :
>
>
> commit 0ed77c0451fd8246c4e40d07fd0562fc21eada3d
> Author: Matthew Dillon 
> Date:   Mon Jun 14 13:16:59 2021 -0700
>
> hammer2 - Fix growfs issue with multi-volume support + one other bug
>
> * A hammer2 filesystem versioned for multi-volume support checks
>   voldata.total_size, but growfs was never modified to adjust
>   the total_size field.
>
>   Fix this by having growfs properly adjust the total_size field.

multi-volumes mount still doesn't support growfs ioctl as it returns EOPNOTSUPP.
Since hmp->devvp is a root volume, growfs implementation works only if
hmp->devvp is the last one, which basically means it's a single volume
mount.


> * An older bug... growfs was not zeroing any new volume headers
>   when extending the filesystem in such a way as additional volume
>   headers are needed.
>
>   Fix by properly zeroing these headers (mount will complain until
>   hammer2 cycles through all four but that's ok).
>
> * Also fix an older bug, modifications to only the volume header could
>   be flushed without bumping mirror_tid, causing confusion later
>   on if the filesystem is unmounted and remounted.
>
>   Fix this by having hammer2_voldata_modify() set mirror_tid in the
>   vchain in the same manner that hammer2_chain_modify() does for
>   a chain.  e.g.:
>
>   hmp->vchain.bref.mirror_tid = hmp->voldata.mirror_tid + 1;
>
> Summary of changes:
>  sys/vfs/hammer2/hammer2_ioctl.c  | 26 ++
>  sys/vfs/hammer2/hammer2_vfsops.c |  9 +
>  2 files changed, 31 insertions(+), 4 deletions(-)
>
> http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0ed77c0451fd8246c4e40d07fd0562fc21eada3d
>
>
> --
> DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_flush_info::debug

2021-06-15 Thread Tomohiro Kusumi


commit 556042eaa0998d8eadc98c98187a6b356212983c
Author: Tomohiro Kusumi 
Date:   Mon Jun 14 01:12:07 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_flush_info::debug

No longer used since 850d3f60f0a03e7a3f08357489acac749d6224ca in 2017.
Remove the entire "hammer2_debug & 0x200" code around this as well.

Summary of changes:
 sys/vfs/hammer2/hammer2_flush.c | 24 +++-
 1 file changed, 3 insertions(+), 21 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/556042eaa0998d8eadc98c98187a6b356212983c


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_thread::depth

2021-06-12 Thread Tomohiro Kusumi


commit fc4d71d734534edbb04641aec403eac8c7d8b745
Author: Tomohiro Kusumi 
Date:   Sun Jun 13 04:06:59 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_thread::depth

No longer used since 01d71aa5538cba09383737ddbea2fb05e1e75e78 in 2015.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 1 -
 1 file changed, 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused rdok/wrok helper inline functions

2021-06-12 Thread Tomohiro Kusumi


commit f61fbe920dc9b804b5687a7388ef37431638242a
Author: Tomohiro Kusumi 
Date:   Sun Jun 13 00:03:06 2021 +0900

sys/vfs/hammer2: Remove unused rdok/wrok helper inline functions

Appeared in 23c7c7dd4e59da5bdb6ffa7fe2074c5b7ffe5e4f in 2015,
but never used for anything.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 38 ++
 1 file changed, 2 insertions(+), 36 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_pfs::lock_nlink

2021-06-12 Thread Tomohiro Kusumi


commit e8be6d078a36829b2c255b7fd01d5e3bb3e58b95
Author: Tomohiro Kusumi 
Date:   Sun Jun 13 03:22:00 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_pfs::lock_nlink

No longer used since cf1b3fafd1f08bd3a18fc9af3c431c48f600eb32 in 2016.

Summary of changes:
 sys/vfs/hammer2/hammer2.h| 1 -
 sys/vfs/hammer2/hammer2_vfsops.c | 1 -
 2 files changed, 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove nonexistent struct name

2021-06-11 Thread Tomohiro Kusumi


commit 371f808146db3306c605587d10636cdf77fb9eb6
Author: Tomohiro Kusumi 
Date:   Sat Jun 12 03:32:28 2021 +0900

sys/vfs/hammer2: Remove nonexistent struct name

struct hammer2_span never existed.
struct hammer2_msg was removed in 3a5aa68f9b693d86f3b5d5ac9191035f09d18b3e 
in 2012.
struct hammer2_cluster and hammer2_thread don't need to be declared here.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 4 
 1 file changed, 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/371f808146db3306c605587d10636cdf77fb9eb6


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_worker_rmask

2021-06-11 Thread Tomohiro Kusumi


commit a67eeef494d3c3e4857e8a00879391c966f544d6
Author: Tomohiro Kusumi 
Date:   Sat Jun 12 02:30:11 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_worker_rmask

No longer used since d3896cc42394a330f93ed9dfd1906a476776 in 2021.

Summary of changes:
 sys/vfs/hammer2/hammer2.h| 1 -
 sys/vfs/hammer2/hammer2_vfsops.c | 3 ---
 2 files changed, 4 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused (add used) header includes

2021-06-11 Thread Tomohiro Kusumi


commit c12cfc4ad07eb9a5d7d3b0c346f718520ed82b99
Author: Tomohiro Kusumi 
Date:   Sat Jun 12 02:16:25 2021 +0900

sys/vfs/hammer2: Remove unused (add used) header includes

Summary of changes:
 sys/vfs/hammer2/hammer2.h  |  8 +++-
 sys/vfs/hammer2/hammer2_bulkfree.c |  4 
 sys/vfs/hammer2/hammer2_ccms.c |  4 
 sys/vfs/hammer2/hammer2_chain.c|  3 +--
 sys/vfs/hammer2/hammer2_cluster.c  |  2 --
 sys/vfs/hammer2/hammer2_flush.c|  3 ++-
 sys/vfs/hammer2/hammer2_freemap.c  |  4 
 sys/vfs/hammer2/hammer2_inode.c|  1 +
 sys/vfs/hammer2/hammer2_iocom.c| 12 +---
 sys/vfs/hammer2/hammer2_ioctl.c|  2 ++
 sys/vfs/hammer2/hammer2_msgops.c   |  6 --
 sys/vfs/hammer2/hammer2_ondisk.c   |  2 +-
 sys/vfs/hammer2/hammer2_strategy.c |  7 ---
 sys/vfs/hammer2/hammer2_subr.c |  1 -
 sys/vfs/hammer2/hammer2_vfsops.c   | 13 ++---
 sys/vfs/hammer2/hammer2_xops.c | 10 --
 16 files changed, 13 insertions(+), 69 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove duplicate M_OBJCACHE definition

2021-06-06 Thread Tomohiro Kusumi


commit d64de31c3cfcf3b1b310d6beb1379d76740fefc9
Author: Tomohiro Kusumi 
Date:   Sun Jun 6 02:25:01 2021 +0900

sys/vfs/hammer2: Remove duplicate M_OBJCACHE definition

Summary of changes:
 sys/vfs/hammer2/hammer2_vfsops.c | 2 --
 1 file changed, 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused struct hammer2_sync_info

2021-06-06 Thread Tomohiro Kusumi


commit 0243235435d3402a4839eccfcc6980776db08beb
Author: Tomohiro Kusumi 
Date:   Sun Jun 6 02:12:10 2021 +0900

sys/vfs/hammer2: Remove unused struct hammer2_sync_info

Unused since ecfe89b8868b30c9ddfa9c86cb4b0a20365a248d in 2018.

Summary of changes:
 sys/vfs/hammer2/hammer2_vfsops.c | 7 ---
 1 file changed, 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0243235435d3402a4839eccfcc6980776db08beb


-- 
DragonFly BSD source repository


git: sys/vfs/ext2fs: Make inode extra time fields updating logic more closer to Linux

2021-05-16 Thread Tomohiro Kusumi


commit ff7e9f49a7a4d116a5a25f5f4302f90a6ce3f019
Author: Tomohiro Kusumi 
Date:   Mon May 17 03:13:52 2021 +0900

sys/vfs/ext2fs: Make inode extra time fields updating logic more closer to 
Linux

from FreeBSD c40a160fd0aa48ceb6e243c72cb8b9b59dc4e13d
from FreeBSD 2a984c2b49822bb4a31aeb6a050d746aef73162f

Summary of changes:
 sys/vfs/ext2fs/ext2_inode_cnv.c | 51 ++---
 sys/vfs/ext2fs/inode.h  |  9 
 2 files changed, 42 insertions(+), 18 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_dev::{n,max}ipstacks

2021-05-16 Thread Tomohiro Kusumi


commit 47691c8f7745953868034265c2001283bd3911fe
Author: Tomohiro Kusumi 
Date:   Mon May 17 00:55:27 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_dev::{n,max}ipstacks

First appeared in 703720e4d599857d052f0a65f2840224ce36ec5a
in 2012, but never used for anything.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 2 --
 1 file changed, 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/47691c8f7745953868034265c2001283bd3911fe


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove no longer used typedef for mtx_link_t

2021-05-16 Thread Tomohiro Kusumi


commit 6458640f2a765d793068ce6cbc14ba0d1ae533b1
Author: Tomohiro Kusumi 
Date:   Mon May 17 00:39:32 2021 +0900

sys/vfs/hammer2: Remove no longer used typedef for mtx_link_t

No longer used since 01d71aa5538cba09383737ddbea2fb05e1e75e78 in 2015.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 1 -
 1 file changed, 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6458640f2a765d793068ce6cbc14ba0d1ae533b1


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused hammer2_dev::bflast

2021-05-16 Thread Tomohiro Kusumi


commit d387cbf0b6b9db2d5e7ad337191fc403da918390
Author: Tomohiro Kusumi 
Date:   Mon May 17 00:27:25 2021 +0900

sys/vfs/hammer2: Remove unused hammer2_dev::bflast

First appeared in 9dca9515d47eeb36c9696bb04c0112bafd8efe38
in 2017, but never used for anything.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 1 -
 1 file changed, 1 deletion(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove "REPORT_REFS_ERRORS /* XXX remove me */"

2021-05-16 Thread Tomohiro Kusumi


commit 3421d64a2915f83d8cd7e6620dc1591333f6e788
Author: Tomohiro Kusumi 
Date:   Sun May 16 05:35:52 2021 +0900

sys/vfs/hammer2: Remove "REPORT_REFS_ERRORS /* XXX remove me */"

Summary of changes:
 sys/vfs/hammer2/hammer2_vfsops.c | 12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3421d64a2915f83d8cd7e6620dc1591333f6e788


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Use MPTOPMP()

2021-05-15 Thread Tomohiro Kusumi


commit 8f4737e463ebcce6e7b0cbd450597ccbab904cef
Author: Tomohiro Kusumi 
Date:   Sun May 16 04:36:03 2021 +0900

sys/vfs/hammer2: Use MPTOPMP()

Summary of changes:
 sys/vfs/hammer2/hammer2_vfsops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8f4737e463ebcce6e7b0cbd450597ccbab904cef


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Make hammer2_mtx_upgrade_try() macro around mutex(9)

2021-05-15 Thread Tomohiro Kusumi


commit d8ebfae62ec144a63351a47a40ccbee1017cd930
Author: Tomohiro Kusumi 
Date:   Sun May 16 03:48:29 2021 +0900

sys/vfs/hammer2: Make hammer2_mtx_upgrade_try() macro around mutex(9)

just like any other HAMMER2 lock primitive.
This used to be more than that until
b6b260f2b42aa5a135e4b57ce102dcb0dbbf88c3 in 2016.

Summary of changes:
 sys/vfs/hammer2/hammer2.h | 13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

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


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove no longer used hammer2_xid_t and macros

2021-05-15 Thread Tomohiro Kusumi


commit 2124498fef8f01d9780c0d56a4d2220d303828a5
Author: Tomohiro Kusumi 
Date:   Sun May 16 03:14:40 2021 +0900

sys/vfs/hammer2: Remove no longer used hammer2_xid_t and macros

These are no longer used since da6f36f44bb9c76612e31b56cdfe4d787e53d61f
in 2014.

Summary of changes:
 sys/vfs/hammer2/hammer2.h| 11 ---
 sys/vfs/hammer2/hammer2_vfsops.c |  2 --
 2 files changed, 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2124498fef8f01d9780c0d56a4d2220d303828a5


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Remove unused HMNT2_NOAUTOSNAP

2021-05-15 Thread Tomohiro Kusumi


commit cf6e1195d37cd64147b2cc12722d7cb94f8b727c
Author: Tomohiro Kusumi 
Date:   Sun May 16 02:01:23 2021 +0900

sys/vfs/hammer2: Remove unused HMNT2_NOAUTOSNAP

First appeared 9 years ago in 703720e4d599857d052f0a65f2840224ce36ec5a
but never used for anything.

Summary of changes:
 sys/vfs/hammer2/hammer2_mount.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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


-- 
DragonFly BSD source repository


git: usr.sbin/autofs: Best effort to maintain mounttab and mountdtab

2021-05-05 Thread Tomohiro Kusumi


commit 1dfea00f11e2d4fba2bae6d98e5df8391209d1d7
Author: Tomohiro Kusumi 
Date:   Wed May 5 23:10:57 2021 +0900

usr.sbin/autofs: Best effort to maintain mounttab and mountdtab

from FreeBSD 88e531f38c2412bf030f4e8dd563efc45b70797e

Summary of changes:
 usr.sbin/autofs/automount.c|  2 ++
 usr.sbin/autofs/autounmountd.c |  3 ++-
 usr.sbin/autofs/common.c   | 13 +
 usr.sbin/autofs/common.h   |  1 +
 4 files changed, 18 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1dfea00f11e2d4fba2bae6d98e5df8391209d1d7


-- 
DragonFly BSD source repository


git: sys/vfs/hammer2: Add break; (not a bug)

2021-03-14 Thread Tomohiro Kusumi


commit 1bbee3bf1f99428bbb04b96bf084bf64a0cfde95
Author: Tomohiro Kusumi 
Date:   Sun Mar 14 21:05:39 2021 +0900

sys/vfs/hammer2: Add break; (not a bug)

Summary of changes:
 sys/vfs/hammer2/hammer2_io.c | 1 +
 1 file changed, 1 insertion(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1bbee3bf1f99428bbb04b96bf084bf64a0cfde95


-- 
DragonFly BSD source repository


git: sbin/mount_hammer2: Minor cleanup

2021-03-07 Thread Tomohiro Kusumi


commit 0cdf3eb22908390851a73a22001f6f2f36d0bee3
Author: Tomohiro Kusumi 
Date:   Sun Mar 7 22:13:12 2021 +0900

sbin/mount_hammer2: Minor cleanup

Summary of changes:
 sbin/mount_hammer2/mount_hammer2.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0cdf3eb22908390851a73a22001f6f2f36d0bee3


-- 
DragonFly BSD source repository


git: usr.sbin/autofs: Fix absolute path when creating a mountpoint

2021-02-17 Thread Tomohiro Kusumi


commit e0eb7cf027c1f12707e9dc65ec4c0ef6273b03e4
Author: Tomohiro Kusumi 
Date:   Thu Feb 18 00:20:11 2021 +0900

usr.sbin/autofs: Fix absolute path when creating a mountpoint

from freebsd 63640b2f552c0476f50484635eb9888eafcd22dc

FreeBSD finally fixed a bug I reported in 2017,
in a bit different way from a workaround in DragonFly and NetBSD.
Apply FreeBSD fix in place of 108ed43a1e5e7ff8f890085e206d970562bf4a7c.

Summary of changes:
 usr.sbin/autofs/automount.c | 10 --
 usr.sbin/autofs/common.c|  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

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


-- 
DragonFly BSD source repository


  1   2   3   4   5   6   7   8   9   10   >