# Re: \[PATCH 02/30\] block: add a bdev\_nr\_bytes helper

- From: Christoph Hellwig \<hch@lst.de\>
- Date: 2021-10-15 13:37:26 
- List: linux-bcache
- Page: https://ratatoskr.run/linux-bcache/2021/10/216111
- Thread: https://ratatoskr.run/linux-block/2021/10/216086/t.md

```text
On Fri, Oct 15, 2021 at 02:35:15PM +0100, Matthew Wilcox wrote:
> On Fri, Oct 15, 2021 at 03:26:15PM +0200, Christoph Hellwig wrote:
> > +static inline sector_t bdev_nr_bytes(struct block_device *bdev)
> > +{
> > +	return i_size_read(bdev->bd_inode);
> 
> Uh.  loff_t, surely?

Yes, that wuld be the right type.  Note that it makes a difference
outside of documentation purposes.
```
