This is an automated email from the ASF dual-hosted git repository.

merlimat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new ad2b6e939d fix: ensure discard_max_bytes is set to 0 only for existing 
block devices (#4745)
ad2b6e939d is described below

commit ad2b6e939d0548e88ae6209ec57628814e8c6ee1
Author: Zixuan Liu <[email protected]>
AuthorDate: Tue Apr 21 23:51:03 2026 +0800

    fix: ensure discard_max_bytes is set to 0 only for existing block devices 
(#4745)
---
 .github/actions/tune-runner-vm/action.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/actions/tune-runner-vm/action.yml 
b/.github/actions/tune-runner-vm/action.yml
index 32b7ed6bba..c54f700207 100644
--- a/.github/actions/tune-runner-vm/action.yml
+++ b/.github/actions/tune-runner-vm/action.yml
@@ -57,8 +57,10 @@ runs:
             sudo mount -o remount,nodiscard,commit=999999,barrier=0 /mnt || 
true
             # disable discard/trim at device level since remount with 
nodiscard doesn't seem to be effective
             # https://www.spinics.net/lists/linux-ide/msg52562.html
-            for i in /sys/block/sd*/queue/discard_max_bytes; do
-              echo 0 | sudo tee $i
+            for i in /sys/block/*/queue/discard_max_bytes; do
+              if [ -f "$i" ]; then
+                echo 0 | sudo tee "$i"
+              fi
             done
             # disable any background jobs that run SSD discard/trim
             sudo systemctl disable fstrim.timer || true

Reply via email to