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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Oct 2021 19:18:43 +0200
From:   Christoph Hellwig <>
To:     Jens Axboe <>
Cc:     Christoph Hellwig <>, Coly Li <>,
        Mike Snitzer <>, Song Liu <>,
        David Sterba <>,
        Josef Bacik <>,
        Theodore Ts'o <>,
        OGAWA Hirofumi <>,
        Dave Kleikamp <>,
        Ryusuke Konishi <>,
        Anton Altaparmakov <>,
        Konstantin Komarov <>,
        Kees Cook <>,
        Phillip Lougher <>,
        Jan Kara <>,,,,,,,,,,,,,,,,,
Subject: Re: don't use ->bd_inode to access the block device size v3

On Mon, Oct 18, 2021 at 11:16:08AM -0600, Jens Axboe wrote:
> This looks good to me. Followup question, as it's related - I've got a
> hacky patch that caches the inode size in the bdev:
> so we don't have to dip into the inode itself for the fast path. While
> it's obviously not something being proposed for inclusion right now, is
> there a world in which we can make something like that work?

There's just two places that update i_size for block devices:
set_capacity and bdev_set_nr_sectors.  So you just need to update
bd_nr_sectors there and you're done.

Powered by blists - more mailing lists