From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932857AbdBHBFN convert rfc822-to-8bit (ORCPT ); Tue, 7 Feb 2017 20:05:13 -0500 Received: from mga14.intel.com ([192.55.52.115]:63688 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753576AbdBHBFL (ORCPT ); Tue, 7 Feb 2017 20:05:11 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="41220813" From: "Dilger, Andreas" To: Greg Kroah-Hartman CC: James Simmons , "devel@driverdev.osuosl.org" , "Drokin, Oleg" , "Linux Kernel Mailing List" , Lustre Development List Subject: Re: [lustre-devel] [PATCH 10/60] staging: lustre: obdclass: add more info to sysfs version string Thread-Topic: [lustre-devel] [PATCH 10/60] staging: lustre: obdclass: add more info to sysfs version string Thread-Index: AQHSecNy1G/4YM8a9EupwR2tV8ldvaFXpGIAgAc85oA= Date: Wed, 8 Feb 2017 01:04:52 +0000 Message-ID: References: <1485648328-2141-1-git-send-email-jsimmons@infradead.org> <1485648328-2141-11-git-send-email-jsimmons@infradead.org> <20170203103304.GA2600@kroah.com> In-Reply-To: <20170203103304.GA2600@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.78.24] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Feb 3, 2017, at 03:33, Greg Kroah-Hartman wrote: > > On Sat, Jan 28, 2017 at 07:04:38PM -0500, James Simmons wrote: >> From: Andreas Dilger >> >> Update the sysfs "version" file to print "lustre: " with >> the version number. >> >> Signed-off-by: Andreas Dilger >> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5969 >> Reviewed-on: http://review.whamcloud.com/16721 >> Reviewed-by: James Simmons >> Reviewed-by: Dmitry Eremin >> Reviewed-by: Oleg Drokin >> Signed-off-by: James Simmons >> --- >> drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c >> index 9f5e829..22e6d1f 100644 >> --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c >> +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c >> @@ -208,7 +208,7 @@ struct miscdevice obd_psdev = { >> static ssize_t version_show(struct kobject *kobj, struct attribute *attr, >> char *buf) >> { >> - return sprintf(buf, "%s\n", LUSTRE_VERSION_STRING); >> + return sprintf(buf, "lustre: %s\n", LUSTRE_VERSION_STRING); >> } > > Why? You "know" this is lustre, why say it again? Doesn't this affect > userspace tools? It included "lustre: " as a prefix until commit 8b8284450569 when the code moved from /proc to /sys, and is what the userspace tools expect. Formerly there were multiple strings printed in this file, each with a different prefix, but the "lustre: " prefix was dropped in the move to sysfs. That didn't matter until a userspace patch to stop using ioctl(IOC_GET_VERSION) and instead get the version from the existing /proc or /sys files, so that we can deprecate and eventually drop the IOC_GET_VERSION ioctl completely. So this patch is returning to the previous format of the /proc file, but if there is a big objection to this patch we can also change the userspace tools to live with or without this prefix now that there is only a single value here. Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation