Re: Reviving Ibmvscsi target/Questions

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

 



Hello Bart,

Quoting Bart Van Assche <bart.vanassche@xxxxxxxxxxx>:

On 04/26/16 07:28, Bryant G Ly wrote:
It was a pleasure meeting you at the conference last week,
I hope all is well!

I was going to setup everything in order to push a patch up and
I was wondering who would own the files listed below in the
the MAINTAINERS file?

F:      drivers/scsi/scsi_tgt_if.c
F:      drivers/scsi/scsi_tgt_lib.c
F:      drivers/scsi/scsi_tgt_priv.h
F:      include/scsi/scsi_tgt.h
F:      include/scsi/scsi_tgt_if.h

These are the ones that are new that I am bringing back.

Hello Bryant,

If you think you need to bring these files back then there is something severely wrong with the approach of your work. Porting the ibmvscsi target driver to LIO should be done without reintroducing these files. If you need an example, please have a look at the following patch I posted in 2010: "[PATCH 5/7] [SCSI] ibmvstgt: Port from tgt to SCST" (http://thread.gmane.org/gmane.linux.scsi/64465). That patch has been tested on an IBM PowerPC system.

Bart.

Thanks for the help, I forgot that I completely didn't used the
srp_cmd_queue within libsrp, and replaced with with my own
tcm_queuecommand, thus I didnt need any of the scsi_tgt libs anymore.

Side Question:
I am using target_submit_cmd to handle emulation of report_luns and
mode_sense but I can't seem to get the correct data reported back
to the client(initiator).

[   99.899897] ibmvscsis: process_login, tag:4226937213054615552
[ 99.899899] ibmvscsis: send_iu: 0x34 0x1000000e 0xf210000 0x1300000e 0x9b000
[   99.899902] ibmvscsis: crq pre cooked: 0x1, 0x34, 0x3aa9190000000000
[   99.899903] ibmvscsis: send crq: 0x3000000e, 0x8001009900000034, 0x19a93a
[   99.899904] libsrp: srp_iu_put
[   99.899906] ibmvscsis: ibmvscsis_send_crq(0x3000000e, 0x8001009900000034,
0x000000000019a93a)
[   99.899909] ibmvscsis: ibmvcsis_send_crq rc = 0x0
[   99.899911] ibmvscsis: entering handle_cmd_queue
[  100.827450] ibmvscsis: there is an interrupt
[ 100.827463] ibmvscsis: case viosrp mad crq: 0x80, 0x1, 0x0, 0x0, 0x0, 0x40, 0x9b000
[  100.827467] libsrp: srp_iu_get
[  100.827474] ibmvscsis: process srpiu
[  100.827476] ibmvscsis: srpcmd
[  100.827479] ibmvscsis: process_srp_iu, iu_entry: c0000000fbad0000
[  100.827485] ibmvscsis: entering handle_cmd_queue
[  100.827488] ibmvscsis: iueflag: 0
[  100.827490] ibmvscsis: ibmvscsis_queuecommand
[  100.827493] ibmvscsis: tcm_queuecommand
[  100.827495] ibmvscsis: srp_data_length: 1000, srp_direction:2
[  100.827499] ibmvscsis: size of lun:8, lun:
[ 100.827506] ibmvscsis: tcm_queuecommand- se_cmd(c0000001ed1b5178), se_sess(c0000000fe2a0f00), cdb: a0, sense: 0, unpacked_lun: 0, data_length: 1000, task_attr: 22, data_dir: 2 flags: 2, tag:3ba9190000000000, packed_lun:1400adfb000000c0 [ 100.827517] target: se_cmd(c0000001ed1b5178), se_sess(c0000000fe2a0f00), cdb: a0, sense: 0
unpacked lun: 0, data_length: 1000, task_attr: 22 data_dir: 2, flags: 0
[  100.827540] Added HEAD_OF_QUEUE for CDB: 0xa0
[  100.827544] spc_emulate_report_luns
[  100.827549] spc_emulate_report: len:8 luncount:1
[  100.827554] ibmvscsis: iueflag: 8
[  100.827559] Incremented dev_cur_ordered_id: 1 for HEAD_OF_QUEUE
[  100.827564] ibmvscsis: ibmvscsis_queue_data_in
[ 100.827569] libsrp: iue: c0000001faf10030 scsi_buff_len: 16 srp_buff_len: 1048576
scsi_sg_count: 1
[ 100.827583] ibmvscsis: send_iu: 0x36 0x1000000e 0xf220000 0x1300000e 0x9b000
[  100.827589] ibmvscsis: crq pre cooked: 0x1, 0x36, 0x3ba9190000000000
[  100.827592] ibmvscsis: send crq: 0x3000000e, 0x8001009900000036, 0x19a93b
[  100.827594] libsrp: srp_iu_put
[ 100.827598] ibmvscsis: ibmvscsis_send_crq(0x3000000e, 0x8001009900000036, 0x000000000019a93b)
[  100.827607] ibmvscsis: ibmvcsis_send_crq rc = 0x0
[  100.827610] libsrp: srp_iu_put

Function that handles the command queue,
https://github.com/powervm/ibmvscsis/blob/EmulationChanges/drivers/scsi/ibmvscsi/ibmvscsis.c#L1941

The callback function to report back to initiator.
https://github.com/powervm/ibmvscsis/blob/EmulationChanges/drivers/scsi/ibmvscsi/ibmvscsis.c#L779

Any idea's Nick?

Thanks,

Bryant

--
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

--
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