[PATCH v2] nvmet: fix mismatched serial

Christoph Hellwig hch at lst.de
Tue Dec 22 08:50:59 EST 2020


On Sat, Dec 12, 2020 at 03:58:01PM +0800, zhenwei pi wrote:
> Target side uses 'bin2hex' to convert u64 serial number to a hex
> string, saving serial number as be64 to keep the right byte order.
> Also use format '%016llx' to show the full serial string to avoid
> to drop prefixed zero.
> 
> Test on x86 server, config '0123456789abcdef' to 'attr_serial' on
> target side, and run 'nvme id-ctrl /dev/nvme0' on initiator side,
> then we can get the same SN string.

We can't change this interface any more, as it can break tons of user
space.



More information about the Linux-nvme mailing list