summaryrefslogtreecommitdiff
path: root/rust/proc-macro2/rcvec.rs
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2025-08-02 12:56:37 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2025-11-26 23:52:27 +0000
commitbbbf1529ea9b85072e58c164a9a5d82554ffa941 (patch)
tree3a83af33a08aa61c3e6b4e3848ce80472d291a63 /rust/proc-macro2/rcvec.rs
parent0e10da69d1671109b2ae5ed3eed6aa44b5ee64bc (diff)
gfs2: New gfs2_withdraw_helper
Currently, when a gfs2 filesystem is withdrawn, an "offline" uevent is triggered that invokes gfs2-util's gfs2_withdraw_helper script. The purpose of this script is to deactivate the filesystem's block device so that it can be withdrawn immediately, even before all the filesystem's caches have been discarded. The script provided by gfs2-utils never did anything useful, and there was no way for it to report back its status to the kernel. To fix that, extend the gfs2_withdraw_helper mechanism so that the script can report one of the following results by writing the corresponding value into "/sys$DEVPATH/lock_module/withdraw": 0 - The shared block device has been marked inactive. Future write operations will fail. 1 - The shared block device may still be active and carry out write operations. If the "offline" uevent isn't reacted upon within the timeout configured in /sys$DEVPATH/tune/withdraw_helper_timeout (default 5 seconds), the event handler is assumed to have failed. In addition, add an additional "errors=deactivate" mount option. With these changes, if fatal errors are detected on a gfs2 filesystem and the filesystem is mounted with the "errors=panic" option, the kernel will panic immediately. Otherwise, an attempt will be made to deactivate the underlying block device. If successful, the kernel will release all cluster-wide locks immediately so that the rest of the cluster can continue. If unsuccessful, the kernel will either panic ("errors=deactivate"), or it will purge all filesystem I/O before releasing all cluster-wide locks ("errors=withdraw"). Note that the gfs2_withdraw_helper script still needs to be fixed to take advantage of these improvements. It could be changed to use a mechanism like LVM Persistent Reservations. "dmsetup suspend" is not a suitable mechanism as it infinitely postpones I/O operations, which may prevent withdraw from completing. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'rust/proc-macro2/rcvec.rs')
0 files changed, 0 insertions, 0 deletions