Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6409716imu; Mon, 21 Jan 2019 08:25:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7TZafVQmbo1SXZiEVwbLaA44uCFV/MrvJatq4F7igC8+QlSwldwAZW9iv2Ix6A7SihDYGP X-Received: by 2002:a17:902:7c05:: with SMTP id x5mr30236809pll.273.1548087920940; Mon, 21 Jan 2019 08:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548087920; cv=none; d=google.com; s=arc-20160816; b=mMUAmTPwGZb5n/Lhy91lLwIcsxjehzrozqbBaPMhrjPgzT8r00k3Cyf/hvLO2RCzCt t5SUS/0+2EC63pgaqAP0V9ke1LbWUc1c/xlhGD6muVygJjTDybXRUs+yhuvQp8bNI5zu /DJTVVdmcoh5VxJKXTE8XcXqUw33/gnyMTw+ACvIw7rwHfrBrUBpkPab9/y01U+3C7qM 0IGqI1QvZ+nR8hBuAgWYmQv7U4RXPK1GMyh8WTvtV0E76K0gY2VW78sfXee6Ma93F6pK Aku0jkjfJzz6GX33JZFkRqncrxWyEPTmYPgT8eSCkN+aKterT6uMQXQH4v0D47KrBCzj MUNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cBCsQB5bMPPwRHo7bQ0N1sN7iq/PSIDi56ENDb5amvs=; b=KKEhLOa+SyhF8C32k7p/EvsEwZ2mIbRE06L1887Pt0kgTJFUrcaUREkPZQ5z9HjZjh RHjcxwLN5dHcSRuIKWhoSlwKkAcxa+Fe2kbeYWVawg4W92JdBvXW1wrwNwShVcNsq4j2 ya0GyaJOttvYSqB9Ws71jTZvpfnxoiFP+PqmUYRL5bfUxjjUtat+/XxLoPj1FrrQU3YK mDIiIhIp5a+zvqQ07kGAXNT9NFNcnqKKX0gzB6TKLI+P54STUPP/zJJIzEIJ8DP4iIPH hzuR4iGqc4ClQBqGlWB8bJQex8jZPYPkChFpBxfTPpdAhflF34ydFQa1ZUWPC+J4br4P I/Ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si12839195pfq.129.2019.01.21.08.24.53; Mon, 21 Jan 2019 08:25:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730005AbfAUQXk (ORCPT + 99 others); Mon, 21 Jan 2019 11:23:40 -0500 Received: from verein.lst.de ([213.95.11.211]:59452 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728754AbfAUQXk (ORCPT ); Mon, 21 Jan 2019 11:23:40 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id CED4A68DD6; Mon, 21 Jan 2019 17:23:38 +0100 (CET) Date: Mon, 21 Jan 2019 17:23:38 +0100 From: Christoph Hellwig To: Dave Kleikamp Cc: Christoph Hellwig , Andy Shevchenko , linux-kernel@vger.kernel.org, Dave Kleikamp , jfs-discussion@lists.sourceforge.net Subject: Re: [PATCH v1] fs/jfs: Switch to use new generic UUID API Message-ID: <20190121162338.GA29537@lst.de> References: <20190110134153.83901-1-andriy.shevchenko@linux.intel.com> <20190121084950.GG18680@lst.de> <6ccf3581-71b8-6502-5050-643006423a63@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ccf3581-71b8-6502-5050-643006423a63@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 10:19:15AM -0600, Dave Kleikamp wrote: > diff --git a/fs/jfs/super.c b/fs/jfs/super.c > index 65d8fc87ab11..c15ff56a8516 100644 > --- a/fs/jfs/super.c > +++ b/fs/jfs/super.c > @@ -174,9 +174,11 @@ static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf) > buf->f_files = maxinodes; > buf->f_ffree = maxinodes - (atomic_read(&imap->im_numinos) - > atomic_read(&imap->im_numfree)); > - buf->f_fsid.val[0] = (u32)crc32_le(0, sbi->uuid, sizeof(sbi->uuid)/2); > - buf->f_fsid.val[1] = (u32)crc32_le(0, sbi->uuid + sizeof(sbi->uuid)/2, > - sizeof(sbi->uuid)/2); > + buf->f_fsid.val[0] = crc32_le(0, (char *)&sbi->uuid, > + sizeof(sbi->uuid)/2); > + buf->f_fsid.val[1] = crc32_le(0, > + (char *)&sbi->uuid + sizeof(sbi->uuid)/2, > + sizeof(sbi->uuid)/2); I'd really love to see a little helper to calculate the fsid, and a comment on that function documenting the design decision behind it.