Re: What does cache_dynamic_acls parameter do?

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

 



On Wed, 2014-10-22 at 00:59 +0200, Jerome Martin wrote:
> On 10/22/2014 12:30 AM, Nicholas A. Bellinger wrote:
> > On Wed, 2014-10-15 at 23:10 +0200, Jerome Martin wrote:
> >>
> >> On 10/15/2014 10:28 PM, Rufe Glick wrote:
> >>> On Wed, Oct 15, 2014 at 4:06 AM, Jerome Martin <jxm@xxxxxxxxxxx> wrote:
> >>>> On 10/15/2014 03:02 AM, Andy Grover wrote:
> >>>>> On 10/13/2014 08:37 PM, Rufe Glick wrote:
> [...]
> > So as correctly described earlier in the thread by Jerome, forcing
> > cached_dynamic_acls=1 in-kernel when generate_node_acls=1 is set ended
> > up being the (best) default for demo-mode so that things 'just work' for
> > typical user configurations, given that cached_dynamic_acls=1 is
> > required in order to keep active PR metadata around during typical
> > session (I_T nexus) resets.
> >
> > The reason that cached_dynamic_acls is still exposed as a TPG attribute
> > is primarily for large public demo-mode setups (like boot.kernel.org was
> > originally supposed to be :) where it's useful to release the
> > dynamically allocated se_node_acl each time I_T nexus shutdown/timeout
> > occurs, in order to avoid left-over se_node_acl memory with lots of
> > transient initiators coming and going.
> 
> Thanks Nic.
> 
> Just to clarify for everyone, one of the things implied here is that 
> even though cache_dynamic_acls is forced to 1 when generate_node_acls is 
> set (demo mode), you can flip it back to 0 if needed, while still in 
> demo mode. Is that correct?
> 

Ugh.

I thought this was the case, but after checking the code again in
drivers/target/iscsi/iscsi_target_tpg.c:iscsit_ta_cache_dynamic_acls(),
the following check added in commit 38b11bae does prevent
cached_dynamic_acls from being disabled while demo-mode is enabled.

        if (a->generate_node_acls == 1 && flag == 0) {
                pr_debug("Skipping cache_dynamic_acls=0 when"
                        " generate_node_acls=1\n");
                return 0;
        }

IIRC, the reason this was necessary was due to the ordering that
lio-utils was restoring saved configurations.  Eg: A existing saved
configuration with generate_node_acls=1 first and cached_dynamic_acls=0
second would end up disabling the hardcoded kernel default to force
generate_node_acls=1 and cached_dynamic_acls=1.

I'd still like to retain the ability to eventually run with
cached_dynamic_acls=1, but unfortunately atm this is not the case due to
legacy lio-utils.

--nab


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