@@ -1424,8 +1424,8 @@ static const BlockDevOps virtio_block_ops = {
1424
1424
};
1425
1425
1426
1426
static bool
1427
- validate_iothread_vq_mapping_list (IOThreadVirtQueueMappingList * list ,
1428
- uint16_t num_queues , Error * * errp )
1427
+ iothread_vq_mapping_validate (IOThreadVirtQueueMappingList * list , uint16_t
1428
+ num_queues , Error * * errp )
1429
1429
{
1430
1430
g_autofree unsigned long * vqs = bitmap_new (num_queues );
1431
1431
g_autoptr (GHashTable ) iothreads =
@@ -1486,22 +1486,22 @@ validate_iothread_vq_mapping_list(IOThreadVirtQueueMappingList *list,
1486
1486
}
1487
1487
1488
1488
/**
1489
- * apply_iothread_vq_mapping :
1490
- * @iothread_vq_mapping_list : The mapping of virtqueues to IOThreads.
1489
+ * iothread_vq_mapping_apply :
1490
+ * @list : The mapping of virtqueues to IOThreads.
1491
1491
* @vq_aio_context: The array of AioContext pointers to fill in.
1492
1492
* @num_queues: The length of @vq_aio_context.
1493
1493
* @errp: If an error occurs, a pointer to the area to store the error.
1494
1494
*
1495
1495
* Fill in the AioContext for each virtqueue in the @vq_aio_context array given
1496
- * the iothread-vq-mapping parameter in @iothread_vq_mapping_list .
1496
+ * the iothread-vq-mapping parameter in @list .
1497
1497
*
1498
- * cleanup_iothread_vq_mapping () must be called to free IOThread object
1498
+ * iothread_vq_mapping_cleanup () must be called to free IOThread object
1499
1499
* references after this function returns success.
1500
1500
*
1501
1501
* Returns: %true on success, %false on failure.
1502
1502
**/
1503
- static bool apply_iothread_vq_mapping (
1504
- IOThreadVirtQueueMappingList * iothread_vq_mapping_list ,
1503
+ static bool iothread_vq_mapping_apply (
1504
+ IOThreadVirtQueueMappingList * list ,
1505
1505
AioContext * * vq_aio_context ,
1506
1506
uint16_t num_queues ,
1507
1507
Error * * errp )
@@ -1510,16 +1510,15 @@ static bool apply_iothread_vq_mapping(
1510
1510
size_t num_iothreads = 0 ;
1511
1511
size_t cur_iothread = 0 ;
1512
1512
1513
- if (!validate_iothread_vq_mapping_list (iothread_vq_mapping_list ,
1514
- num_queues , errp )) {
1513
+ if (!iothread_vq_mapping_validate (list , num_queues , errp )) {
1515
1514
return false;
1516
1515
}
1517
1516
1518
- for (node = iothread_vq_mapping_list ; node ; node = node -> next ) {
1517
+ for (node = list ; node ; node = node -> next ) {
1519
1518
num_iothreads ++ ;
1520
1519
}
1521
1520
1522
- for (node = iothread_vq_mapping_list ; node ; node = node -> next ) {
1521
+ for (node = list ; node ; node = node -> next ) {
1523
1522
IOThread * iothread = iothread_by_id (node -> value -> iothread );
1524
1523
AioContext * ctx = iothread_get_aio_context (iothread );
1525
1524
@@ -1549,13 +1548,13 @@ static bool apply_iothread_vq_mapping(
1549
1548
}
1550
1549
1551
1550
/**
1552
- * cleanup_iothread_vq_mapping :
1551
+ * iothread_vq_mapping_cleanup :
1553
1552
* @list: The mapping of virtqueues to IOThreads.
1554
1553
*
1555
1554
* Release IOThread object references that were acquired by
1556
- * apply_iothread_vq_mapping ().
1555
+ * iothread_vq_mapping_apply ().
1557
1556
*/
1558
- static void cleanup_iothread_vq_mapping (IOThreadVirtQueueMappingList * list )
1557
+ static void iothread_vq_mapping_cleanup (IOThreadVirtQueueMappingList * list )
1559
1558
{
1560
1559
IOThreadVirtQueueMappingList * node ;
1561
1560
@@ -1597,7 +1596,7 @@ static bool virtio_blk_vq_aio_context_init(VirtIOBlock *s, Error **errp)
1597
1596
s -> vq_aio_context = g_new (AioContext * , conf -> num_queues );
1598
1597
1599
1598
if (conf -> iothread_vq_mapping_list ) {
1600
- if (!apply_iothread_vq_mapping (conf -> iothread_vq_mapping_list ,
1599
+ if (!iothread_vq_mapping_apply (conf -> iothread_vq_mapping_list ,
1601
1600
s -> vq_aio_context ,
1602
1601
conf -> num_queues ,
1603
1602
errp )) {
@@ -1631,7 +1630,7 @@ static void virtio_blk_vq_aio_context_cleanup(VirtIOBlock *s)
1631
1630
assert (!s -> ioeventfd_started );
1632
1631
1633
1632
if (conf -> iothread_vq_mapping_list ) {
1634
- cleanup_iothread_vq_mapping (conf -> iothread_vq_mapping_list );
1633
+ iothread_vq_mapping_cleanup (conf -> iothread_vq_mapping_list );
1635
1634
}
1636
1635
1637
1636
if (conf -> iothread ) {
0 commit comments