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

lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit bd689be968d8624d0235bdafd00bc016ed8b30e7
Author: Zixuan Liu <[email protected]>
AuthorDate: Mon Apr 13 13:05:23 2026 +0800

    [fix][ci] Ensure discard_max_bytes is set to 0 only for existing block 
devices (#25510)
    
    (cherry picked from commit 089f87f329bb5c576c4a731d95bd8564ca8a66b6)
---
 .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 d071f534dbb..da9c7f06839 100644
--- a/.github/actions/tune-runner-vm/action.yml
+++ b/.github/actions/tune-runner-vm/action.yml
@@ -53,8 +53,10 @@ runs:
             fi
             # 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 unnecessary timers
             sudo systemctl stop fstrim.timer fstrim.service \

Reply via email to