* Fix header size limt check. * Do not free the message data out from under a running I/O. Introduce an API for detaching aux_data from a msg. * Increase DMSG_AUX_MAX to 1MB to ensure that xdisk (remote disks) work with any filesystem. Theoretically we can break up READ and WRITE messages into pieces in order to allow DMSG_AUX_MAX to be made smaller (which is easier to manage in-kernel), but for now the implementation just uses a single message transaction. * Adjust some comments.
xsleep/xwakeup were added to DragonFly in 2003 to replace asleep/awakeup from FreeBSD 4.x. tsleep & wakeup sleep on untyped identifiers; the sleep routines do not store through the identifiers and treat them as opaque. xsleep/xwakeup in contrast slept on explicit sleep structures, 'struct xwait'. xsleep / xwakeup were never used; they were born #if-0ed out and were removed by 2004. This commit removes a legacy declaration and associated header. Submitted-by: vsrinivas Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2786>
hogticks was a global definition used in kern_synch.c:should_yield(). A thread that had remained running for more than hogticks would return true for should_yield(). DragonFly has not used this global for a long time. Submitted-by: vsrinivas Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2787>
* Allow CMD_BUF_READ operations without the device having to be open. This allows disk probes to occur. * Use disk_setdiskinfo(), which is asynchronous, to avoid an I/O deadlock because the call is made from the rxmsg loop. If it were to issue I/O synchronously we would deadlock and never process the reply.
* The "if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD)" test from acpi_video_vo_init was missing in acpi_video_vo_destroy. This meant that on some machines we ended up calling STAILQ_REMOVE with an element not contained in the list, which causes a panic since STAILQ_REMOVE doesn't check for the end of the list.
Some CPUs only have package P-states, but some BIOSes put each hyperthread to its own P-state domain; allow user to override. It is not enabled by default.
- Make hammer_newfs properly set ondisk localization for the first two elements (for root inode and PFS) of the root node. - HAMMER does cursor lookup using sum of onmemory ip(inode) localization and localization type, so in this case hammer_newfs needs to write ondisk bits using (HAMMER_DEF_LOCALIZATION + type) instead of just a type (see hammer_get_inode() and hammer_load_pseudofs() for details). - It makes no binary difference since HAMMER_DEF_LOCALIZATION is 0, however it should be fixed for the consistency (e.g. if the macro happens to be defined differently, although it is not likely as it forces ondisk layout change).
- hunk1 - The root inode uses HAMMER_DEF_LOCALIZATION for its onmemory ip(inode) localization, however the purpose of this macro is not documented anywhere. Make it clear by adding this comment. - hunk2 - Show HAMMER_OBJID_ROOT is the root inode # for both real root inode and PFS root inodes. - hunk3-4 - Change "stored in the root inode" to "associated with the root inode". PFS records are not embedded within the ondisk inode structure, but associated with the root inode by id. Commit ea434b6 uses "associated with" in its commit message.
Now that i386 is no longer supported we can't even run an old FreeBSD cvsup binary anymore, so all this has become completely pointless. FreeBSD has since switched to SVN, NetBSD's repository can be rsync'ed, about OpenBSD I am not sure though. There are git repos of various BSDs too.
The issue is that with -Wunused-local-typedefs, our GCC 5.0 warns about unused local typedefs in its own headers, in this case stl_algo.h which comes in via <algorithm>, which devd(8) includes. Example: c++ [...] -Werror -Wall [...] -c devd.cc In file included from /usr/include/c++/5.0/bits/stl_algo.h:61:0, from /usr/include/c++/5.0/algorithm:62, from devd.cc:93: /usr/include/c++/5.0/bits/stl_heap.h: In function 'void std::pop_heap(_RAIter, _RAIter)': /usr/include/c++/5.0/bits/stl_heap.h:266:2: error: typedef '_ValueType' locally defined but not used [-Werror=unused-local-typedefs] _ValueType; ^ [...] More typedefs are warned about, _InputValueType, _OutputValueType, and _DistanceType.
- Remove #include <sys/types.h> - Kernel include files (i.e. sys/*.h) come first; normally, include <sys/types.h> OR <sys/param.h>, but not both. - Spotted-by: sephe http://lists.dragonflybsd.org/pipermail/commits/2015-February/417986.html
At least GCC 5.0 is warning on its own C++ includes (stl_algo.h, via <algorithm>) if -Wextra is set, breaking the build of programs which do nothing wrong themselves (such as devd(8)). When this gets fixed, we can revert this commit again. Note that I didn't check with GCC 4.8 or 4.9.