targetctl restore and OSError: [Errno 22] Invalid argument

Krzysztof Chojnowski frirajder at gmail.com
Mon Apr 14 13:05:09 UTC 2014


Hi,

I'm testing targetcli-fb on my Archlinux box and restore functionality 
is failing with following:

# /usr/bin/targetctl restore
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "/usr/lib/python3.4/site-packages/rtslib/node.py", line 140, in 
set_attribute
     fwrite(path, "%s" % str(value))
   File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 67, in 
fwrite
     file_fd.write(str(string))
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "/usr/bin/targetctl", line 87, in <module>
     main()
   File "/usr/bin/targetctl", line 84, in main
     funcs[sys.argv[1]](savefile)
   File "/usr/bin/targetctl", line 47, in restore
     errors = RTSRoot().restore_from_file(restore_file=from_file)
   File "/usr/lib/python3.4/site-packages/rtslib/root.py", line 260, in 
restore_from_file
     abort_on_error=abort_on_error)
   File "/usr/lib/python3.4/site-packages/rtslib/root.py", line 201, in 
restore
     set_attributes(so_obj, so.get('attributes', {}))
   File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 440, in 
set_attributes
     obj.set_attribute(name, value)
   File "/usr/lib/python3.4/site-packages/rtslib/node.py", line 142, in 
set_attribute
     msg = msg[1]
TypeError: 'OSError' object is not subscriptable


I debugged it to following file and value:

# echo 0 > 
/sys/kernel/config/target/core/iblock_0/windows_data/attrib/pi_prot_type
bash: echo: write error: Invalid argument

Dmesg logs following:
[168897.460098] DIF protection not supported by backend: iblock

Is it kernel or targetcli-fb issue?

targetcli-fb 2.1.fb35-1
python-rtslib-fb 2.1.fb47-1
python-configshell-fb 1.1.fb13-1
linux 3.14-4


More information about the targetcli-fb-devel mailing list