linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org, Dave Kleikamp <shaggy@kernel.org>,
	jfs-discussion@lists.sourceforge.net
Subject: Re: [PATCH v1] fs/jfs: Switch to use new generic UUID API
Date: Mon, 21 Jan 2019 17:23:38 +0100	[thread overview]
Message-ID: <20190121162338.GA29537@lst.de> (raw)
In-Reply-To: <6ccf3581-71b8-6502-5050-643006423a63@oracle.com>

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.

  reply	other threads:[~2019-01-21 16:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 13:41 [PATCH v1] fs/jfs: Switch to use new generic UUID API Andy Shevchenko
2019-01-10 16:58 ` Dave Kleikamp
2019-01-21  8:49 ` Christoph Hellwig
2019-01-21 16:19   ` Dave Kleikamp
2019-01-21 16:23     ` Christoph Hellwig [this message]
2019-01-21 17:46       ` Dave Kleikamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190121162338.GA29537@lst.de \
    --to=hch@lst.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dave.kleikamp@oracle.com \
    --cc=jfs-discussion@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaggy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).