Add a helper to query the size of a block device in bytes. This
will be used to remove open coded access to ->bd_inode.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
include/linux/genhd.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
Hi Christoph,
> On 15 Oct 2021, at 14:26, Christoph Hellwig wrote:
>
> Add a helpe to query the size of a block device in bytes. This
> will be used to remove open coded access to ->bd_inode.
Matthew already pointed out the return type for bdev_nr_bytes() but also your
commit message has a
On Fri, Oct 15, 2021 at 02:37:41PM +, Anton Altaparmakov wrote:
> Hi Christoph,
>
> > On 15 Oct 2021, at 14:26, Christoph Hellwig wrote:
> >
> > Add a helpe to query the size of a block device in bytes. This
> > will be used to remove open coded access to ->bd_inode.
>
> Matthew already
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?
--
dm-devel mailing list
dm-devel@redhat.com
Add a helpe to query the size of a block device in bytes. This
will be used to remove open coded access to ->bd_inode.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/genhd.h
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