Re: targetctl restore and OSError: [Errno 22] Invalid argument

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

 



Hi Andy,

On 04/15/2014 07:44 PM, Andy Grover wrote:
On 04/14/2014 06:05 AM, Krzysztof Chojnowski wrote:
[...]
Is it kernel or targetcli-fb issue?

Thanks for your investigation.

It is both.

There's some questionable exception-catching code in rtslib-fb (the
library targetcli-fb uses) and then in the kernel -- userspace expects
to be able to always set attributes to the value we read (and saved) but
this is not the case for the new pi_prot_type attribute.

I'll fix up rtslib-fb and hopefully post the trivial fix for the kernel
today, as well.

Thanks Andy and Krzysztof for reporting this.
Even though I think that exception other than IOError should not really happen when writing parameters and attributes, I agree that it is still a good thing to catch a broader range of exceptions here in rtslib.

I pushed a patch to rtslib mainline to that effect, catching every exception there, similar to what you now do for the rtslib-fb (BTW, double check your patch, there is a copy/paste typo in it, you raise "Cannot set attribute" in set_parameter() ;-) ).

Best Regards,
--
Jerome Martin
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux