Re: target: problems with Persistent reservations, iscsi

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

 



On Thu, 2011-01-06 at 18:22 -0300, Gustavo Panizzo wrote:
> On Wed, Jan 5, 2011 at 9:13 PM, Nicholas A. Bellinger
> <nab@xxxxxxxxxxxxxxx> wrote:
> > For proper production PR usage you really, *really* want to use explict NodeACLs with the
> > correct Initiator IQN names and disable demo mode all together.  However, it is possible to use
> > demo-mode with PR ops for non production (eg: testing) purposes, but it is not as nearly well
> > tested as using Explict Node ACLs.
> ok, i followed the guide. i'm not super familiar with iscsi
> after the tests you asked, i modified my setup to use *correct*
> nodenames on the acl and disabled the demo mode
> 

Hi Gustavo,

Thanks again for your follow up and helping to elimate TPG demo_mode
operation as the culprit.   My comments are below.

> >
> > So that said, there are two more tests I would like you to run to help isolate this particular
> > issue wrt to PR operation with demo mode (eg: generate_node_acls=1)
> >
> > *) Please go ahead and enable 'cache_dynamic_acls' for the TargetName+TargetPortalGroupTag endpoint
> > with the following and retest using the Vertias test suite.
> >
> > echo 1 > /sys/kernel/config/target/iscsi/iqn.2010.ar.com.zumbi:disk0/tpgt_1/attrib/cache_dynamic_acls
> it failed :(
> dmesg.test1 is the log file
> >
> > This will keep around the dynamically generated struct se_node_acls
> > which does have an effect on certain PR operations, but thus far you are
> > the first to the NULL pointer deference issue with demo mode PR
> > operation.
> >
> > *) From there, go ahead and disable demo mode all together for the TargetName+TargetPortalGroupTag
> > endpoint with:
> >
> > echo 0 > /sys/kernel/config/target/iscsi/iqn.2010.ar.com.zumbi:disk0/tpgt_1/attrib/generate_node_acls
> >
> > and fix the NodeACLs to match the actual initiator side IQNs and retest again.
> it failed too
> dmesg.test2 is the log file
> >

Ok, it appears that this OOPs is actually breakage for UNIT_ATTENTION
conditions from the addition of > 16 byte extended CDB support added
during the v4.0 development cycle last fall.  I am currently testing
with the patch below to ensure the T_TASK(cmd)->t_task_cdb pointer is
setup before the UA check in transport_generic_cmd_sequencer() can
return an exception, and will be verifying the fix shortly.

Please re-test your .37-rc7 setup with the following patch with explict
NodeACLs and/or TPG demo mode operation w/ cache_dynamic_acls=1 and let
us know your results.

Thanks!

--nab

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 2b59890..02e92a3 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1897,13 +1897,6 @@ int transport_generic_allocate_tasks(
 
        transport_device_setup_cmd(cmd);
        /*
-        * See if this is a CDB which follows SAM, also grab a function
-        * pointer to see if we need to do extra work.
-        */
-       ret = transport_generic_cmd_sequencer(cmd, cdb);
-       if (ret < 0)
-               return ret;
-       /*
         * Ensure that the received CDB is less than the max (252 + 8) bytes
         * for VARIABLE_LENGTH_CMD
         */
@@ -1935,6 +1928,14 @@ int transport_generic_allocate_tasks(
         */
        memcpy(T_TASK(cmd)->t_task_cdb, cdb, scsi_command_size(cdb));
        /*
+        * Setup the received CDB based on SCSI defined opcodes and
+        * perform unit attention, persistent reservations and ALUA
+        * checks for virtual device backends.
+        */
+       ret = transport_generic_cmd_sequencer(cmd, cdb);
+       if (ret < 0)
+               return ret;
+       /*
         * Check for SAM Task Attribute Emulation
         */
        if (transport_check_alloc_task_attr(cmd) < 0) {


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux