lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPcyv4jo=_++oEMnep-H+=fJSKT9PKhJWrqj-3UrDCy5bPjBnA@mail.gmail.com>
Date:   Thu, 31 Aug 2017 07:20:55 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Jan Kara <jack@...e.cz>
Cc:     linux-xfs@...r.kernel.org, linux-ext4 <linux-ext4@...r.kernel.org>,
        "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        "Theodore Ts'o" <tytso@....edu>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v3 3/4] ext2: perform dax_device lookup at mount

On Thu, Aug 31, 2017 at 1:22 AM, Jan Kara <jack@...e.cz> wrote:
> On Wed 30-08-17 12:44:03, Dan Williams wrote:
>> The ->iomap_begin() operation is a hot path, so cache the
>> fs_dax_get_by_host() result at mount time to avoid the incurring the
>> hash lookup overhead on a per-i/o basis.
>>
>> Cc: "Theodore Ts'o" <tytso@....edu>
>> Cc: Andreas Dilger <adilger.kernel@...ger.ca>
>> Cc: Jan Kara <jack@...e.cz>
>> Reported-by: Christoph Hellwig <hch@....de>
>> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
>
> Looks good to me (and it looks even cleaner than your previous approach).
> Just one nit below. You can add:
>
> Reviewed-by: Jan Kara <jack@...e.cz>
>
>> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
>> index 7b1bc9059863..d9dd999568c2 100644
>> --- a/fs/ext2/super.c
>> +++ b/fs/ext2/super.c
>> @@ -144,6 +144,7 @@ static void ext2_put_super (struct super_block * sb)
>>       int db_count;
>>       int i;
>>       struct ext2_sb_info *sbi = EXT2_SB(sb);
>> +     struct dax_device *dax_dev = sbi->s_daxdev;
>>
>>       ext2_quota_off_umount(sb);
>>
>> @@ -172,6 +173,7 @@ static void ext2_put_super (struct super_block * sb)
>>       sb->s_fs_info = NULL;
>>       kfree(sbi->s_blockgroup_lock);
>>       kfree(sbi);
>> +     fs_put_dax(dax_dev);
>
> The local variable looks superfluous here. I'd just do
>         fs_put_dax(sbi->s_daxdev);

Ok... and move that before the kfree(sbi).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