block.c (016f5cf6ff465411733878a17c8f8febb7668321) | block.c (cbf1dff2f1033cadcb15c0ffc9c0a3d039d8ed42) |
---|---|
1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 2005 unchanged lines hidden (view full) --- 2014 memset(buf, 0, zero_bytes); 2015 qemu_iovec_add(qiov, buf, zero_bytes); 2016 mcb->callbacks[i].free_buf = buf; 2017 } 2018 2019 // Add the second request 2020 qemu_iovec_concat(qiov, reqs[i].qiov, reqs[i].qiov->size); 2021 | 1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 2005 unchanged lines hidden (view full) --- 2014 memset(buf, 0, zero_bytes); 2015 qemu_iovec_add(qiov, buf, zero_bytes); 2016 mcb->callbacks[i].free_buf = buf; 2017 } 2018 2019 // Add the second request 2020 qemu_iovec_concat(qiov, reqs[i].qiov, reqs[i].qiov->size); 2021 |
2022 reqs[outidx].nb_sectors += reqs[i].nb_sectors; | 2022 reqs[outidx].nb_sectors = qiov->size >> 9; |
2023 reqs[outidx].qiov = qiov; 2024 2025 mcb->callbacks[i].free_qiov = reqs[outidx].qiov; 2026 } else { 2027 outidx++; 2028 reqs[outidx].sector = reqs[i].sector; 2029 reqs[outidx].nb_sectors = reqs[i].nb_sectors; 2030 reqs[outidx].qiov = reqs[i].qiov; --- 477 unchanged lines hidden --- | 2023 reqs[outidx].qiov = qiov; 2024 2025 mcb->callbacks[i].free_qiov = reqs[outidx].qiov; 2026 } else { 2027 outidx++; 2028 reqs[outidx].sector = reqs[i].sector; 2029 reqs[outidx].nb_sectors = reqs[i].nb_sectors; 2030 reqs[outidx].qiov = reqs[i].qiov; --- 477 unchanged lines hidden --- |