On Mon, Jan 29, 2018 at 01:22:36PM -0700, Vishal Verma wrote:
> reconfig attempted to reuse the 'previous' value for sector-size when
> reconfiguring to a BTT mode or blk type namespace, but this may not
> always be valid (for example when coming from a memory mode namespace).
> Instead, when reconfiguring to BTT or blk, always default to 4096
> unless a sector size is explicitly provided.
> 
> Cc: Dan Williams <[email protected]>
> Reported-by: Ross Zwisler <[email protected]>
> Tested-by: Dave Jiang <[email protected]>
> Reviewed-by: Dave Jiang <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>

Yep, this both allows the btt namespace creation to continue and, if the user
does actually specify a bogus sector size, i.e.: 

# ./ndctl/ndctl create-namespace -f -e namespace0.0 --mode=sector -l0
failed to reconfigure namespace: Invalid argument

It prevents us from leaving our namespace in a zombie state where it is still
there but doesn't show up in 'ndctl list'.

Tested-by: Ross Zwisler <[email protected]>
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to