You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block updates from Jens Axboe:
"This is a bit bigger than it should be, but I could (did) not want to
send it off last week due to both wanting extra testing, and expecting
a fix for the bounce regression as well. In any case, this contains:
- Fix for the blk-merge.c compilation warning on gcc 5.x from me.
- A set of back/front SG gap merge fixes, from me and from Sagi.
This ensures that we honor SG gapping for integrity payloads as
well.
- Two small fixes for null_blk from Matias, fixing a leak and a
capacity propagation issue.
- A blkcg fix from Tejun, fixing a NULL dereference.
- A fast clone optimization from Ming, fixing a performance
regression since the arbitrarily sized bio's were introduced.
- Also from Ming, a regression fix for bouncing IOs"
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix bounce_end_io
block: blk-merge: fast-clone bio when splitting rw bios
block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg
block: Copy a user iovec if it includes gaps
block: Refuse adding appending a gapped integrity page to a bio
block: Refuse request/bio merges with gaps in the integrity payload
block: Check for gaps on front and back merges
null_blk: fix wrong capacity when bs is not 512 bytes
null_blk: fix memory leak on cleanup
block: fix bogus compiler warnings in blk-merge.c
This commit is contained in:
+18
-18
@@ -406,6 +406,22 @@ static struct blk_mq_ops null_mq_ops = {
|
||||
.complete = null_softirq_done_fn,
|
||||
};
|
||||
|
||||
static void cleanup_queue(struct nullb_queue *nq)
|
||||
{
|
||||
kfree(nq->tag_map);
|
||||
kfree(nq->cmds);
|
||||
}
|
||||
|
||||
static void cleanup_queues(struct nullb *nullb)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nullb->nr_queues; i++)
|
||||
cleanup_queue(&nullb->queues[i]);
|
||||
|
||||
kfree(nullb->queues);
|
||||
}
|
||||
|
||||
static void null_del_dev(struct nullb *nullb)
|
||||
{
|
||||
list_del_init(&nullb->list);
|
||||
@@ -415,6 +431,7 @@ static void null_del_dev(struct nullb *nullb)
|
||||
if (queue_mode == NULL_Q_MQ)
|
||||
blk_mq_free_tag_set(&nullb->tag_set);
|
||||
put_disk(nullb->disk);
|
||||
cleanup_queues(nullb);
|
||||
kfree(nullb);
|
||||
}
|
||||
|
||||
@@ -459,22 +476,6 @@ static int setup_commands(struct nullb_queue *nq)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cleanup_queue(struct nullb_queue *nq)
|
||||
{
|
||||
kfree(nq->tag_map);
|
||||
kfree(nq->cmds);
|
||||
}
|
||||
|
||||
static void cleanup_queues(struct nullb *nullb)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nullb->nr_queues; i++)
|
||||
cleanup_queue(&nullb->queues[i]);
|
||||
|
||||
kfree(nullb->queues);
|
||||
}
|
||||
|
||||
static int setup_queues(struct nullb *nullb)
|
||||
{
|
||||
nullb->queues = kzalloc(submit_queues * sizeof(struct nullb_queue),
|
||||
@@ -588,8 +589,7 @@ static int null_add_dev(void)
|
||||
blk_queue_physical_block_size(nullb->q, bs);
|
||||
|
||||
size = gb * 1024 * 1024 * 1024ULL;
|
||||
sector_div(size, bs);
|
||||
set_capacity(disk, size);
|
||||
set_capacity(disk, size >> 9);
|
||||
|
||||
disk->flags |= GENHD_FL_EXT_DEVT | GENHD_FL_SUPPRESS_PARTITION_INFO;
|
||||
disk->major = null_major;
|
||||
|
||||
Reference in New Issue
Block a user