ndctl/zero-labels: Display error if regions are active
PATCH 1/1 ndctl/zero-labels: Display error if regions are active
Get zero-labels behave similar to init-labels.
Signed-off-by Santosh Sivaraj <[email protected]>
--- ndctl/dimm.c | 6 ++++++ 1 file changed, 6 insertions(+)
ndctl/dimm.c +6 -0
@@ -80,6 +80,12 @@ static int action_enable(struct ndctl_dimm *dimm, struct action_context *actx)static int action_zero (struct ndctl_dimm *dimm,struct action_context *actx) { +if (ndctl_dimm_is_active (dimm)) { +fprintf (stderr,"%s: regions active, abort label write\n" , +ndctl_dimm_get_devname (dimm)); +return -EBUSY ; + } +return ndctl_dimm_zero_label_extent (dimm, param.len, param.offset); }
Signature · 4 lines
2.23.0 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Quoted 2 lines · Santosh Sivaraj
Get zero-labels behave similar to init-labels.
This changelog could be more precise. I'll fix this up to be.
"Make zero-labels behave the same as init-labels with respect to failing the operation while the DIMM is active (i.e. label area is busy)."
Quoted 2 lines
Signed-off-by Santosh Sivaraj <[email protected]>
...otherwise, looks good, applied.
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]