On 2/24/24 23:40, Chaitanya Kulkarni wrote: > On 2/23/24 11:31, Keith Busch wrote: >> On Fri, Feb 23, 2024 at 07:16:30PM +0000, Chaitanya Kulkarni wrote: >>> On 2/23/24 07:59, Keith Busch wrote: >>>> From: Keith Busch <kbusch@xxxxxxxxxx> >>>> >>>> Changes from v3: >>>> >>>> Added reviewed and tested by tags >>>> >>>> More formatting cleanups in patch 2 (Christoph) >>>> >>>> A more descriptive name for the bio chain wait helper (Christoph) >>>> >>>> Don't fallback to the zero page on fatal signal error (Nilay) >>>> >>> we need a blktests for this, for whole series :- >> How would you know know if the device completed the operation before the >> fatal signal or not? This is a quick test script off the top of my head, >> but whether or not it shows a difference with this patch series depends >> on your device. >> >> # time sh -c "blkdiscard -z /dev/nvme0n1 & sleep 1 && kill %1 && >> wait" > > something like that :- > > # record the start time > start_time=get_time_sec > > # Use ginormous value for the device size without membacked for null_blk > # such that it will not finish before 20 min > modprobe -r null_blk > modprobe null_blk gb=2024000000 # this should not finish within 20 min > it got deleted from previous email somehow :- blkdiscard -z /dev/nullb0 & > # kill the process > kill -9 `ps aux | grep blkdiscard | grep -v grep | tr -s ' ' ' ' | cut > -f 2 -d ' '` > > # record total time > total_time=get_time_sec - start_time > > # make sure process doesn't exists > ps aux | grep -v grep | grep blkdiscard > if [ $? -eq 0]; then > echo "Test fail" > fi > > # make sure total_time < 60 sec > if [ $total_time -gt 60 ]; then > echo "Fail" > fi > > echo "success" > > WDYT ? > > -ck > >