On 10/16/2015 06:30 PM, Gabriel Krisman Bertazi wrote:
> Add new field in show-details to report Sync Write Cache support for a
> given IOA.  This will only be displayed when passing an IOA to command
> 'show-details'.
> 
> This field tells if the adapter has support to sync cache
> enabled/implemented.  It does not mean that sync cache is enabled
> for a specific device.  It has three states: Unsupported - in
> case adapter doesn't support it; Enabled - if Sync Cache is
> supported and is globally enabled for this adapter; Disabled - in case
> it is supported but was disabled for the whole adapter.
> 
> The information is recovered from the device using the Query Cache
> Parameters command.  It can return a new value now, indicating if Volume
> Set Caching Mode Page is enabled.
> 
> Signed-off-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com>
> ---
>  iprconfig.c |  9 +++++++++
>  iprlib.c    |  8 +++++++-
>  iprlib.h    | 13 ++++++++++---
>  3 files changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/iprconfig.c b/iprconfig.c
> index 2ee1e5a..b811bfd 100644
> --- a/iprconfig.c
> +++ b/iprconfig.c
> @@ -2166,6 +2166,15 @@ static char *ioa_details(char *body, struct ipr_dev 
> *dev)
>                       body = add_line_to_body(body,_("Current Requested 
> Caching Mode"), _("Default"));
>       }
> 
> +     if (dev->ioa->has_vset_write_cache) {
> +             if (dev->ioa->vset_write_cache)
> +                     strcpy(buffer, "Enabled");
> +             else
> +                     strcpy(buffer, "Disabled");
> +     } else
> +             strcpy(buffer, "Unsupported");
> +     body = add_line_to_body(body, _("Vset Write Cache"), buffer);

Suggest we rename this field to "Cache Protection" with possible values of 
"Synchronize Cache", "Battery Backed",
or "Supercap Protected". Only display this field if there is a write cache on 
the adapter. You can tell the difference
between battery backed and supercap by looking in the reclaim cache query data 
at the rechargeable_battery_type field.


> +
>       return body;
>  }
> 




-- 
Brian King
Power Linux I/O
IBM Linux Technology Center


------------------------------------------------------------------------------
_______________________________________________
Iprdd-devel mailing list
Iprdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iprdd-devel

Reply via email to