Re: [PATCHv3 0/4] block: make long runnint operations killable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2/23/24 00:49, Keith Busch wrote:
> From: Keith Busch <kbusch@xxxxxxxxxx>
> 
> Changes from v2:
> 
>   Wait for chained bio's to complete before returning from kill signal.
> 
>   Miscellaneous cleanup patches for style and consistency.
> 
> Keith Busch (4):
>   block: blkdev_issue_secure_erase loop style
>   block: cleanup __blkdev_issue_write_zeroes
>   block: io wait hang check helper
>   blk-lib: check for kill signal
> 
>  block/bio.c     | 12 +----------
>  block/blk-lib.c | 57 ++++++++++++++++++++++++++++++++++++++-----------
>  block/blk-mq.c  | 19 +++--------------
>  block/blk.h     | 13 +++++++++++
>  4 files changed, 61 insertions(+), 40 deletions(-)
> 

I tried applying patchset using "git am" but it failed to apply. Was the patchset 
created against the latest v6.8-rc5? Latter I applied the patchet manually. 

I have tested the changes on my NVMe with ~1.5 TB capacity and verified that
the patch fixed the reported issue.

NVMe details:

# nvme id-ns /dev/nvme0n1 -H 
NVME Identify Namespace 1:
nsze    : 0x1749a956
ncap    : 0x1749a956
nuse    : 0x1749a956
<snip>
nvmcap  : 1600321314816
<snip>
LBA Format  0 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best (in use)
<snip>

# cat /sys/block/nvme0n1/queue/write_zeroes_max_bytes 
8388608
# cat /sys/block/nvme0n1/queue/discard_granularity 
4096
# cat /sys/block/nvme0n1/queue/discard_max_bytes 
2199023255040
 
I tested following cases:
1) Zero-fill all sectors of NVMe using blkdiscard; While test is running 
   kill the 'blkdiscard' from other terminal and check the return status

   # blkdiscars -z /dev/nvme0n1
   Killed
   # echo $?
   137

2) Discard all sectors of NVMe using blkdiscard, While test is running kill 
   the 'blkdiscard' from other terminal

   # blkdiscard /dev/nvme0n1
   Killed
   #echo $?
   137

The bash return the status code 137 which signifies that 'blkdiscard' is killed.

My NVMe doesn't support secure erase operation so I couldn't test it. 
   # blkdiscard -s /dev/nvme0n1 
   blkdiscard: /dev/nvme0n1: BLKSECDISCARD ioctl failed: Operation not supported

Feel free to add:

Tested-by: Nilay Shroff<nilay@xxxxxxxxxxxxx>

Thanks,
--Nilay




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux