search for: null_validate_conf

Displaying 3 results from an estimated 3 matches for "null_validate_conf".

2020 Jul 21
0
[PATCH 05/10] block: null: use blk_is_valid_logical_block_size
..._blk_main.c > > index 87b31f9ca362e..e4df4b903b90b 100644 > > --- a/drivers/block/null_blk_main.c > > +++ b/drivers/block/null_blk_main.c > > @@ -1684,8 +1684,8 @@ static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set) > > > > static int null_validate_conf(struct nullb_device *dev) > > { > > - dev->blocksize = round_down(dev->blocksize, 512); > > - dev->blocksize = clamp_t(unsigned int, dev->blocksize, 512, 4096); > > + if (!blk_is_valid_logical_block_size(dev->blocksize)) > > + return -ENODEV; > >...
2020 Jul 21
17
[PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the block code. This was inspired by missing check for valid logical block size in virtio-blk which causes the kernel to crash in a weird way later on when it is invalid. I added blk_is_valid_logical_block_size which returns true iff the block size is one of supported sizes. I added this check to virtio-blk, and also converted
2020 Jul 21
17
[PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the block code. This was inspired by missing check for valid logical block size in virtio-blk which causes the kernel to crash in a weird way later on when it is invalid. I added blk_is_valid_logical_block_size which returns true iff the block size is one of supported sizes. I added this check to virtio-blk, and also converted