Re: [PATCH] scsi: target: core: Add a way to hide a port group

Mike Christie
2022-09-07T20:01:17Z

On 9/6/22 2:49 AM, Dmitry Bogdanov wrote:
> From: Roman Bolshakov <r.bolshakov@yadro.com>
>
> Default target port group is always returned in the list of port groups,
> even if the behaviour is unwanted, i.e. it has no members and
> non-default port groups are primary port groups.
>
> A new port group attribute - "hidden" can be used to hide empty port
> groups with no ports in REPORT TARGET PORT GROUPS, including default
> target port group:
>
> echo 1 > $DEVICE/alua/default_tg_pt_gp/hidden
>

How about "enable"? I think that fits how we handle other objects like
targets that are setup automatically but are not yet usable (can't login
or reported in discovery commands) and devices we have setup but are not
reported in commands like REPORT_LUNs (technically you need to enable and
map them but you get the idea I'm going for).