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 'for-linus-20181019' of git://git.kernel.dk/linux-block

Jens writes:
"Block fixes for 4.19-final

Two small fixes that should go into this release."

* tag 'for-linus-20181019' of git://git.kernel.dk/linux-block:
block: don't deal with discard limit in blkdev_issue_discard()
nvme: remove ns sibling before clearing path

+3 -27
+2 -26
block/blk-lib.c
··· 29 29 { 30 30 struct request_queue *q = bdev_get_queue(bdev); 31 31 struct bio *bio = *biop; 32 - unsigned int granularity; 33 32 unsigned int op; 34 - int alignment; 35 33 sector_t bs_mask; 36 34 37 35 if (!q) ··· 52 54 if ((sector | nr_sects) & bs_mask) 53 55 return -EINVAL; 54 56 55 - /* Zero-sector (unknown) and one-sector granularities are the same. */ 56 - granularity = max(q->limits.discard_granularity >> 9, 1U); 57 - alignment = (bdev_discard_alignment(bdev) >> 9) % granularity; 58 - 59 57 while (nr_sects) { 60 - unsigned int req_sects; 61 - sector_t end_sect, tmp; 58 + unsigned int req_sects = nr_sects; 59 + sector_t end_sect; 62 60 63 - /* 64 - * Issue in chunks of the user defined max discard setting, 65 - * ensuring that bi_size doesn't overflow 66 - */ 67 - req_sects = min_t(sector_t, nr_sects, 68 - q->limits.max_discard_sectors); 69 61 if (!req_sects) 70 62 goto fail; 71 63 if (req_sects > UINT_MAX >> 9) 72 64 req_sects = UINT_MAX >> 9; 73 65 74 - /* 75 - * If splitting a request, and the next starting sector would be 76 - * misaligned, stop the discard at the previous aligned sector. 77 - */ 78 66 end_sect = sector + req_sects; 79 - tmp = end_sect; 80 - if (req_sects < nr_sects && 81 - sector_div(tmp, granularity) != alignment) { 82 - end_sect = end_sect - alignment; 83 - sector_div(end_sect, granularity); 84 - end_sect = end_sect * granularity + alignment; 85 - req_sects = end_sect - sector; 86 - } 87 67 88 68 bio = next_bio(bio, 0, gfp_mask); 89 69 bio->bi_iter.bi_sector = sector;
+1 -1
drivers/nvme/host/core.c
··· 3143 3143 } 3144 3144 3145 3145 mutex_lock(&ns->ctrl->subsys->lock); 3146 - nvme_mpath_clear_current_path(ns); 3147 3146 list_del_rcu(&ns->siblings); 3147 + nvme_mpath_clear_current_path(ns); 3148 3148 mutex_unlock(&ns->ctrl->subsys->lock); 3149 3149 3150 3150 down_write(&ns->ctrl->namespaces_rwsem);