#
88cdee70 |
| 11-Apr-2017 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Add /* not reached */ for usage() variants
that were originally missing. Recommended by dillon@. No diff in sbin/hammer binary when assert(3) is disabled.
|
#
052fd72b |
| 11-Apr-2017 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Add /* not reached */
that were originally missing. Recommended by dillon@. No diff in sbin/hammer binary when assert(3) is disabled.
|
#
52e2f1b5 |
| 09-Apr-2017 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Cleanup blocks with a single statement
This commit basically does the same as what Linux kernel's coding style mentions for braces, which is basically the same with BSDs. https://github
sbin/hammer: Cleanup blocks with a single statement
This commit basically does the same as what Linux kernel's coding style mentions for braces, which is basically the same with BSDs. https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst#3-placing-braces-and-spaces
No diff in sbin/hammer/hammer binary when assert(3) is disabled.
show more ...
|
#
78c4be83 |
| 19-Sep-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
hammer: Print "B-Tree" (conform to hammer specification)
Hammer specification, manpage, comments, etc mostly use "B-Tree" instead of "btree" or "b-tree".
This commit replaces "btree" and "b-tree" s
hammer: Print "B-Tree" (conform to hammer specification)
Hammer specification, manpage, comments, etc mostly use "B-Tree" instead of "btree" or "b-tree".
This commit replaces "btree" and "b-tree" strings that appear in printf() and hammer(8) with "B-Tree", assuming no user or userspace triggers anything by these strings.
show more ...
|
#
fca68e7b |
| 24-Aug-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Cleanup localization initialization on reblock
and also adds a missing pattern (DATA | DIRS) although there isn't a hammer reblock-data-dirs command.
|
#
3ced8577 |
| 22-Aug-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Print total bytes of reblocked nodes
just like it shows both "data elements" and "data bytes" in the next two lines.
"btree bytes" is kind of obvious since btree nodes are all 4KB, and
sbin/hammer: Print total bytes of reblocked nodes
just like it shows both "data elements" and "data bytes" in the next two lines.
"btree bytes" is kind of obvious since btree nodes are all 4KB, and there isn't a field for "btree bytes" in struct hammer_ioc_reblock as well, however this isn't obvious for users so it should print it.
show more ...
|
#
7ef2d7b3 |
| 21-Aug-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Don't try to reblock everything on volume-del
Add volume# option to reblock ioctl and use that on hammer volume-del instead of trying to reblock every data/node that the reblocker ha
sys/vfs/hammer: Don't try to reblock everything on volume-del
Add volume# option to reblock ioctl and use that on hammer volume-del instead of trying to reblock every data/node that the reblocker has faced.
This is only used internally by hammer volume-del ioctl when it finds the volume-to-remove is not empty and needs to get reblocked. hammer reblock command does not provide an option to specify volume# since it shouldn't be necessary for users in general.
This makes huge difference as it cuts extra and unnecessary i/o from reblocking, especially when the volume to remove only has small amount data in it. The following examples show much of the time spent on reblocking on volume-del comes from unnecessary i/o. Example1 spent most of the time moving data in /dev/da1 which wasn't necessary.
Example 1 - before this commit # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 >/dev/null # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER # dd if=/dev/zero of=/HAMMER/out bs=1000000 count=120000 >/dev/null 2>&1 # sync; sync; sync; sync # df -Th /HAMMER Filesystem Type Size Used Avail Capacity Mounted on TEST hammer 334G 112G 222G 34% /HAMMER # hammer -f /dev/da1:/dev/da2:/dev/da3 blockmap | grep -A2 layer1 layer1 4000000000000000 @2000000000800000 blocks-free 0 4000000000000000 zone=4 app=8388608 free=0 4000000000800000 zone=4 app=8388608 free=0 -- layer1 4010000000000000 @2010000000000000 blocks-free 14145 4010000000000000 zone=4 app=8388608 free=0 4010000000800000 zone=10 app=8388608 free=0 -- layer1 4020000000000000 @2020000000000000 blocks-free 14268 4020000000000000 zone=4 app=8388608 free=0 4020000000800000 zone=0 app=0 free=8388608 /* /dev/da1 is 100% used /dev/da2 is partially used /dev/da3 is 0% used */ # hammer volume-blkdevs /HAMMER /dev/da1:/dev/da2:/dev/da3 # time hammer volume-del /dev/da2 /HAMMER
real 14m29.119s user 0m0.000s sys 7m14.388s # hammer volume-blkdevs /HAMMER /dev/da1:/dev/da3
Example 2 - with this commit # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 >/dev/null # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER # dd if=/dev/zero of=/HAMMER/out bs=1000000 count=120000 >/dev/null 2>&1 # sync; sync; sync; sync # df -Th /HAMMER Filesystem Type Size Used Avail Capacity Mounted on TEST hammer 334G 112G 222G 34% /HAMMER # hammer -f /dev/da1:/dev/da2:/dev/da3 blockmap | grep -A2 layer1 layer1 4000000000000000 @2000000000800000 blocks-free 0 4000000000000000 zone=4 app=8388608 free=0 4000000000800000 zone=4 app=8388608 free=0 -- layer1 4010000000000000 @2010000000000000 blocks-free 14145 4010000000000000 zone=4 app=8388608 free=0 4010000000800000 zone=10 app=8388608 free=0 -- layer1 4020000000000000 @2020000000000000 blocks-free 14268 4020000000000000 zone=4 app=8388608 free=0 4020000000800000 zone=0 app=0 free=8388608 /* /dev/da1 is 100% used /dev/da2 is partially used /dev/da3 is 0% used */ # hammer volume-blkdevs /HAMMER /dev/da1:/dev/da2:/dev/da3 # time hammer volume-del /dev/da2 /HAMMER
real 0m8.139s user 0m0.000s sys 0m4.177s # hammer volume-blkdevs /HAMMER /dev/da1:/dev/da3
show more ...
|
#
5e1e1454 |
| 24-Apr-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sys/vfs/hammer: Add -A option to reblock|rebalance all pfs
- -A option makes certain per pfs hammer commands perform on all pfs of the filesystem that the [filesystem] arg belongs to. Currently
sys/vfs/hammer: Add -A option to reblock|rebalance all pfs
- -A option makes certain per pfs hammer commands perform on all pfs of the filesystem that the [filesystem] arg belongs to. Currently hammer reblock and rebalance commands support this. It does nothing to other commands.
- With -A option, above hammer commands use a range of 0 to 0xFFFF for pfs id (upper 16 bits) of the cursor localization. This makes it iterate all pfs in the filesystem.
- Above difference in localization range means btree iteration applies to larger range of nodes in terms of pfs id, since it's been used as a top priority key that works as a localizing factor of pfs within the btree. There is no logical difference other than the range is different. So performing these commands on all pfs is as simple as changing the localization range (unless other keys are involved as additional parameters like hammer prune does).
show more ...
|
#
b1c084cd |
| 23-Apr-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
Revert "sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock"
This reverts commit d58869bda15ddc5e96c1c053196fcd3e56e340c6.
- According to the hammer rebalance (cmd_rebalance.c) which has
Revert "sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock"
This reverts commit d58869bda15ddc5e96c1c053196fcd3e56e340c6.
- According to the hammer rebalance (cmd_rebalance.c) which has a similar printf, this printf was probably intended to show localization type('s lower limit) when btree iteration starts, rather than localization types to look for during the iteration. Then it was right to print 0x0 (key_beg.localization) for %04x.
show more ...
|
#
d58869bd |
| 21-Apr-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock
- Print reblock.key_end.localization when reblock starts instead of reblock.key_beg.localization.
- hammer reblock printing 0000 whi
sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock
- Print reblock.key_end.localization when reblock starts instead of reblock.key_beg.localization.
- hammer reblock printing 0000 while reblock-inodes printing 0001 and reblock-data|dirs printing 0002 seems strange because reblock covers all localization types ranging from MIN(0000) to MAX(ffff) on btree iteration (which obviously includes existing two types for inode and misc). Printing end localization should make better sense here.
show more ...
|
#
f02dcec0 |
| 21-Apr-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
sbin/hammer: Print big block size on reblock
- Print free_level/big_block_size when reblock starts instead of just free_level.
- The meaning of 'fill_percentage' arg is easier to understand thi
sbin/hammer: Print big block size on reblock
- Print free_level/big_block_size when reblock starts instead of just free_level.
- The meaning of 'fill_percentage' arg is easier to understand this way because the big block size is not obvious for most users while this arg is about selecting which big block to defrag.
show more ...
|
#
e04ee2de |
| 31-Jan-2015 |
Tomohiro Kusumi <kusumi.tomohiro@gmail.com> |
hammer: fix terminology of "large block"
This cleanup patch changes terminology "large block" to "big block".
- Both "large block" and "big block" are widely used in hammer source from kernel to us
hammer: fix terminology of "large block"
This cleanup patch changes terminology "large block" to "big block".
- Both "large block" and "big block" are widely used in hammer source from kernel to userspace, however these two refer to the same data structure which is a 8MB sized chunk within low level blockmapped storage layer.
- The original design document https://www.dragonflybsd.org/hammer/hammer.pdf uses big block for this data structure. Having two expressions in its implementation is confusing and makes grep difficult.
Closes: #2782
show more ...
|
#
84e57c2c |
| 26-Sep-2011 |
Thomas Nikolajsen <thomas@dragonflybsd.org> |
hammer(8): whitespace cleanup: delete blank at end of line
|
#
f6532f03 |
| 14-Nov-2009 |
Thomas Nikolajsen <thomas@dragonflybsd.org> |
hammer: minor doc update
* SYNOPSIS for -f changed to just '-f blkdevs'
* sync SYNOPSIS & usage()
* s/filesystem/file system/ (was already used in most places)
* add description for show-undo
hammer: minor doc update
* SYNOPSIS for -f changed to just '-f blkdevs'
* sync SYNOPSIS & usage()
* s/filesystem/file system/ (was already used in most places)
* add description for show-undo
* fix a few minor typos
show more ...
|
#
a276dc6b |
| 21-Aug-2009 |
Matthew Dillon <dillon@apollo.backplane.com> |
AMD64 - AUDIT RUN - Fix format strings, size_t, and other issues
|
#
445faa69 |
| 20-Jan-2009 |
Matthew Dillon <dillon@apollo.backplane.com> |
HAMMER utility - Add ^C support, improve verbosity.
The hammer utility will now write-out the cycle file when pruning or reblocking is interrupted with ^C.
The hammer cleanup directive will now wai
HAMMER utility - Add ^C support, improve verbosity.
The hammer utility will now write-out the cycle file when pruning or reblocking is interrupted with ^C.
The hammer cleanup directive will now wait for children to exit before exiting itself.
The hammer reblocking and pruning directives now generate more verbose printf output.
show more ...
|
#
84082922 |
| 16-Jul-2008 |
Thomas Nikolajsen <thomas@dragonflybsd.org> |
Update hammer doc: - sync usage() & hammer.8 - reblock* percentage is 100%, correct a few places still saying 90% - drop `-s' as it isn't used anymore - drop doc for blockmap, es code is #if 0'ed
Update hammer doc: - sync usage() & hammer.8 - reblock* percentage is 100%, correct a few places still saying 90% - drop `-s' as it isn't used anymore - drop doc for blockmap, es code is #if 0'ed - add more description of pruning - add more markup - capitalize UUID - spell out TID - add a few more cross references
show more ...
|
#
243ca327 |
| 07-Jul-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Sync with 60E
* Change the cycle file to hold an entire B-Tree base key, plus an optional TID (used by the mirroring code).
* Flesh out the mirroring code. Add timeout (-t) sup
HAMMER Utilities: Sync with 60E
* Change the cycle file to hold an entire B-Tree base key, plus an optional TID (used by the mirroring code).
* Flesh out the mirroring code. Add timeout (-t) support. Add cycle file support.
* When mirror-copy is used have the target sync the filesystem and acknowledge completion and store the completed TID in the cycle file.
* Incremental mirroring now works when using mirror-copy with a cycle file.
* Add mirror-dump, aka hammer mirror-read ... | hammer mirror-dump, for debugging.
show more ...
|
#
a7fbbf91 |
| 26-Jun-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Sync with 59A
* Add mirror-read, mirror-write, and status directives.
|
#
1d9f6aa1 |
| 24-Jun-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Sync to 58B
* Update all utilities to deal with the cleaned up ioctl structures and to augment history and undo output with the non-monotonic timestamps.
|
#
9e29c876 |
| 14-Jun-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Sync with commit 55 - MEDIA STRUCTURES CHANGED!
* newfs_hammer now creates a new blockmap zone for meta-data
* The hammer utility has been enhanced and brought up-to-date. One
HAMMER Utilities: Sync with commit 55 - MEDIA STRUCTURES CHANGED!
* newfs_hammer now creates a new blockmap zone for meta-data
* The hammer utility has been enhanced and brought up-to-date. One can now reblock directories separately from other data.
* The hammer show command now properly understands the B-Tree element localization field (fixed improper reporting of 'B'ad B-Tree elements).
show more ...
|
#
58c17893 |
| 18-May-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Update for HAMMER changes.
* Update for localization changes made in the filesystem.
* Make minor feature adjustments.
|
#
ba7b52c9 |
| 12-May-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Cleanup.
* Finish cleaning up the pruning and reblocking code.
* Add reblocking commands to reblock B-Tree, records, and data separately.
|
#
d7ae405c |
| 11-May-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Features
* Add a new option '-c cyclefile' which when coupled with '-t timeout' allows successive invocations of a pruning or reblocking operation to pick up where it left off.
|
#
67db3a94 |
| 05-May-2008 |
Matthew Dillon <dillon@dragonflybsd.org> |
HAMMER Utilities: Feature add
* Check record crc and signature in extra-verbose mode
* Adjustments for structural changes
* Generate proper CRCs for structures laid down by newfs_hammer
|