Displaying 1 50 of 34,136 commits (0.008s)

DragonFlyBSD — sys/dev/serial/sio sio.c

sio: Add pci-ids for Haswell and Broadwell vPro CPUs' SoL support.
Delta File
+4 -0 sys/dev/serial/sio/sio.c
+4 -0 1 file

DragonFlyBSD — sys/vfs/hammer hammer_btree.c hammer.h

sys/vfs/hammer: Rename btree_set_parent() to btree_set_parent_of_child()

This commit renames btree_set_parent() to btree_set_parent_of_child()
since btree_set_parent() is counter-intuitive.

1. btree_get_parent(node)
returns node's parent, but
2. btree_set_parent(node, elm)
sets its child's parent to node instead of setting node's parent
to something, which isn't quite expected behavior from the way
these two functions are named.

DragonFlyBSD — sys/vfs/hammer2 hammer2_chain.c hammer2_flush.c

hammer2 - refactor some chain bits, stabilization

* Refactor the hammer2_chain_t MODIFIED and UPDATE flags to not
  reference the chain.

* Automatically flag DESTROY on a chain on last-drop if chain->parent is
  NULL, and automatically clear UPDATE and try to clear MODIFY.  Add the
  chain to the delayed-flush queue if MODIFIED cannot be cleared.

* Fix a flags bug in hammer2_chain_hardlink_find() which could deadlock
  competing threads.

* The collect code now aggregates errors and the cluster check code now
  also aggregates errors.  This allows feeders to feed an error code to
  the collector.

* Fix rmdir and rename to disallow removal of non-empty directories.

* hammer2_inode_xop_flush() now proceeds with a flush if hmp->flushq
  is not empty, even if the chain is not marked for flushing.  This
  still needs some work.

* Add a sideq for dirty inodes that might have to be flushed.  Used for
  unlinked dirty inodes which might still be open.

    [4 lines not shown]

DragonFlyBSD — include wchar.h, lib/libc/gdtoa Symbol.map

Update some more symbols maps for libc

This continues the work towards versioning libc.  I found that a wchar
function, open_wmemstream(), had a prototype but was not implemented on
DragonFly (but it is on FreeBSD) so I filtered it out with #if 0 block.

DragonFlyBSD — lib/libc/stdlib merge.c

lib/libc/stdlib/merge.c: add "static" to match setup prototype
Delta File
+1 -1 lib/libc/stdlib/merge.c
+1 -1 1 file

DragonFlyBSD — sys/vfs/hammer hammer.h

sys/vfs/hammer: #if0 cursor_exclreq_count of inode and node

hammer code that refers to 'cursor_exclreq_count' is #if0'd,
so #if0 this field from struct definitions as well.

Since #if0'd code aren't logically obsolete but just disabled,
it's probably better not to remove them at this point.

The change does not affect abi as these structs and fields
are not size/position/ondisk-layout sensitive.
Delta File
+4 -0 sys/vfs/hammer/hammer.h
+4 -0 1 file

DragonFlyBSD — sys/vfs/hammer2 hammer2_chain.c hammer2_xops.c

hammer2 - stabilization - blogbench, others

* Fix some (but not all) issues with lost chains on unmount that show
  up in a kmalloc pool warning.

* Fix a bug in hammer2_chain_create_indirect() which retained a stale
  { base, count } across possible parent chain modifications, resulting
  in corruption and/or a panic.

* Track chain lock counts on a per-thread basis and add some helpful
  assertions in the XOP processing loop.  Also add
  hammer2_chain_push_shared_lock() and hammer2_chain_pull_shared_lock()
  to helpfully transfer ownership of (shared locks only) between threads.

* Add missing cpu_lfence() after fifo read index test.  Ensures that
  the memory load of the chain occurs after the write index change has
  been detected.

* Change the XOP ABI a bit.  hammer2_xop_feed() now replicates the
  shared lock, giving one to the collector and allowing the caller
  to retain its own.  This way the locking state of the chain passed
  to it does not change from the point of view of the caller.

  This also fixes one or two lost chain locks in the XOPs.

DragonFlyBSD — sys/sys thread.h

kernel - Use unused thread_t field for lock tracker.

* Repurpose an unused struct thread field to add td_tracker.  Structure
  size does not change.  Used for debugging only.
Delta File
+1 -1 sys/sys/thread.h
+1 -1 1 file

