Re: don't use ->bd_inode to access the block device size v3

From
Christoph Hellwig <hch@lst.de>
Date
2021-10-18 17:49:11
Also in
dm-devel, linux-block, linux-btrfs, linux-ext4, linux-fsdevel, linux-nfs, linux-nvme, linux-raid, linux-scsi, ntfs3, target-devel
Reply to
Jens Axboe, 2021-10-18
On Mon, Oct 18, 2021 at 11:40:51AM -0600, Jens Axboe wrote:
quoted hunk ↗ jump to hunk
 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.
Thread (40 messages) 40 messages, 3 authors, last reply 2021-10-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help