nfsd: Add per-MDS fs striping configuration
Commit 72e57bc26417 added support for striping to the pNFS
server when using the Flexible File layout.
It is configured globally via the following sysctls:
vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe
vfs.nfsd.pnfsstripecnt - # of DSs to stripe across
This patch allows the above settings to be overridden
on a per-MDS exported file system basis. With this
patch, a stripeunit can optionally be specified for
the MDS file system listed when one is listed after
a '#' in the "-p" nfsd argument. This is done by
appending "@NNN", where NNN is the stripeunit, in bytes.
The current syntax implies that neither a '#' nor '@'
can be in the MDS mount point's directory path.
This patch does not affect current pNFS server
[2 lines not shown]
[AMDGPU] Fix umin(sffbh(x), bitwidth) fold when x may be all-ones (#201795)
We can drop the umin clamp only if x is neither 0 nor -1. There is a
problem with -1 check:
- old: The old guard `!isAllOnes()` is too weak because if the bit is
not definitely unknown (could be either 0 or 1) this check will not work
properly
- new: `Known.Zero.getBoolValue()` guarantees that there is at least one
`0` bit which means that the value is definitely not -1 which is needed
for this specific case
NAS-141006 / 26.0.0-RC.1 / Stop writing cluster_mode in scst.conf (by bmeagherix) (#19076)
Make middleware the sole writer of SCST's per-device `cluster_mode`
sysfs attribute.
Two writers were competing for the attribute on both nodes:
`pyscstadmin.apply_config_file` (driven by `/etc/scst.conf`) and direct
sysfs writes from middleware. The standby's `scst.conf.mako` renders
based on data that includes the active's runtime cluster_mode, fetched
via `failover.call_remote`. Under load that data could be unstable
enough for the standby to emit `cluster_mode 0` for already-clustered
devices; pyscstadmin's apply then wrote 0 to the runtime, destroying
their per-extent DLM lockspaces. `iscsi.alua.standby_fix_cluster_mode`
would then re-cluster them, the cycle repeating.
This PR removes the race by handing cluster_mode ownership entirely to
middleware.
- `iscsi.scst.path_write_if_needed`: read first and write only if the
[16 lines not shown]
NAS-141271 / 26.0.0-RC.1 / Report when a debug is too large to attach to a bug ticket (by creatorcary) (#19077)
When a user files a support ticket from the WebUI with **Attach debug**
selected, the ticket is created on JIRA, but the debug is sometimes
silently not attached. `support.new_ticket` streams the generated debug
into a temporary file and enforces a `DEBUG_MAX_SIZE` (30 MiB) cap on
the *compressed* archive. If that cap was exceeded, the copy routine
returned early **without** setting `has_debug` and **without** recording
any error, so the job completed successfully with `has_debug=False` and
`debug_attach_error=None`. The WebUI only shows a warning when
`debug_attach_error` is set, so the user saw a plain "Ticket submitted
successfully" message and reasonably assumed the debug was attached when
it was not.
A related path had the same symptom: if `system.debug` itself failed
(for example the HA per-node oversize guard in `system/debug.py` raising
a `CallError`), `debug_job.error` was never checked, so a closed output
pipe could leave `has_debug=True` and the code would attempt to attach
an empty/incomplete file.
[11 lines not shown]
NAS-141271 / 27.0.0-BETA.1 / Report when a debug is too large to attach to a bug ticket (#19075)
When a user files a support ticket from the WebUI with **Attach debug**
selected, the ticket is created on JIRA, but the debug is sometimes
silently not attached. `support.new_ticket` streams the generated debug
into a temporary file and enforces a `DEBUG_MAX_SIZE` (30 MiB) cap on
the *compressed* archive. If that cap was exceeded, the copy routine
returned early **without** setting `has_debug` and **without** recording
any error, so the job completed successfully with `has_debug=False` and
`debug_attach_error=None`. The WebUI only shows a warning when
`debug_attach_error` is set, so the user saw a plain "Ticket submitted
successfully" message and reasonably assumed the debug was attached when
it was not.
A related path had the same symptom: if `system.debug` itself failed
(for example the HA per-node oversize guard in `system/debug.py` raising
a `CallError`), `debug_job.error` was never checked, so a closed output
pipe could leave `has_debug=True` and the code would attempt to attach
an empty/incomplete file.
[6 lines not shown]
Stop writing cluster_mode in scst.conf
Let middleware be the sole writer of cluster_mode via direct sysfs
writes (iscsi.scst.path_write_if_needed and callers). When scst.conf
also drove cluster_mode, pyscstadmin's apply reconciled the runtime
back to whatever value was captured at render time, undoing any
cluster_mode=1 just set by standby_fix_cluster_mode and destroying
per-extent DLM lockspaces on every cycle.
set_standby_lun_to_cluster_mode is repurposed as a predicate for
queueing the fix job. set_active_lun_to_cluster_mode and the state
it depended on (active_extents, cluster_mode_targets, dlm_ready) are
removed.
Must land together with the matching truenas_pyscstadmin change.
(cherry picked from commit 9ec73f8a56bd9b09c2eb19061a0a4ebb6b95f626)
Skip redundant cluster_mode writes to avoid scst_mutex contention
Add iscsi.scst.path_write_if_needed: read the attribute first and
write only if the first line differs. Route the three cluster_mode
setters (set_device_cluster_mode, set_devices_cluster_mode,
set_all_cluster_mode) through it.
The kernel's vdev_sysfs_cluster_mode_store path takes
scst_alloc_sysfs_work, scst_sysfs_queue_wait_work,
scst_suspend_activity (which quiesces in-flight commands) and
acquires the global scst_mutex BEFORE the same-value short-circuit.
So even no-op writes contend on a global mutex and can serialize
behind a long-running cluster_mode operation. cluster_mode_show
is lock-free, so the pre-read is essentially free.
Comparison is first-line-only because show emits a trailing
SCST_SYSFS_KEY_MARK line when cluster_mode is set.
(cherry picked from commit 85b6456f3f055728a9980a11877d59469e183359)
NAS-141006 / 27.0.0-BETA.1 / Stop writing cluster_mode in scst.conf (#19074)
Make middleware the sole writer of SCST's per-device `cluster_mode`
sysfs attribute.
Two writers were competing for the attribute on both nodes:
pyscstadmin.apply_config_file (driven by /etc/scst.conf) and direct
sysfs writes from middleware. The standby's scst.conf.mako renders
based on data that includes the active's runtime cluster_mode, fetched
via failover.call_remote. Under load that data could be unstable
enough for the standby to emit cluster_mode 0 for already-clustered
devices; pyscstadmin's apply then wrote 0 to the runtime, destroying
their per-extent DLM lockspaces. iscsi.alua.standby_fix_cluster_mode
would then re-cluster them, the cycle repeating.
This PR removes the race by handing cluster_mode ownership entirely to
middleware.
- iscsi.scst.path_write_if_needed: read first and write only if the
[2 lines not shown]
Interfaces: Assignments - refactor to MVC for https://github.com/opnsense/core/issues/9945
In order to migrate the interface assignments, we need to think of a way to use the differently named xml nodes for interfaces (wan, lan, ..) into something that closely resembles a standard model implementation.
Since we can't match these nodes in our statically defined model xmls, the main idea is to flush all via an in-memory model with a separate load [construct] and save hook [serializeToConfig].
The next challenge is to "stash" updates and wait for "apply" in certain cases, for this we add a temporary database holding the changes which are synced after the actual system change has happend (pending_action, pending_if). When succesfully applied, the apply function cleans up the final stage of the configuration to make everything consistent again.
This database is a simple single json encoded file named /tmp/.interfaces.todo
[lldb][Windows] Forward debuggee STDOUT through lldb-server via ConPTY (#201124)
`lldb-server.exe` currently does not forward the debuggee's STDIO to the
client.
This patch wires STDOUT using a ConPTY, mirroring the existing
`ProcessWindows` path. The two implementations share the same
infrastructure (PseudoConsole, ConnectionConPTY, ThreadedCommunication):
- The ConPTY is setup in
`GDBRemoteCommunicationServerLLGS::LaunchProcess`.
- `NativeProcessWindows` owns the ConPTY STDOUT read thread. The
read-thread callback forwards each chunk into a new
`NativeProcessProtocol::NewProcessOutput` delegate hook.
- `GDBRemoteCommunicationServerLLGS::NewProcessOutput` copies the data
and posts `SendONotification` to the main loop.
- The ConPTY is closed in `OnExitProcess`.
This patch uses a default terminal size to create the ConPTY, which
[5 lines not shown]
[LoopFusion][NFC] Fix NumSunkInsts statistic description (NFC) (#201841)
The NumSunkInsts counter was described as "Number of hoisted preheader
instructions.", a copy of NumHoistedInsts. It counts sunk instructions.
[MLIR][LLVMIR] Fix llvm.extractvalue folder (#201838)
Fix the llvm.extractvalue folder when trying to extract a value from a
multidimensional constant. Add lit tests that would crash without the
fix.