DragonFlyBSD — sys/dev/drm drm_irq.c

drm: Bring back a KNOTE() call, unbreak vblank handling

* Userland programs were no longer properly notified of vblank events

* We can't use the drm_poll() function present in Linux and its
  explicit poll_wait() call on file_priv->event_wait without introducing
  a completely new kernel infrastructure. Add back the KNOTE() call.

Noticed-by: ivadasz, many
Delta File
+2 -0 sys/dev/drm/drm_irq.c
+2 -0 1 file

DragonFlyBSD — lib/libc/sys Makefile.inc

libc: Remove stack_protector.c from build

Both gcc47 and gcc50 use libssp for stack protection, so the stack
protector code appears to be obsolete.  On the direction of dillon,
just delist the source file in the makefile, and after a month with
some dports run experience, permanently remove stack-protector.c
from lib/libc/sys directory.
Delta File
+3 -1 lib/libc/sys/Makefile.inc
+3 -1 1 file

DragonFlyBSD — include ctype.h wctype.h, include/xlocale _ctype.h

Take II at unbreaking world

DragonFlyBSD — usr.bin/localedef ctype.c

Add bootstrap workaround needed by ctype.h addition for localedef
Delta File
+4 -0 usr.bin/localedef/ctype.c
+4 -0 1 file

DragonFlyBSD — usr.bin/localedef localedef.1

localedef.1: Clean up a bit.
Delta File
+110 -89 usr.bin/localedef/localedef.1
+110 -89 1 file

DragonFlyBSD — lib/libc/sys vmm.2 Makefile.inc

Add a small vmm(2) manual page for the related system calls.

Namely, vmm_guest_ctl(2) and vmm_guest_sync_addr(2).

It is based on a manual page which Mihai Carabas submitted to me a
rather long time ago (apologies, Mihai).
Delta File
+95 -0 lib/libc/sys/vmm.2
+3 -1 lib/libc/sys/Makefile.inc
+98 -1 2 files

DragonFlyBSD — usr.sbin/acpi/acpicall acpicall.c acpicall.8

acpicall(8): Add -U option for passing UUIDs as buffers.

Great for _DSM's.

Tested-by: tollens

DragonFlyBSD — share/ctypedef en_US.UTF-8.src, tools/tools/locale/etc common.UTF-8.src manual-input.UTF-8

UTF8: fix a couple of number ctype definitions

During testing of new number ctype, I found a typo one of the CJK number
definitions and two Roman Numeral characters that were set as numbers but
should not be (according to equivalent python check).

DragonFlyBSD — include ctype.h wctype.h, include/xlocale _ctype.h

libc: Redefine "number" ctype - no longer alias of "digit"

FreeBSD extended ctypes to include numbers (e.g. isnumber()) but never
actually implemented it.  The isnumber() function was equivalent to the
isdigit() function in every case.

Now that DragonFly's ctype source files have number definitions, the
number ctype can finally be implemented.  It's given a new flag _CTYPE_N.
The isalnum() and iswalnum() functions have been changed to use this
flag rather than the _CTYPE_D digit flag.

While isalnum(), isnumber(), and their wide equivalents now return
different values in locale cases, the ishexnumber() and iswhexnumber()
functions are unchanged.  They are still aliases for isxdigit() and

Also change ctype.h for isdigit and isxdigit to use sbistype like the
other functions.

The "isnumber()" will not work until a full world build is made.  The
reason is that localedef is modified, but it's a bootstrap tool, so the
earlier version that does not support number ctype is still used in a
quickworld build.

DragonFlyBSD — sys/vfs/hammer hammer_object.c

sys/vfs/hammer: Cleanup incore record tree lookup
Delta File
+7 -9 sys/vfs/hammer/hammer_object.c
+7 -9 1 file

DragonFlyBSD — sys/vfs/hammer hammer_object.c

sys/vfs/hammer: Cleanup parent inode dereferenced by record
Delta File
+6 -8 sys/vfs/hammer/hammer_object.c
+6 -8 1 file

DragonFlyBSD — share/ctypedef en_US.UTF-8.src, tools/tools/locale/etc common.UTF-8.src manual-input.UTF-8

UTF8 locales: Fully consider "CIRCLED_" set as alphabet

