#
5ca0a96d |
| 28-Dec-2020 |
Sascha Wildner <saw@online.de> |
Remove last remains of FSMID support from userland.
The kernel side was added in 2005 (7d15906a7a159575b1983f7c1fadde4b) and removed again in 2009 (d98152a8b8a4b368ca0e08b84302f2f2).
Approved-by: d
Remove last remains of FSMID support from userland.
The kernel side was added in 2005 (7d15906a7a159575b1983f7c1fadde4b) and removed again in 2009 (d98152a8b8a4b368ca0e08b84302f2f2).
Approved-by: dillon
show more ...
|
#
00369c4a |
| 14-Feb-2020 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Rejigger mount code to add vfs_flags in struct vfsops
* Rejigger the mount code so we can add a vfs_flags field to vfsops, which mount_init() has visibility to.
* Allows nullfs to flag t
kernel - Rejigger mount code to add vfs_flags in struct vfsops
* Rejigger the mount code so we can add a vfs_flags field to vfsops, which mount_init() has visibility to.
* Allows nullfs to flag that its mounts do not need a syncer thread. Previously nullfs would destroy the syncer thread after the fact.
* Improves dsynth performance (it does lots of nullfs mounts).
show more ...
|
#
43bc39fa |
| 04-Mar-2019 |
Sascha Wildner <saw@online.de> |
kernel/hammer: Remove the old inactive live dedup code.
It had been disabled in 6de803f0514ff0019181d026a825d1e8a9a4c404 in 2012 due to issues with it.
|
#
87f62b1c |
| 08-Jan-2017 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Fix improper mplock in mount path
* VFS_MOUNT() was being called before MNTK_ALL_MPSAFE could be set by the filesystem, causing the operation to run with the MP token held.
* Add VFCF_MP
kernel - Fix improper mplock in mount path
* VFS_MOUNT() was being called before MNTK_ALL_MPSAFE could be set by the filesystem, causing the operation to run with the MP token held.
* Add VFCF_MPSAFE to the vfsconf flags and specify it for MPSAFE filesystems in their VFS_SET() specification. This flag causes MNTK_ALL_MPSAFE to be set in mount->mnt_kern_flags prior to the VFS_MOUNT() call. Set this flag for devfs, procfs, tmpfs, nullfs, hammer, and hammer2.
* Primarily effects synth or other bulk-builds which do a lot of mounting.
show more ...
|
#
e0d7dd09 |
| 04-Dec-2016 |
Matthew Dillon <dillon@apollo.backplane.com> |
hammer - Remove global VOP counters
* Remove global VOP counters. These were only used for debugging. Removing these globals significantly improves concurrent VOP operations on multi-core syste
hammer - Remove global VOP counters
* Remove global VOP counters. These were only used for debugging. Removing these globals significantly improves concurrent VOP operations on multi-core systems, particularly multi-socket systems, by removing a cache ping-pong bottleneck.
Discussed-with: Mateusz Guzik (mjg_)
show more ...
|
#
0fe46dc6 |
| 27-Oct-2016 |
Matthew Dillon <dillon@apollo.backplane.com> |
build - Rewire secure, remove conflicts from libmd, libcrypt
* Remove /usr/src/secure, folding all of its subsystems into /usr/src. There's no point having a /usr/src/secure any more, the syste
build - Rewire secure, remove conflicts from libmd, libcrypt
* Remove /usr/src/secure, folding all of its subsystems into /usr/src. There's no point having a /usr/src/secure any more, the system won't run without the secure stuff, the idea that some foreign actor could segregate it in order to legally download code without crypto is absurd on the modern internet, and the U.S. government stopped caring decades ago.
* Remove conflicts from libmd and libcrypt. Essentially this removes the SHA*_*() and MD5_*() APIs from libmd because these APIs already exist in lib[re]ssl.
The older SHA*() and MD5*() APIs are partially retained for legacy base code, but will be removed in a later stage (moved to direct-linking the needed support source).
Conflicting routines in libcrypt have been renamed and internalized to be libcrypt-only.
* Major rewiring of the Makefile's to support the changes.
show more ...
|
#
9629eb35 |
| 16-Oct-2016 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Rename desiredvnodes to maxvnodes, fix deadlock
* Rename the kernel variable 'desiredvnodes' to 'maxvnodes' to match the sysctl name (which has always been 'maxvnodes'), and to make the
kernel - Rename desiredvnodes to maxvnodes, fix deadlock
* Rename the kernel variable 'desiredvnodes' to 'maxvnodes' to match the sysctl name (which has always been 'maxvnodes'), and to make the code more readable.
* Probable fix to a rare mount/umount deadlock which can occur in two situations (1) When a large number of mounts and unmounts are running concurrently, and (2) During a umount -a, shutdown, or reboot.
* Considered minor, normal use cases will not reproduce this bug. Only synth or poudriere can generate the mount/umount traffic necessary to reproduce this bug.
* Also fixes a minor kernel memory leak of the mount structure which can occur when a 'df' or filesystem sync races a umount. Also minor.
Reported-by: marino (mount race)
show more ...
|
#
6416eb03 |
| 11-Oct-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Add HAMMER_MIN|MAX_ONDISK_LOCALIZATION
Use | for HAMMER_MAX_ONDISK_LOCALIZATION, but not +. Also see 7e52af60.
|
#
9615af80 |
| 11-Oct-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Use MIN/MAX macros for B-Tree node's elm base
Leave obj_type with 0 instead of using HAMMER_OBJTYPE_UNKNOWN, since it's not intended to be unknown, but literally intended to be a val
sys/vfs/hammer: Use MIN/MAX macros for B-Tree node's elm base
Leave obj_type with 0 instead of using HAMMER_OBJTYPE_UNKNOWN, since it's not intended to be unknown, but literally intended to be a value of 0.
show more ...
|
#
ba2be8e9 |
| 28-Aug-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Use typedef'd for struct hammer_mount*
The whole hammer code is mix of using struct and typedef'd. Use typedef'd because majority of the code use typedef'd.
The last 17 commits incl
sys/vfs/hammer: Use typedef'd for struct hammer_mount*
The whole hammer code is mix of using struct and typedef'd. Use typedef'd because majority of the code use typedef'd.
The last 17 commits including this one don't affect binary.
show more ...
|
#
e1067862 |
| 28-Aug-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Use typedef'd for struct hammer_inode*
The whole hammer code is mix of using struct and typedef'd. Use typedef'd because majority of the code use typedef'd.
|
#
9c559b05 |
| 24-Jun-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Remove DEDUP_CACHE_SIZE and wrong comment
It is a tunable sysctl since e2ef7a95.
|
#
e7d75765 |
| 08-Jun-2016 |
Matthew Dillon <dillon@apollo.backplane.com> |
hammer - Make vfs.hammer.cluster_enable an integer
* Instead of being a boolean, make it an integer and use it to control how much read-ahead is requested (in 64KB blocks).
* Change cluster_enabl
hammer - Make vfs.hammer.cluster_enable an integer
* Instead of being a boolean, make it an integer and use it to control how much read-ahead is requested (in 64KB blocks).
* Change cluster_enable from 1 to 2 to roughly match the cluster_read() changes committed to the kernel.
* Make hammer_io_indirect_read() use cluster_readcb() instead of breadcb() so we get read-ahead on this path.
show more ...
|
#
40100248 |
| 25-May-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Don't store negative free/avail for statfs/statvfs
f_bfree and f_bavail (these two equal on HAMMER) are likely to be negative when the filesystem usage has reached its limit or almos
sys/vfs/hammer: Don't store negative free/avail for statfs/statvfs
f_bfree and f_bavail (these two equal on HAMMER) are likely to be negative when the filesystem usage has reached its limit or almost reaches limit.
There is no point in having negative values by using internally reserved size (means not physically finalized with actual data), so force 0 instead of -.
Note that this doesn't fix ENOSPC issues.
-- before this commit # df -T /HAMMER Filesystem Type 1K-blocks Used Avail Capacity Mounted on TEST hammer 116359168 116363168 -4000 100% /HAMMER
-- with this commit # df -T /HAMMER Filesystem Type 1K-blocks Used Avail Capacity Mounted on TEST hammer 116359168 116359168 0 100% /HAMMER
show more ...
|
#
7b46f61d |
| 25-May-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Remove vfs.hammer.count_extra_space_used
This was added in a7e9bef1 in 2008 for debugging. Exposing this to userspace isn't useful for users anyway considering this is a sum of sever
sys/vfs/hammer: Remove vfs.hammer.count_extra_space_used
This was added in a7e9bef1 in 2008 for debugging. Exposing this to userspace isn't useful for users anyway considering this is a sum of several internal parameters on resource usage.
show more ...
|
#
6c39d27a |
| 07-Apr-2016 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Rename ondisk vol_name to vol_label
Ondisk volume header having a field named vol_name for a label (not a block device path) is confusing, especially when inmemory volume structure h
sys/vfs/hammer: Rename ondisk vol_name to vol_label
Ondisk volume header having a field named vol_name for a label (not a block device path) is confusing, especially when inmemory volume structure has vol_name for a block device but not a label.
There is even a kprintf message wrongly using ondisk vol_name as a block device path, as well as some comments saying vol_name is a filesystem label but not a path, which implies the name was misleading.
This commit changes ondisk vol_name to vol_label. This commit also changes vol_name in struct hammer_ioc_info to vol_label. Outbox userspace programs using these two will see compile error after this commit (which I doubt there is any...). This commit doesn't break binaries.
Note that vol_name in struct libhammer_fsinfo is unchanged.
show more ...
|
#
647527b2 |
| 09-Dec-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Remove unused lock free_lock
This was only used in the early stage of hammer development when hammer_freemap.c had some code.
|
#
20cf2291 |
| 06-Dec-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Add lo_to_pfs()/pfs_to_lo() macros
These macros hide 16 bits shift and cast to int/uint32_t that are necessary on localization to/from PFS id conversion.
Some code are better withou
sys/vfs/hammer: Add lo_to_pfs()/pfs_to_lo() macros
These macros hide 16 bits shift and cast to int/uint32_t that are necessary on localization to/from PFS id conversion.
Some code are better without details being hidden by macros, but this seems to be more readable with x_to_y macros that hide bunch of >>16, <<16, and casts.
(No diff in binary on x86_64/gcc5)
show more ...
|
#
2e462bd6 |
| 05-Dec-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Remove unused global variables and sysctls
Remove the following entries that aren't used for anything. These are mostly from the early stage of hammer development and no longer used.
sys/vfs/hammer: Remove unused global variables and sysctls
Remove the following entries that aren't used for anything. These are mostly from the early stage of hammer development and no longer used.
vfs.hammer.debug_recover_faults vfs.hammer.write_mode vfs.hammer.zone_limit
show more ...
|
#
6c35a928 |
| 05-Dec-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Use hammer_vfs_root()
|
#
7e52af60 |
| 05-Dec-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Use bitwise OR to generate ondisk localization
Use |= to generate localization field for B-Tree elements and cursor keys instead of +=, since lower 16 bits are bitfields (or safer to
sys/vfs/hammer: Use bitwise OR to generate ondisk localization
Use |= to generate localization field for B-Tree elements and cursor keys instead of +=, since lower 16 bits are bitfields (or safer to treat INODE=0x1 and MISC=0x2 as bitfields).
The typical code to generate ondisk localization value is to do either of the followings.
ondisk_lo = local_variable + {INODE or MISC}; ondisk_lo = ip->obj_localization + {INODE or MISC}; ondisk_lo = HAMMER_XXX_LOCALIZATION + {INODE or MISC}; ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ (A)32 bits localization (B)lower 16 bits with usually 0 for lower 16 bits for type
Adding (A) and (B) to synthesize PFS id and localization type could lead to a potential bug if (A) already has type bits set to either INODE or MISC. For example if (A) had INODE for type bits and the code is to += INODE for (B), then type bits turn into MISC (1+1=2) which is not the intention of the code.
This could potentially occur with the first example of above three where (A) is a local variable or a function argument. It is not too obvious from the code whether that local variable has 0 for the lower 16 bits (which basically should be). If the code just always uses |= no such thing will happen.
show more ...
|
#
4aaf46d1 |
| 30-Nov-2015 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
hammer: Always set noatime for hammerfs
Set tunable vfs.hammer.noatime to 0 to disable this "auto" noatime.
Reviewed-by: dillon@
|
#
46137e17 |
| 25-Nov-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
hammer: Change u_int{8,16,32,64}_t to uint{8,16,32,64}_t
in the following directories and/or files.
* sys/vfs/hammer * sbin/hammer * sbin/newfs_hammer * sbin/mount_hammer * usr.bin/fstat/hammer.c *
hammer: Change u_int{8,16,32,64}_t to uint{8,16,32,64}_t
in the following directories and/or files.
* sys/vfs/hammer * sbin/hammer * sbin/newfs_hammer * sbin/mount_hammer * usr.bin/fstat/hammer.c * usr.bin/undo
show more ...
|
#
93775b63 |
| 19-Sep-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Remove ambiguous comment
Upper 16 bits of val[1] is always 0 (which equals pfs id of pfs0) regardless of how many pfs there are.
|
#
5b5dd5b4 |
| 19-Sep-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Fix wrong comment on ambiguous variable name
hammer_volume_ondisk::vol_name[] is a filesystem label string specified by newfs_hammer via -L option (see below), but not the name of th
sys/vfs/hammer: Fix wrong comment on ambiguous variable name
hammer_volume_ondisk::vol_name[] is a filesystem label string specified by newfs_hammer via -L option (see below), but not the name of the volume like "/dev/da1".
# grep "ondisk->vol_name" sbin/newfs_hammer -rI sbin/newfs_hammer/newfs_hammer.c: \ snprintf(ondisk->vol_name, sizeof(ondisk->vol_name), "%s", label);
show more ...
|