From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751455AbdE3JaJ (ORCPT ); Tue, 30 May 2017 05:30:09 -0400 Received: from verein.lst.de ([213.95.11.211]:60743 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbdE3JaF (ORCPT ); Tue, 30 May 2017 05:30:05 -0400 Date: Tue, 30 May 2017 11:30:03 +0200 From: Christoph Hellwig To: Johannes Thumshirn Cc: Sagi Grimberg , Keith Busch , Christoph Hellwig , Linux NVMe Mailinglist , Linux Kernel Mailinglist Subject: Re: [PATCH 7/7] nvme: provide UUID value to userspace Message-ID: <20170530093003.GD16736@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2017 at 10:08:22AM +0200, Johannes Thumshirn wrote: > Now that we have a way for getting the UUID from a target, provide it > to userspace as well. > > Unfortunately there is already a sysfs attribute called UUID which is > a misnomer as it holds the NGUID value. So instead of creating yet > another wrong name, create a new 'nguid' sysfs attribute for the > NGUID. For the UUID attribute add a check wheter the namespace has a > UUID assigned to it and return this or return the NGUID to maintain > backwards compatibility. This should give userspace a chance to catch > up. Eww. This looks pretty sketchy and at least needs a good comment in the source. Maybe even a printk_ratelimited warning.