lkml.org 
[lkml]   [2019]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1] fs/jfs: Switch to use new generic UUID API
From
Date
On 1/21/19 10:23 AM, Christoph Hellwig wrote:
> 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.

I can do that. It was a long time ago, but I'm sure the design decision
was that I took the idea from another filesystem, possibly reiserfs, but
I'll make a better case than that. :-)

Shaggy

\
 
 \ /
  Last update: 2019-01-21 18:47    [W:0.035 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site