From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 2CDB77F4E for ; Mon, 6 Oct 2014 17:17:40 -0500 (CDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay3.corp.sgi.com (Postfix) with ESMTP id BA1C0AC004 for ; Mon, 6 Oct 2014 15:17:39 -0700 (PDT) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by cuda.sgi.com with ESMTP id 75IF61l4JaLw2FV0 for ; Mon, 06 Oct 2014 15:17:35 -0700 (PDT) Date: Tue, 7 Oct 2014 09:17:08 +1100 From: Dave Chinner Subject: Re: [PATCH 08/16] xfs: change interface of xfs_nameops.hashname Message-ID: <20141006221708.GI2301@dastard> References: <20141003214758.GY1865@sgi.com> <20141003215844.GG1865@sgi.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20141003215844.GG1865@sgi.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Ben Myers Cc: linux-fsdevel@vger.kernel.org, olaf@sgi.com, xfs@oss.sgi.com On Fri, Oct 03, 2014 at 04:58:44PM -0500, Ben Myers wrote: > From: Olaf Weber > > With the introduction of the xfs_nameops.normhash callout, all uses of the > hashname callout now occur in places where an xfs_name structure must be > explicitly created just to match the parameter passing convention of this > callout. Change the arguments to a const unsigned char * and int instead. > > Signed-off-by: Olaf Weber > > [v2: pass a 3rd argument for sb_utf8version to hashname. --bpm] So now I've looked at most of the rest of the patch set, I think this is the wrong thing to do. I see no reason apart from "it's less typing" to drop the use of the xfs-name structure, but it removes a key piece of documentation from the code. i.e. that the name/namelen are an inseparable tuple and cannot be separated. Indeed, lots of the utf8 xfs code declares norm/normlen tuples on the stack for temporary use, so really this comes down to a matter of taste. And in that matter, I'd prefer that we keep the existing name abstaction and propagate it into the new code rather than the other way around. Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs