68f57679d6 Fixed another class of integer overflows, but introduced a
boundary condition for 2-4s in ns conversion, 2-~4000s in us conversions
and 2-~4,000,000s in ms conversions. This was because we bogusly used
SBT_1S for the notion of 1 second, instead of the appropriate power of
10. To fix, just use the appropriate power of 10, which avoids these
overflows.
This caused some sleeps in ZFS to be on the order of an hour.
MFC: 1 day
PR: 263073
Sponsored by: Netflix
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D34790
The correct logic is a lot simpler than the previous iteration. We
record the base fts_name to avoid having to worry about whether we
needed the root symlink name or not (as applicable), then we can simply
shift all of that logic to after path translation to make it less
fragile.
If we're copying to DNE, then we'll have swapped out the NULL root_stat
pointer and then attempted to recurse on it. The previously nonexistent
directory shouldn't exist at all in the new structure, so just back out
from that tree entirely and move on.
The tests have been amended to indicate our expectations better with
subdirectory recursion. If we copy A to A/B, then we expect to copy
everything from A/B/* into A/B/A/B, with exception to the A that we
create in A/B.
Reviewed by: bapt
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D34655
Use -Wno-unused-but-set-variable for kernel builds with clang13.
To turn this warning back on, set the following in src.conf:
WITH_SET_BUT_NOTUSED_KERNEL_WARNINGS=
Reviewed by: mjg, imp
Differential Revision: https://reviews.freebsd.org/D34784
miivar.h includes opt_platform.h. Make sure all the drivers that use the
miibus_if.h interface file have opt_platform.h as well. While some of
these may not, strictly speaking, need it, it's easier to include it
universally for miibus.
Sponsored by: Netflix
We read TX_STATUS1 to acknowledge a TX interrupt. We don't use this
value for anything, so mark it as unused. We may be able to eliminate
this read, but since this hardware is poorly documented and difficult to
test, I'm leaving the read in place.
Sponsored by: Netflix
bbp_atten is write-only: we don't use it later in
bwi_rf_calc_nrssi_slope_11b. However, we may also be able to eliminate
the read of this value from the device. However, The documationation for
this hardware is thing and I can't test this card so I've left the read
of this register in case it's required.
Sponsored by: Netflix
Add three hooks to the livedump process: before, after, and for each
block of dumped data. This allows, for example, quiescing the system
before the dump begins or protecting data of interest to ensure its
consistency in the final output.
Reviewed by: markj, kib (previous version)
Reviewed by: debdrup (manpages)
Reviewed by: Pau Amma <pauamma@gundo.com> (manpages)
MFC after: 3 weeks
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D34067
This dumper can instantiate and write the dump's contents to a
file-backed vnode.
Unlike existing disk or network dumpers, the vnode dumper should not be
invoked during a system panic, and therefore is not added to the global
dumper_configs list. Instead, the vnode dumper is constructed ad-hoc
when a live dump is requested using the new ioctl on /dev/mem. This is
similar in spirit to a kgdb session against the live system via
/dev/mem.
As described briefly in the mem(4) man page, live dumps are not
guaranteed to result in a usuable output file, but offer some debugging
value where forcefully panicing a system to dump its memory is not
desirable/feasible.
A future change to savecore(8) will add an option to save a live dump.
Reviewed by: markj, Pau Amma <pauamma@gundo.com> (manpages)
Discussed with: kib
MFC after: 3 weeks
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D33813
Add a new function, dumper_create(), to allocate a dumper.
dumper_insert() will call this function and retains the existing
behaviour.
This is desirable for performing live dumps of the system. Here, there
is a need to allocate and configure a dumper structure that is invoked
outside of the typical debugger context. Therefore, it should be
excluded from the list of panic-time dumpers.
free_single_dumper() is made public and renamed to dumper_destroy().
Reviewed by: kib, markj
MFC after: 1 week
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D34068
Add the missing .El which fixes the indentation of the memory range
definitions and operation. Add subsection headings to further clarify
this section. Do the same for the RETURN VALUES section, and mention
explicitly that MEM_EXTRACT_PADDR always returns zero.
Reviewed by: markj, 0mp, Pau Amma <pauamma@gundo.com>
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D34574
For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.
Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct before doing the Write operation.
This patch prepares the NFSv4 client for such an
RPC, which will be added in a future commit.
This patch does not cause any semantics change.
firmware in shutdown
If controller reset is in progress, at same time if system shutdown is
issued then corresponding shutdown function in driver will be invoked
where driver is waiting 15 seconds to complete the controller reset.
If the reset is not complteted within that time frame driver will go
ahead and fire cache flush and shutdown DCMDs which will end up
accessing the the queues which are not initialized due to undergoing
reset leads to FMU error in firmware.
Fix:
In shutdown function, if controller reset is not finished within 15
seconds than driver will return to the OS without firing any DCMDs.
Reviewed by: imp
PR: 261375
There is an additional MPT command allocation for R1 fp command which
will lead to MPT command unavailablity in case of rigorous R1 FP IOs.
Remove additional MPT command allocation for R1 FP.
Reviewed by: imp
PR: 261377
When the unicode locales files where split off the non unicode locales
be_BY.ISO8859-5 and ca_IT.ISO8859-15 where non installed one due to
a typo, the other one was just missing its entry in the Makefile.
It was only notice a year later, by some postgres developpers as it was
breaking some of their tests.
Reported by: tmunro
Move io_mapping_create_wc to .c because it encodes the size of struct
io_mapping so we move this from the client module to the linuxkpi
module.
Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34776
lkpi_pcim_iomap_devres_find encodes the size of struct pcim_iomap_devres
in the code, so move from .h to .c to move from client driver to
linuxkpi module.
Sponsored by: Netflix
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34775
pci_alloc_irq_vectors encodes the size of struct msix_entry
into its code. Move from .h to .c to move this knowledge from
client modules to linuxkpi module.
Sponsored by: Netflix
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34774
Both pci_request_region and _lkpi_pci_iomap encode the size of struct
pci_mmio_region into their code. Move from .h to .c files to move that
knowledge from the client drivers into the linuxkpi module.
Sponsored by: Netflix
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D34773
lkpi_pci_devres_get_alloc encodes the struct pci_devres into its
code. Move from .h file to .c file to move this knowledge into linuxkpi
module.
Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34772
Move cdev_alloc into linux_compat.c since it encodes the size of struct
linux_cdev into the client modules otherwise.
Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34771
class_create encodes the size of struct class into the generated
code. Move from .h file to .c file to move this knowledge from the
client modules that call this into the linuxkpi module.
Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34769
device_create_groups_vargs encodes the size of struct device. Move
definition from .h to .c to move this size into the linuxkpi module
rather than encoding it in all client driver modules.
Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34768
kobject_create knows the size of struct kobject. Move it to
linux_compat.c so this knowledge is confined to the loadable module and
not the clients.
Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34767