[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211018174901.GA3990@lst.de>
Date: Mon, 18 Oct 2021 19:49:01 +0200
From: Christoph Hellwig <hch@....de>
To: Jens Axboe <axboe@...nel.dk>
Cc: Christoph Hellwig <hch@....de>, Coly Li <colyli@...e.de>,
Mike Snitzer <snitzer@...hat.com>, Song Liu <song@...nel.org>,
David Sterba <dsterba@...e.com>,
Josef Bacik <josef@...icpanda.com>,
Theodore Ts'o <tytso@....edu>,
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
Dave Kleikamp <shaggy@...nel.org>,
Ryusuke Konishi <konishi.ryusuke@...il.com>,
Anton Altaparmakov <anton@...era.com>,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
Kees Cook <keescook@...omium.org>,
Phillip Lougher <phillip@...ashfs.org.uk>,
Jan Kara <jack@...e.com>, linux-block@...r.kernel.org,
dm-devel@...hat.com, drbd-dev@...ts.linbit.com,
linux-bcache@...r.kernel.org, linux-raid@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org,
target-devel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
jfs-discussion@...ts.sourceforge.net, linux-nfs@...r.kernel.org,
linux-nilfs@...r.kernel.org, linux-ntfs-dev@...ts.sourceforge.net,
ntfs3@...ts.linux.dev, reiserfs-devel@...r.kernel.org
Subject: Re: don't use ->bd_inode to access the block device size v3
On Mon, Oct 18, 2021 at 11:40:51AM -0600, Jens Axboe wrote:
> static inline loff_t bdev_nr_bytes(struct block_device *bdev)
> {
> - return i_size_read(bdev->bd_inode);
> + return bdev->bd_nr_sectors;
This hunk needs to go into bdev_nr_sectors, and the bdev_nr_bytes
probably wants to call bdev_nr_sectors and do the shifting.
Powered by blists - more mailing lists