Re: Targetcli issue with 4.1.0-rc5+ and qla2xxx

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

 



Hi Nicholas,


On 5/30/15, 6:33 PM, "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx> wrote:

>Hi Himanshu,
>
>(Adding HCH, as commit 9ac8928e6a are his changes)
>
>On Fri, 2015-05-29 at 20:22 +0000, Himanshu Madhani wrote:
>> adding mailing list
>> 
>> 
>> 
>> From:  Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>
>> Date:  Friday, May 29, 2015 at 11:59 AM
>> To:  "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx>
>> Cc:  Quinn Tran <quinn.tran@xxxxxxxxxx>, Arun Easi
>><arun.easi@xxxxxxxxxx>,
>> Giridhar Malavali <giridhar.malavali@xxxxxxxxxx>
>> Subject:  Targetcli issue with 4.1.0-rc5+ and qla2xxx
>> 
>> 
>> >Hi Nicholas, 
>> >
>> >I just updated my kernel to 4.1.0-rc5+ and I am seeing problem to
>>create
>> >ram disk target with latest kernel.
>> >
>> >/> cd backstores/ramdisk
>> >/backstores/ramdisk> create rm_lun0 1G
>> >Created ramdisk rm_lun0 with size 1G.
>> >/backstores/ramdisk> ls
>> >o- ramdisk 
>> 
>>>........................................................................
>>>..
>> >................. [Storage Objects: 1]
>> >  o- rm_lun0 
>> 
>>>........................................................................
>>>..
>> >............. [(1.0GiB) deactivated]
>> >/backstores/ramdisk> cd ..
>> >/backstores> cd ..
>> >/> cd qla2xxx
>> >
>> >/qla2xxx> create 21:00:00:24:ff:78:46:b4
>> >Cannot change enable state: [Errno 19] No such device
>> >
>> >/qla2xxx> create naa.2100000e1e08c720
>> >Cannot change enable state: [Errno 19] No such device
>> >
>> >
>> >Note when I revert back to 4.0.0-rc7+ I am able to create the ram disk
>> >target.  I¹ve identified the patch by which introduced this regression
>> >
>> 
>>>https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?
>>>id
>> >=9ac8928e6a3e1ed02e632e45aa766129fe6b1802
>> >
>> >I also verified while debugging this that directory structured did get
>> >created for target portal group before we go enable it.
>> >
>> >Here¹s script that I used to check that the call to create tpgt_1 was
>> >successful
>> >
>> ># tcm_setup.sh -m qla2xxx -c
>> >++ lsmod
>> >++ grep -w '^tcm_qla2xxx'
>> >+ tmp='tcm_qla2xxx            28705  0 '
>> >+ [[ tcm_qla2xxx            28705  0  == '' ]]
>> >+ mount -t configfs configfs /sys/kernel/config
>> >+ mkdir /sys/kernel/config/target/qla2xxx
>> >+ cd /sys/kernel/config/target/core
>> >+ mkdir rd_mcp_0
>> >+ mkdir rd_mcp_0/q_tcm_mcp.0
>> >+ echo rd_pages=12800
>> >+ echo 1
>> >+ echo 73f3ebae-f06f-41be-94ca-3d7ec76f
>> >+ cd /sys/kernel/config/target/qla2xxx
>> >+ mkdir 21:00:00:0e:1e:08:c7:20
>> >+ cd /sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20
>> >+ mkdir tpgt_1
>> >+ [[ fc == \i\s\c\s\i ]]
>> >+ mkdir tpgt_1/lun/lun_0
>> >+ ln -s /sys/kernel/config/target/core/rd_mcp_0/q_tcm_mcp.0
>> 
>>>/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/lun/lun
>>>_0
>> >/tcm_123
>> >+ cd 
>>/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/acls
>> >+ mkdir 21:00:00:0e:1e:15:f7:50
>> >+ mkdir 21:00:00:0e:1e:15:f7:50/lun_0
>> >+ ln -s 
>> 
>>>/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/lun/lun
>>>_0
>> > 21:00:00:0e:1e:15:f7:50/lun_0/
>> >+ cd /sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1
>> >+ [[ fc == \i\s\c\s\i ]]
>> >+ [[ tcm_qla2xxx == \t\c\m\_\q\l\a\4\x\x\x ]]
>> >+ echo 1
>> >/root/bin/tcm_setup.sh: line 152: echo: write error: No such device
>> >
>> >Here¹s same script I ran with this setup before the patch ("target:
>> >simplify the target template registration
>> > API²)
>> >
>> ># ./tcm_setup.sh -m qla2xxx -c
>> >++ lsmod
>> >++ grep -w '^tcm_qla2xxx'
>> >+ tmp='tcm_qla2xxx            29399  0 '
>> >+ [[ tcm_qla2xxx            29399  0  == '' ]]
>> >+ mount -t configfs configfs /sys/kernel/config
>> >+ mkdir /sys/kernel/config/target/qla2xxx
>> >+ cd /sys/kernel/config/target/core
>> >+ mkdir rd_mcp_0
>> >+ mkdir rd_mcp_0/q_tcm_mcp.0
>> >+ echo rd_pages=12800
>> >+ echo 1
>> >+ echo 73f3ebae-f06f-41be-94ca-73dd50ed
>> >+ cd /sys/kernel/config/target/qla2xxx
>> >+ mkdir 21:00:00:0e:1e:08:c7:20
>> >+ cd /sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20
>> >+ mkdir tpgt_1
>> >+ [[ fc == \i\s\c\s\i ]]
>> >+ mkdir tpgt_1/lun/lun_0
>> >+ ln -s /sys/kernel/config/target/core/rd_mcp_0/q_tcm_mcp.0
>> 
>>>/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/lun/lun
>>>_0
>> >/tcm_123
>> >+ cd 
>>/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/acls
>> >+ mkdir 21:00:00:0e:1e:15:f7:50
>> >+ mkdir 21:00:00:0e:1e:15:f7:50/lun_0
>> >+ ln -s 
>> 
>>>/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/lun/lun
>>>_0
>> > 21:00:00:0e:1e:15:f7:50/lun_0/
>> >+ cd /sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1
>> >+ [[ fc == \i\s\c\s\i ]]
>> >+ [[ tcm_qla2xxx == \t\c\m\_\q\l\a\4\x\x\x ]]
>> >+ echo 1
>> >
>> >Any suggestion to fix this would be really helpful.
>> >
>
>Thanks for tracking down the offending commit.
>
>This is a regression around se_portal_group->se_tpg_tfo->tf_subsys
>usage with configfs_depend_item() in tcm_qla2xxx_depend_tpg().
>
>Prior to the changes in commit 9ac8928e6, the ->tf_subsys pointer would
>be set at target_core_register_fabric() time.  With these fabric API
>registration changes in place, all target_core_fabric_ops (tfo)
>definitions are marked as const so this assignment is no longer
>happening, thus causing configfs_depend_item() to fail with -ENOENT
>because it can't locate a valid configfs_dirent.
>
>So this regression was already fixed in a subsequent patch from HCH
>that's queued in for-next code.  I've cherry-picked it out of for-next
>into target-pending/master here:
>
>target: Fix se_tpg_tfo->tf_subsys regression + remove tf_subsystem
>https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit
>/?id=d588cf8f618d7b316743a0bc99fede20f7a01bb7
>
>and will be pushing to mainline for v4.1-rc6 shortly.
>
>Thanks for reporting!

I just verified with 4.1.0-rc6+ kernel and I am now able to create RAM
disk targets. Thanks for quick turnaround.

# targetcli
targetcli shell version 2.1.fb39
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/qla2xxx> ls
o- qla2xxx 
...........................................................................
................................. [Targets: 2]
  o- naa.2100000e1e08c720
...........................................................................
.................... [gen-acls]
  | o- acls 
...........................................................................
................................... [ACLs: 1]
  | | o- naa.2100000e1e15f750
...........................................................................
.......... [Mapped LUNs: 4]
  | |   o- mapped_lun0
...........................................................................
 [lun0 ramdisk/q_tcm_rdmcp.0 (rw)]
  | |   o- mapped_lun1
...........................................................................
 [lun1 ramdisk/q_tcm_rdmcp.1 (rw)]
  | |   o- mapped_lun2
...........................................................................
 [lun2 ramdisk/q_tcm_rdmcp.2 (rw)]
  | |   o- mapped_lun3
...........................................................................
 [lun3 ramdisk/q_tcm_rdmcp.3 (rw)]
  | o- luns 
...........................................................................
................................... [LUNs: 4]
  |   o- lun0 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.0]
  |   o- lun1 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.1]
  |   o- lun2 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.2]
  |   o- lun3 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.3]
  o- naa.2100000e1e08c721
...........................................................................
.................... [gen-acls]
    o- acls 
...........................................................................
................................... [ACLs: 1]
    | o- naa.2100000e1e15f751
...........................................................................
.......... [Mapped LUNs: 4]
    |   o- mapped_lun0
...........................................................................
 [lun0 ramdisk/q_tcm_rdmcp.4 (rw)]
    |   o- mapped_lun1
...........................................................................
 [lun1 ramdisk/q_tcm_rdmcp.5 (rw)]
    |   o- mapped_lun2
...........................................................................
 [lun2 ramdisk/q_tcm_rdmcp.6 (rw)]
    |   o- mapped_lun3
...........................................................................
 [lun3 ramdisk/q_tcm_rdmcp.7 (rw)]
    o- luns 
...........................................................................
................................... [LUNs: 4]
      o- lun0 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.4]
      o- lun1 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.5]
      o- lun2 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.6]
      o- lun3 
...........................................................................
................... [ramdisk/q_tcm_rdmcp.7]
/qla2xxx>



>
>--nab
>

ÿ淸º{.nÇ+돴윯돪†+%듚ÿ깁負¥Šwÿº{.nÇ+돴­j¸륏^썽ÿŠ{ayºÊ뉅숇,j?f"·hš륅곴ÿ묎çz_溫(?šŽ듶¢j"얎¶m§ÿÿ¾?G«앶ÿ◀?솳鈺Ú&x§~뤳





[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