qemu-nvme icon indicating copy to clipboard operation
qemu-nvme copied to clipboard

_set_written: invalid block state(02) on ocssd12

Open NikoKVCS opened this issue 5 years ago • 7 comments

my test program mainly test erase, write read functions by backend ioctl. and my qemu is ocssd12 branch. i run my qemu with parameters :

-device nvme,drive=myocssd,serial=deadbeef,lver=1,lba_index=3,nlbaf=5,lnum_ch=8,lnum_lun=4,lnum_pln=2,lsecs_per_pg=4,namespaces=1

and when i ran my test program on my qemu, errors happened: "nvm_be_ioctl.c ioctl_vio Failed:cmd->vuser.status:0xfc" "nvm_be_ioctl.c ioctl_vio Failed:cmd->vuser.result:0x2ff" "nvm_be_ioctl.c ioctl_vio Failed:NVME_NVM_IOCTL_SUBMIT_VIO err:-1, errno : Input outpur error"

besides, on my qemu terminal, it also shows errors: ppa:ch(1), lun(3) ... _set_written: Invalid block state(02) lnvm_rw: set written status failed

NikoKVCS avatar Mar 22 '19 15:03 NikoKVCS

and what's going wrong when my qemu terminal shows "Could not read bb file"

NikoKVCS avatar Mar 24 '19 07:03 NikoKVCS

Try using the latest master branch of qemu.

MatiasBjorling avatar Mar 25 '19 11:03 MatiasBjorling

Try using the latest master branch of qemu.

but my codes project is based on ocssd1.0. If i switch to qemu 2.0, seems like i have to modified a lot of my codes.

NikoKVCS avatar Mar 26 '19 06:03 NikoKVCS

Most of the code above the lightnvm system speaks a neutral language that abstracts away the 1.2/2.0 specifics. Are you using that part?

MatiasBjorling avatar Mar 26 '19 08:03 MatiasBjorling

Most of the code above the lightnvm system speaks a neutral language that abstracts away the 1.2/2.0 specifics. Are you using that part?

i noticed that in 2.0 the geo structure includes "chunk punit etc" while 1.2 geo structure is "channel, lun, plane...". and in my project, my addresses are all in format of "channel, lun, planes.."

NikoKVCS avatar Mar 26 '19 08:03 NikoKVCS

It should be straightforward to convert. The difference is in the planes, which is encoded into the sector.

grp = ch pu = lun blk = chk sec = plane + sec.

MatiasBjorling avatar Mar 26 '19 08:03 MatiasBjorling

It should be straightforward to convert. The difference is in the planes, which is encoded into the sector.

grp = ch pu = lun blk = chk sec = plane + sec.

i try my qemu2.0, and write a simple test. But still shows error "segmentation fault"... in fact, in qemu1.0, it also shows "segmentation fault"(but in the "127.0.0.1:5900" terminal)

NikoKVCS avatar Mar 27 '19 07:03 NikoKVCS