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

2021-10-18 Thread Kari Argillander
On Mon, Oct 18, 2021 at 11:53:08AM -0600, Jens Axboe wrote: snip.. > diff --git a/include/linux/genhd.h b/include/linux/genhd.h > index 7b0326661a1e..a967b3fb3c71 100644 > --- a/include/linux/genhd.h > +++ b/include/linux/genhd.h > @@ -236,14 +236,14 @@ static inline sector_t get_start_sect(struc

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

2021-10-18 Thread Jens Axboe
On 10/18/21 7:04 PM, Kari Argillander wrote: > On Mon, Oct 18, 2021 at 11:53:08AM -0600, Jens Axboe wrote: > > snip.. > >> diff --git a/include/linux/genhd.h b/include/linux/genhd.h >> index 7b0326661a1e..a967b3fb3c71 100644 >> --- a/include/linux/genhd.h >> +++ b/include/linux/genhd.h >> @@ -236

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

2021-10-18 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

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

2021-10-18 Thread Jens Axboe
On 10/18/21 11:49 AM, Christoph Hellwig wrote: > 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_n

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

2021-10-18 Thread Christoph Hellwig
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

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

2021-10-18 Thread Jens Axboe
On Mon, 18 Oct 2021 12:11:00 +0200, Christoph Hellwig wrote: > various drivers currently poke directy at the block device inode, which > is a bit of a mess. This series cleans up the places that read the > block device size to use the proper helpers. I have separate patches > for many of the othe

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

2021-10-18 Thread Jens Axboe
On 10/18/21 11:18 AM, Christoph Hellwig wrote: > 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: >> >> https://git.kernel.dk/cgit/linux-block/commit/?h=perf-w

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

2021-10-18 Thread Christoph Hellwig
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: > > https://git.kernel.dk/cgit/linux-block/commit/?h=perf-wip&id=c754951eb7193258c35a574bd1b7c4946ee4 > >

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

2021-10-18 Thread Jens Axboe
On 10/18/21 4:11 AM, Christoph Hellwig wrote: > Hi Jens, > > various drivers currently poke directy at the block device inode, which > is a bit of a mess. This series cleans up the places that read the > block device size to use the proper helpers. I have separate patches > for many of the other

[dm-devel] don't use ->bd_inode to access the block device size v3

2021-10-18 Thread Christoph Hellwig
Hi Jens, various drivers currently poke directy at the block device inode, which is a bit of a mess. This series cleans up the places that read the block device size to use the proper helpers. I have separate patches for many of the other bd_inode uses, but this series is already big enough as-i