run fio failed when enable hw-opal
Issue description
run the fio on luks device after format luks with hw-opal, will get fio Operation not supported
error, please have a look if something was wrong
Steps for reproducing the issue
- get a nvme partition like the nvme0n1p1
nvme0n1 259:0 0 1.5T 0 disk
nvme0n1p1 259:4 0 5G 0 part
- format with hw-opal
echo -e passwdpasswd | cryptsetup --type 'luks2' luksFormat /dev/nvme0n1p1 -q --hw-opal /tmp/slot_key
- check the status
nvme sed discover /dev/nvme0n1p1
Locking Features:
Locking Supported: Yes
Locking Feature Enabled: Yes
Locked: Yes
- open and mount
echo -e passwdpasswd | cryptsetup --type 'luks2' open /dev/nvme0n1p1 test -q
mkfs.xfs -f /dev/mapper/test
mount /dev/mapper/test test
- run fio
fio --ioengine='libaio' --size='1g' --runtime='300' --filename=/home/test/test.fio --rw='randrw' --name='fio_test' --direct='1' --iodepth='1' --numjobs='1' --bs='4k'
fio_test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.34-354-g349b
Starting 1 process
fio_test: Laying out IO file (1 file / 1024MiB)
fio: pid=0, err=95/file:filesetup.c:253, func=fsync, error=Operation not supported
Run status group 0 (all jobs):
6.get the log when run the fio
[ 587.108950] dm-3: writeback error on inode 131, offset 170622976, sector 333440
[ 605.813958] nvme0n1: Write(0x1) @ LBA 49147, 32 blocks, Invalid Field in Command (sct 0x0 / sc 0x2)
[ 605.830508] operation not supported error, dev nvme0n1, sector 393176 op 0x1:(WRITE) flags 0x14800 phys_seg 1 prio class 0
# cryptsetup --version
cryptsetup 2.8.0-git flags: UDEV BLKID KEYRING KERNEL_CAPI HW_OPAL
# fio --version
fio-3.34-354-g349b
# uname -r
6.9.0-rc4.kasan+