This is a note to let you know that I've just added the patch titled

    iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
iscsi-target-add-explicit-set-of-cache_dynamic_acls-1-for-tpg-demo-mode.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 38b11bae6ba02da352340aff12ee25755977b222 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <[email protected]>
Date: Sun, 30 Sep 2012 12:20:02 -0700
Subject: iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG 
demo-mode

From: Nicholas Bellinger <[email protected]>

commit 38b11bae6ba02da352340aff12ee25755977b222 upstream.

We've had reports in the past about this specific case, so it's time to
go ahead and explicitly set cache_dynamic_acls=1 for generate_node_acls=1
(TPG demo-mode) operation.

During normal generate_node_acls=0 operation with explicit NodeACLs ->
se_node_acl memory is persistent to the configfs group located at
/sys/kernel/config/target/$TARGETNAME/$TPGT/acls/$INITIATORNAME, so in
the generate_node_acls=1 case we want the reservation logic to reference
existing per initiator IQN se_node_acl memory (not to generate a new
se_node_acl), so go ahead and always set cache_dynamic_acls=1 when
TPG demo-mode is enabled.

Reported-by: Ronnie Sahlberg <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/target/iscsi/iscsi_target_tpg.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/drivers/target/iscsi/iscsi_target_tpg.c
+++ b/drivers/target/iscsi/iscsi_target_tpg.c
@@ -672,6 +672,12 @@ int iscsit_ta_generate_node_acls(
        pr_debug("iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n",
                tpg->tpgt, (a->generate_node_acls) ? "Enabled" : "Disabled");
 
+       if (flag == 1 && a->cache_dynamic_acls == 0) {
+               pr_debug("Explicitly setting cache_dynamic_acls=1 when "
+                       "generate_node_acls=1\n");
+               a->cache_dynamic_acls = 1;
+       }
+
        return 0;
 }
 
@@ -711,6 +717,12 @@ int iscsit_ta_cache_dynamic_acls(
                return -EINVAL;
        }
 
+       if (a->generate_node_acls == 1 && flag == 0) {
+               pr_debug("Skipping cache_dynamic_acls=0 when"
+                       " generate_node_acls=1\n");
+               return 0;
+       }
+
        a->cache_dynamic_acls = flag;
        pr_debug("iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group"
                " ACLs %s\n", tpg->tpgt, (a->cache_dynamic_acls) ?


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/iscsi-target-correctly-set-0xffffffff-field-within-iscsi_op_reject-pdu.patch
queue-3.4/iscsit-remove-incorrect-unlock-in-iscsit_build_sendtargets_resp.patch
queue-3.4/iscsi-target-add-explicit-set-of-cache_dynamic_acls-1-for-tpg-demo-mode.patch
queue-3.4/iscsi-target-bump-defaults-for-nopin_timeout-nopin_response_timeout-values.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to