Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-5.7-2020-05-22' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
"Two fixes for null_blk zone mode"

* tag 'block-5.7-2020-05-22' of git://git.kernel.dk/linux-block:
null_blk: don't allow discard for zoned mode
null_blk: return error for invalid zone size

+11
+7
drivers/block/null_blk_main.c
··· 1535 1535 { 1536 1536 if (nullb->dev->discard == false) 1537 1537 return; 1538 + 1539 + if (nullb->dev->zoned) { 1540 + nullb->dev->discard = false; 1541 + pr_info("discard option is ignored in zoned mode\n"); 1542 + return; 1543 + } 1544 + 1538 1545 nullb->q->limits.discard_granularity = nullb->dev->blocksize; 1539 1546 nullb->q->limits.discard_alignment = nullb->dev->blocksize; 1540 1547 blk_queue_max_discard_sectors(nullb->q, UINT_MAX >> 9);
+4
drivers/block/null_blk_zoned.c
··· 23 23 pr_err("zone_size must be power-of-two\n"); 24 24 return -EINVAL; 25 25 } 26 + if (dev->zone_size > dev->size) { 27 + pr_err("Zone size larger than device capacity\n"); 28 + return -EINVAL; 29 + } 26 30 27 31 dev->zone_size_sects = dev->zone_size << ZONE_SIZE_SHIFT; 28 32 dev->nr_zones = dev_size >>