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
Luis,
> Thanks, would you like Jens to pick this up and the other scsi/sr patch
> or are you taking it through your tree?
Didn't think I had the relevant add_disk() patch in my baseline tree but
it turns out I do. So I queued them up.
Thanks!
--
Martin K. Petersen Oracle Linux Engineeri
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
On Sat, Oct 16, 2021 at 10:51:48PM -0400, Martin K. Petersen wrote:
>
> Luis,
>
> > We never checked for errors on add_disk() as this function returned
> > void. Now that this is fixed, use the shiny new error handling.
> >
> > As with the error handling for device_add() we follow the same logic
On Mon, Oct 18, 2021 at 11:04:49AM -0700, Eric Biggers wrote:
>
> This series applies to block/for-next.
>
> Changed v5 => v6:
> - Rebased onto block/for-next yet again
> - Added more Reviewed-by tags
>
> Changed v4 => v5:
> - Rebased onto block/for-next again
> - Added Reviewed-by tags
From: Eric Biggers
In preparation for renaming struct blk_keyslot_manager to struct
blk_crypto_profile, rename the keyslot-manager.h and keyslot-manager.c
source files. Renaming these files separately before making a lot of
changes to their contents makes it easier for git to understand that
the
From: Eric Biggers
blk_keyslot_manager is misnamed because it doesn't necessarily manage
keyslots. It actually does several different things:
- Contains the crypto capabilities of the device.
- Provides functions to control the inline encryption hardware.
Originally these were just for
This series renames struct blk_keyslot_manager to struct
blk_crypto_profile, as it is misnamed; it doesn't always manage
keyslots. It's much more logical to think of it as the
"blk-crypto profile" of a device, similar to blk_integrity_profile.
This series also improves the inline-encryption.rst d
From: Eric Biggers
Rework most of inline-encryption.rst to be easier to follow, to correct
some information, to add some important details and remove some
unimportant details, and to take into account the renaming from
blk_keyslot_manager to blk_crypto_profile.
Reviewed-by: Mike Snitzer
Reviewe
From: Eric Biggers
For clarity, avoid using just the "blk_crypto_" prefix for functions and
structs that are specific to blk-crypto-fallback. Instead, use
"blk_crypto_fallback_". Some places already did this, but others
didn't.
This is also a prerequisite for using "struct blk_crypto_keyslot"
Looks good,
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
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
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
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
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
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
>
>
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
On Mon, Oct 18, 2021 at 06:40:49AM +0200, Christoph Hellwig wrote:
> Factor out another DAX setup helper to simplify future changes. Also
> move the experimental warning after the checks to not clutter the log
> too much if the setup failed.
>
> Signed-off-by: Christoph Hellwig
> ---
> fs/xfs/x
On Mon, Oct 18, 2021 at 06:40:50AM +0200, Christoph Hellwig wrote:
> Just open code the block size and dax_dev == NULL checks in the callers.
>
> Signed-off-by: Christoph Hellwig
> ---
> drivers/dax/super.c | 36
> drivers/md/dm-table.c| 22 +
On 10/15/21 06:26, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Kees Cook
Looks good.
Reviewed-by: Chaitanya Kulkarni
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listi
On 10/15/21 06:26, Christoph Hellwig wrote:
> Use the equivalent block layer helper instead.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Kees Cook
> Acked-by: Coly Li
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.red
On 10/15/21 06:26, Christoph Hellwig wrote:
> Add a helper to return the size of sb->s_bdev in sb->s_blocksize_bits
> based unites. Note that SECTOR_SHIFT has to be open coded due to
> include dependency issues for now, but I have a plan to sort that out
> eventually.
>
> Signed-off-by: Christoph
On 10/15/21 06:26, Christoph Hellwig wrote:
> Use the proper helper to read the block device size and remove two
> cargo culted checks that can't be false.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Jan Kara
Looks good.
Reviewed-by: Chaitanya Kulkarni
--
dm-devel mailing list
dm-d
On 10/15/21 06:26, Christoph Hellwig wrote:
> Use the sb_bdev_nr_blocks helper instead of open coding it.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Kees Cook
> Reviewed-by: Jan Kara
> Acked-by: Theodore Ts'o
>
Looks good.
Reviewed-by: Chaitanya Kulkarni
--
dm-devel mailing list
On 10/15/21 06:26, Christoph Hellwig wrote:
> Ensure these are always available for inlines in the various block layer
> headers.
>
> Signed-off-by: Christoph Hellwig
Looks good.
Reviewed-by: Chaitanya Kulkarni
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/
On 10/15/21 6:26 AM, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Kees Cook
> Reviewed-by: Chaitanya Kulkarni
> ---
> drivers/block/drbd/drbd_int.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Phillip Lougher
---
fs/squashfs/super.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 60d6951915f44.
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
---
fs/udf/lowlevel.c | 5 ++---
fs/udf/super.c| 9 +++--
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/udf/lowlevel.c b/fs/udf/
Use the sb_bdev_nr_blocks helper instead of open coding it and clean up
ntfs_fill_super a bit by moving an assignment a little earlier that has
no negative side effects.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Anton Altaparmakov
---
fs/ntfs/super.c | 8 +++-
1 fil
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Dave Kleikamp
---
fs/jfs/resize.c | 3 +--
fs/jfs/super.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c
ind
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
---
fs/reiserfs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 8647a00434ea4
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
Acked-by: Theodore Ts'o
---
fs/ext4/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/su
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
---
block/fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/fops.c b/block/fops.c
index 7bb9581a146
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Acked-by: Kees Cook
---
fs/pstore/blk.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c
index 04ce58c939a0b..5d1fbaffd66a1 100644
--- a/fs/pstore/b
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
---
fs/ntfs3/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 55bbc9200a10e..7ed2cb5e8b1d9 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/sup
Add a helper to return the size of sb->s_bdev in sb->s_blocksize_bits
based unites.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Chaitanya Kulkarni
---
include/linux/genhd.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/genhd.h b/include/linux/
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Dave Kleikamp
---
fs/jfs/resize.c | 2 +-
fs/jfs/super.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c
index bde787
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Ryusuke Konishi
---
fs/nilfs2/ioctl.c | 2 +-
fs/nilfs2/super.c | 2 +-
fs/nilfs2/the_nilfs.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs
Use the proper helper to read the block device size and remove two
cargo culted checks that can't be false.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
---
fs/reiserfs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletio
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/nfs/blocklayout/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c
index acb1d22907daf..5e56da748b2a
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/hfs/mdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c
index cdf0edeeb2781..5beb826524354 100644
--- a/fs/hfs/mdb.c
+++ b/fs/hfs
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/cramfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 2be65269a987c..666aa380011e0 100644
--- a/fs/cramfs/
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Anand Jain
Reviewed-by: Chaitanya Kulkarni
Acked-by: David Sterba
---
fs/btrfs/dev-replace.c | 3 +--
fs/btrfs/disk-io.c | 2 +-
fs/btrfs/ioctl.c | 4 ++--
fs/b
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/hfsplus/wrapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 0350dc7821bf9..51ae6f1eb4a55 100644
--- a/f
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Chaitanya Kulkarni
---
drivers/nvme/target/io-cmd-bdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/io-cmd-bdev.c
b/driver
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/fat/inode.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index de0c9b013a851..9f3cd03668adc 100644
--- a/fs/fat/inode.c
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Chaitanya Kulkarni
---
fs/affs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/affs/super.c b/fs/affs/super.c
index c6c2a513ec92d..c609005a9e
No need to convert from bdev to inode and back.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 156358977249f..46bc589b7a03c 100644
--- a/fs/buffer.
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Chaitanya Kulkarni
---
drivers/target/target_core_iblock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_iblock.c
b/dr
Use the proper helpers to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Mike Snitzer
---
drivers/md/dm-bufio.c | 2 +-
drivers/md/dm-cache-metadata.c | 2 +-
drivers/md/dm-cache-target.c| 2 +-
drivers/md/dm-clone-target.c| 2 +
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index c615387aedcae.
Use the equivalent block layer helper instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Chaitanya Kulkarni
Acked-by: Coly Li
---
drivers/md/bcache/super.c | 2 +-
drivers/md/bcache/util.h | 4
drivers/md/bcache/writeback.c | 2 +-
3 files changed, 2 i
Ensure these are always available for inlines in the various block layer
headers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
---
include/linux/blk_types.h | 17 +
include/linux/blkdev.h| 17
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Song Liu
---
drivers/md/md.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ec09083ff
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 a/include/linux/genh
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
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Lee Duncan
Reviewed-by: Chaitanya Kulkarni
---
drivers/block/drbd/drbd_int.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_
On Fri, Oct 15, 2021 at 03:26:33PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
> ---
> fs/ntfs3/super.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
On 10/15/21 8:26AM, Christoph Hellwig wrote:
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Dave Kleikamp
---
fs/jfs/resize.c | 3 +--
fs/jfs/super.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(
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 ty
On Fri, Oct 15, 2021 at 03:26:25PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Anand Jain
> Reviewed-by: Chaitanya Kulkarni
Acked-by: David Sterba
--
dm-devel mailing list
dm-devel@redhat.com
https
On Fri, Oct 15, 2021 at 10:27 PM Christoph Hellwig wrote:
>
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Acked-by: Ryusuke Konishi
Thanks,
Ryusuke Konishi
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm
Hi Christoph,
Looks good, thank you.
Best regards,
Anton
> On 15 Oct 2021, at 14:26, Christoph Hellwig wrote:
>
> Use the sb_bdev_nr_blocks helper instead of open coding it and clean up
> ntfs_fill_super a bit by moving an assignment a little earlier that has
> no negative side effect
63 matches
Mail list logo