On Thu, Jul 24, 2008 at 5:52 PM, Richard Sharpe
<[EMAIL PROTECTED]> wrote:
> On Thu, Jul 24, 2008 at 2:29 PM, Tomasz Chmielewski <[EMAIL PROTECTED]> wrote:
>> Richard Sharpe schrieb:
>>>
>>> On Thu, Jul 24, 2008 at 1:12 PM, Richard Sharpe
>>> <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I was trying to add backing store to LUN 0 with this command and got a
>>>> segmentation fault:
>>>>
>>>>  ./tgtadm --lld iscsi --op update --mode target --tid 1 --lun 0 -b
>>>> /root/data/hd_block
>>>>  Segmentation fault
>>>>
>>>> Is it forbidden to use LUN 0? Here is what a SHOW shows ...
>>>
>>> Sigh, ignore me. The syntax was wrong!
>>
>> It shouldn't segfault anyway, should it?
>
> It seems the segfault is in an error path:
>
>   ./tgtadm --lld iscsi --op update --mode target --tid 1 --lun 0 -b
> /root/data/hd_block
>   tgtadm: err no: 4294967274
>   Segmentation fault
>
> This is in ipc_mgmt_rsp:
>
>        if (rsp.err != TGTADM_SUCCESS) {
>                eprintf("err no: %u\n", rsp.err);
>                eprintf("%s\n", tgtadm_emsg[rsp.err]);
>                return EINVAL;
>        }
>
> So, looks like tgtd is returning -22 somewhere ... instead of turning
> it into a positive error no.

Yes, in the iscsi driver code, iscsi_target_update is returning
-ENOENT and -EINVAL.

These return codes are wrong. It should return a correct
tgtadm_errno.h return code.
_______________________________________________
Stgt-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/stgt-devel

Reply via email to