This means defining the "A"-"Z" and "a"-"z" circled versions of the
Enclosed Alphanumerics block (0x2460-24FF) as hexidecimal digits and
defining the to-upper and to-lower conversions between the upper case
and lower case circled alphabets.

DragonFlyBSD — share/ctypedef en_US.UTF-8.src, tools/tools/locale/etc common.UTF-8.src manual-input.UTF-8

UTF-8: Multiple improvements (and detection of possible issue)

This commit started out intending to fix "digit" definition on unicode,
which it mostly does, but a lot more happened in the end, namely:

 * digits apparently are not part of CLDR definition.  I added a section
   in the manual portion of UTF-8 source file that defines digit classes
   for generated sections.
 * Add numbers classification for entire UTF-8.  Currently DragonFly and
   all BSDs do not support "number" type.  However, localedef understands
   it (its supported on Illumos), but currently the number flag value is
   zero, so it's a no-op.  A short term goal is to have DragonFly be the
   first BSD with proper number ctype handling.
 * Redefine "special" ctype once and for all.  There is no definitive
   agreement on what "special" characters are.  According to wiki which
   got it from unicode, it starts with 33 characters (0x20 - 0x2F, 0x3A -
   0x40, 0x5B - 0x60, 0x7B - 0x7E).  However, localedef objects to <space>
   because it sets "graph" and "print" flags, and <space> can't be graph.
   As a result, the <space> is not considered "special" here.  Moreover,
   the punctuation in Latin-1 supplement is "special".  The division and
   multiplication signs are ambiguous, so I set them to special (since
   plus and minus signs are special).  Finally, with the most doubt, the
   punctuation of "general punctuation" block is also considered special
   although I couldn't find convincing evidence either way.  Given the
   lack of definition, I don't think "special" classification is really

    [31 lines not shown]

DragonFlyBSD — sbin/hammer2 hammer2.8, sbin/newfs_hammer2 newfs_hammer2.8

hammer2.8/newfs_hammer2.8: Some small fixes.

DragonFlyBSD — sys/vfs/hammer2 hammer2_thread.c hammer2_inode.c

hammer2 - stabilization - Fix bugs found by blogbench

* Make sure that any inode without an associated vnode gets put on
  the sideq if it is dirtied, otherwise it might not ever get flushed.

* Fix a SMP race in hammer2_xop_start_except().  For asynchronous completions,
  the xop can become invalid the instant we release our spinlock if another
  thread manages to process, retire, and free it.

DragonFlyBSD — sys/kern vfs_syscalls.c vfs_cache.c, sys/sys mount.h namecache.h

kernel - Improve namecache generation handling

* Reduce mount->mnt_namecache_gen from 64 to 32 bits and add a dummy
  field so the structure size does not change.

* Reduce namecache->nc_namecache_gen from 64 to 32 bits and add a
  second generation number to detect cache_unlink() and cache_rename()
  calls.  Bump the counter in cache_rename() and _cache_unlink().
  Structure size did not change.

* Refactor kern_rename() to use namecache->nc_generation to detect
  a larger subset of changes to the namecache entries which can leak
  in due to the temporary unlock of fromnd->nl_nch.ncp.

DragonFlyBSD — sys/vfs/hammer2 hammer2_xops.c hammer2_vnops.c

hammer2 - stabilization - Fix a number of bugs revealed by fsx and fsstress.

* Fix block rewriting against deduped data (dedup_off != 0 in call to
  hammer2_chain_resize()).  It was hitting an assertion due to chain->bytes
  not being properly updated.

* A coarse lock is required on the pfs around any link() or rename() which
  needs to mess with hardlink targets.

* Fix an inode meta.nlinks race between the frontend and the backend.  The
  frontend tracks a master copy of the inode.  The backend must also adjust
  meta.nlinks during link and unlink operations because it reads the field
  to determine if the hardlink target should be removed or not.

  This required fixes in hammer2_xop_nlink() and hammer2_xop_nremove() and
  some functional augmentation to hammer2_xop_nlink().

* Leave the target inode locked through the whole rename sequence, the
  hardlink target shifts are just too complex (for now) to be able to rely
  on inode locks.

* Fix an incorrect shared lock in hammer2_xop_nrename() which could result
  in a parent modification being made while held shared instead of exclusive.

* Add debug output for an issue in hammer2_xop_nrename() that has not yet
  been fixed (kprintf... ENOENT).

DragonFlyBSD — usr.sbin/acpi/acpicall acpicall.c

acpicall(8): Style fixes.
Delta File
+5 -5 usr.sbin/acpi/acpicall/acpicall.c
+5 -5 1 file

DragonFlyBSD — sys/dev/drm drm_irq.c drm_fops.c, sys/dev/drm/include/drm drmP.h

drm: Update drm_irq.c...

... to commit 56cc279b29c7b204fe7d0943509ae209b8b128db from Linux 3.18
drm: Fix deadlock between event_lock and vbl_lock/vblank_time_lock

Imre Vadász noticed a deadlock in the drm code handling vblank irqs.
Fortunately, this was also noticed by the Linux drm developers and fixing
the issue was just a matter of updating drm_irq.c

Reviewed-by: ivadasz

DragonFlyBSD — usr.sbin/acpi/acpicall acpicall.8

acpicall.8: Fix backslashes in method paths.
Delta File
+2 -2 usr.sbin/acpi/acpicall/acpicall.8
+2 -2 1 file

DragonFlyBSD — share/man/man4 acpi.4, sys/dev/acpica acpi.c acpiio_mcall.h

Add a acpicall(8) utility for debugging and tweaking purposes.

It is based on ports' sysutils/acpi_call (from Maxim Ignatenko) with
a few changes by me:

* Rename acpi_call -> acpicall.

* Ioctl handling is in the main acpi.ko module.

* To enable it, the debug.acpi.allow_method_calls tunable needs to
  be set.

* In acpi_call, the mandatory -p option was used to pass the method's
  namespace path. I removed the option and made the path acpicall(8)'s

* Wrote a manual page and cleaned up a bit.

The separate acpiio_mcall.h file was added because ACPIIO_DO_MCALL's
argument struct uses ACPICA types, so it needs acpi.h which acpiio.h
(a public header used by some ports) so far didn't need. So to avoid
any hassle, I put the ACPIIO_DO_MCALL ioctl into a separate header
(it's only used by acpicall(8) anyway).

The changes to kdump(1) and truss(1) are to include and build with

    [3 lines not shown]

DragonFlyBSD — sys/kern uipc_usrreq.c

uipc: Assert 0->1 reference count transition; it must not happen.
Delta File
+2 -2 sys/kern/uipc_usrreq.c
+2 -2 1 file

DragonFlyBSD — sys/kern uipc_usrreq.c

uipc: Check unp_conn again after unp_connect().

Since the current unp's token could be released after unp_conn
assignment, we need to check unp_conn again even if unp_connect()
returns no error.
Delta File
+13 -6 sys/kern/uipc_usrreq.c
+13 -6 1 file

DragonFlyBSD — sys/vfs/hammer hammer_object.c hammer.h

sys/vfs/hammer: Remove prototype of not existing fucntion

This function no longer exists.
Also fix wrong name in kprintf().

DragonFlyBSD — sys/vfs/hammer2 hammer2_bulkfree.c hammer2_inode.c

hammer2 - bug fixes

* When a dirty inode is reclaimed meta-data changes stored in the inode
  structure could sometimes get lost.  These changes must be synchronized
  to the chains in the underlying cluster nodes.

  Repurpose the unlinkq into a more general 'sideq' that handles both
  deletion-on-reclaim and dirty-meta-data-on-reclaim.

  Add a flag to the inode to represent when it is on the sideq, preventing
  situations where it might be added twice.

* Enable the free->allocated transition in the bulkfree code.  Add
  additional statistics and an underflow/overflow check for
  hammer2_bmap_data->avail.  Also adjust the volume free space
  in both directions.  Do not update any live field if 'nofree' is
  set for the chain (~1GB granularity representing possible
  frontend/backend races).

DragonFlyBSD — sbin/hammer hammer.8, sbin/hammer2 hammer2.8

hammer2 - Refactor bulkfree

* Change the bulkfree scan from breadth-first to depth-first.  This
  improves disk performance significantly (~2x) and is also needed for the
  duplicate-detection feature.

* Create an 8-way set-associative hash table similar to what the live
  dedup code uses.  Record the data_off for elements we have processed
  and detect if a duplicate is encountered so we do not have to re-process
  the duplicate subtree.

  Also prioritize the table based on the aggregate bottom-up inode count
  to reduce the chance that a top-level duplicate (aka snapshot) will get
  kicked out of the hash table.

* Clean up the hammer2_chain_scan() API, making it more bref-centric
  which allows us to avoid instantiating chain structures for leaf
  entities.  This significantly improves performance and increases

* Manual page adjustments for kern.maxvnodes settings suggestions.

DragonFlyBSD — include wctype.h, lib/libc/locale iswctype.c

iswdigit(3), iswxdigit(3): Don't limit to U007F

We inherited a valid range of 00 - 127 for checking wide characters for
type digit or xdigit.

This is a mistake.  The relationship between digits (iswdigit) and
numbers (iswnumber, iswalnum) is that digits are a subset of numbers.
Digits are also a subset of xdigits (iswxdigit).  Digits are limited
to radix-10.  Numeric typess, on the other hand, include factions,
Roman Numerals, circled, etc.  It should cover the entire unicode
(UTF-8) range.

Unfortunately, DragonFly doesn't support the "number" type yet.  The
iswnumber and iswalnum just use the "digit" definition.  Note that
before this commit, they used full range for "digit" type while the
iswdigit() and iswdigits() themselves were limited.
Delta File
+2 -2 include/wctype.h
+2 -2 lib/libc/locale/iswctype.c
+4 -4 2 files

DragonFlyBSD — share/ctypedef en_US.UTF-8.src, tools/tools/locale/etc common.UTF-8.src manual-input.UTF-8

UTF8 locales: Refine Latin supplement more

The multiplication and division sign were missing, and the control
characters were not outlined.  Also set superscript 1,2,3 as digits.
There are not showing up with iswdigit() function so that requires
further investigation (iswdigit does work for '0','1',...'9' however)

DragonFlyBSD — sys/kern uipc_usrreq.c

uipc: Hold per-unp token for all unp usrreq methods
Delta File
+47 -25 sys/kern/uipc_usrreq.c
+47 -25 1 file

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Add some assertions
Delta File
+6 -5 sbin/hammer/cmd_show.c
+6 -5 1 file

DragonFlyBSD — share/ctypedef en_US.UTF-8.src, tools/tools/locale/etc common.UTF-8.src manual-input.UTF-8

UTF8 locales: Include inverted exclamation mark too

I was off by one character when I defined the first range on the previous
commit.  It starts with an inverted exclamation mark, not the cent sign.

DragonFlyBSD — share/ctypedef en_US.UTF-8.src, tools/tools/locale/etc common.UTF-8.src manual-input.UTF-8

UTF8 locales: Complete implemenation of Latin-1 Supplement

The Latin-1 Supplement block of UTF-8 (U0080-U00FF) was not fully
implemented.  Specifically it was missing U00A1 (inverted exclamation)
through U00BF (inverted question mark).  Some popular characters this
affected was cent sign, pound sign, Yen sign, broken bar, copyright
symbol and superscripts.  On international keyboards, AltGR + number
key wouldn't output correctly.  This addition to the manual ctype input
definitions (and subsequent regenerations) will fix these issues.

Reported by: profmakx, ivadasz
Diagnostics: YRabbit

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Fix boundary test on hammer show [3/3]

Separate child node test info RBN and non-RBN. hammer must
have set subtree_offset=0 for RBN and is considered error
if !=0.
Delta File
+23 -12 sbin/hammer/cmd_show.c
+23 -12 1 file

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Fix boundary test on hammer show [2/3]

get_elm_flags() using HAMMER_BTREE_TYPE_INTERNAL for btype
of RBN of an internal node is not correct because btype of
RBN is actually not specified. It could be internal or leaf
or possibly 0, while RBN has no child regardless of the btype

This results in get_elm_flags() having incorrect (but does
not fail with 'B' mark) condition for left/right elm test
for internal node. The correct way is to separate RBN case
from non-RBN case. RBN logically has no child node (hammer
erases child node offset with 0 on node split, if not zero
clears the whole elm), so it can't be handled in the same
switch(btype) cases like others are.

Separating RBN from non-RBN (normal ELM) makes possible for
each elm in an internal node to have correct left/right test.
* non-RBN is the same as leaf node, so add test_lr() and
  use this in both internal and leaf node.
* RBN needs to be handled differently, so add test_rbn_lr()
  and use this for RBN. The difference is that in RBN
  hammer_btree_cmp(&elm->base, right_bound) == 0
  could happen, so test_rbn_lr() can not set FLAG_TOOFARRIGHT
  when it's ==0. Below is some details on how this happens

    [80 lines not shown]
Delta File
+49 -30 sbin/hammer/cmd_show.c
+49 -30 1 file

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Fix boundary test on hammer show [1/3]

This commit actually doesn't fix anything, but just to make
get_elm_flags() take elm index instead of btype.

get_elm_flags() needs elm index to correctly test boundary
and non-boundary elements. btype can be retrieved from elm
itself, so it doesn't need to be passed as an argument.

XXX part is where it needs to be fixed.
Delta File
+9 -6 sbin/hammer/cmd_show.c
+9 -6 1 file

DragonFlyBSD — sys/vfs/hammer2 hammer2_synchro.c hammer2_thread.c

hammer2 - live dedup, cleanup

* First attempt at a live dedup.  The H2 strategy code now caches
  {data_off, crc} info to track recently accessed data blocks.  The
  cache is checked in the strategy_write code after device-level
  block encoding.  If we get a cache hit, the disk block is compared
  against the write data and reused if it matches.

* This 'live' dedup should catch most typical 'cp' or 'cpdup' style
  commands.  There will also be a bulk dedup capable of catching

* Note that 'df' output might be a bit confusing because the 'Used'
  field represents the topology and does not take into account dedups.
  'Avail' is calculated from the actual freemap.  To make things look
  right the total disk size is adjusted upward so it matches
  Used+Avail.  This mechanism will likely change.

  Here is an example with one copy of /usr/src and 13 copies of /usr/src.
  The first copy eats around 872MB, and a 'du' will show each copy eating
  about the same.  But because of dedup each subsequent copy actually only
  eats around 160MB as you can see from the 'Avail' field:

    test40# df -h /mnt
    Filesystem                             Size   Used  Avail Capacity

    [10 lines not shown]

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Make hammer show test node count
Delta File
+10 -4 sbin/hammer/cmd_show.c
+10 -4 1 file

DragonFlyBSD — sbin/hammer cmd_blockmap.c cmd_show.c

sbin/hammer: Make hammer blockmap|checkmap|show print # of 'B' on -v

similar to the way hammer checkmap prints # of errors,
and some refactoring around that part.

(otherwise one has to search for "^B" to see if there
is any error in some 100M bytes hammer show result for
large fs)
Delta File
+50 -17 sbin/hammer/cmd_blockmap.c
+38 -25 sbin/hammer/cmd_show.c
+88 -42 2 files

DragonFlyBSD — sys/bus/u4b/audio uaudio_pcm.c, sys/bus/u4b/gadget g_mouse.c g_keyboard.c

kernel: Use NULL for pointers in DRIVER_MODULE* calls.

DragonFlyBSD — sys Makefile

kernel: Add gnu/ to SUBDIR for MODULES_WITH_WORLD.

I forgot to do that in b993bb87ded5c733e1f0213efbef1be2660b2536.
Delta File
+1 -1 sys/Makefile
+1 -1 1 file

DragonFlyBSD — sys Makefile

kernel: Add gnu/ to SUBDIR for MODULES_WITH_WORLD.

I forgot to do that in b993bb87ded5c733e1f0213efbef1be2660b2536.
Delta File
+1 -1 sys/Makefile
+1 -1 1 file

DragonFlyBSD — sys/vfs/hammer hammer_cursor.c

sys/vfs/hammer: Remove redundant elm type check [2/2]

The following code(A) in hammer_cursor_down() is redundant.
It works the same with or without if/else conditional.

hammer_is_internal_node_elm(elm) == 1
node->ondisk->type == HAMMER_BTREE_TYPE_INTERNAL
are essentially the same thing from the way hammer's ondisk
data structure is designed.

If above is not true, then it ends up calling panic().
Then (A) can be written like (B), and (B) can be written
like (C) since it's either panic or not panic anyway.

Also the way (C) looks is natural given that the purpose
of this function is to move the cursor downward to one of
its children. It must be an internal (non-leaf) to be able
to go down.

if (hammer_is_internal_node_elm(elm)) {
        /* below never fails if above is true, and */
        /* above would have never failed if below is true */
        KKASSERT(node->ondisk->type == HAMMER_BTREE_TYPE_INTERNAL);

    [18 lines not shown]
Delta File
+16 -21 sys/vfs/hammer/hammer_cursor.c
+16 -21 1 file