Files
acrn-hypervisor/devicemodel/include
Shiqing Gao 14c20fa31c dm: block_if: support misaligned request when O_DIRECT is used
Use of O_DIRECT flag could be a performance option.
But this flag may impose alignment restrictions on the length
and address of user-space buffers and the file offset of I/Os.

To support the use of O_DIRECT flag in block_if, this patch adds the support
to handle the misaligned request.
 - When O_DIRECT flag is used (`nocache` is specified in acrn-dm parameters),
    * if the original I/O request is aligned,
      the original I/O request is submitted directly.
    * if the original I/O request is not aligned (either due to the buffer
        address/length misalignment, or the offset misalignment),
      the misaligned request is converted to an aligned request before
      submission.

 - When O_DIRECT flag is not used,
   the original I/O request is submitted directly.

v1 -> v2:
 * cleanup the free() logic in `blockif_init_bounced_write`

Tracked-On: #8612

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2024-06-05 15:23:33 +08:00
..
2024-02-01 17:01:31 +08:00
2022-07-13 14:01:01 +08:00
2018-05-11 14:44:28 +08:00
2020-09-01 09:30:08 +08:00
2018-05-11 14:44:28 +08:00
2024-06-05 15:23:33 +08:00
2022-03-28 15:26:20 +08:00
2018-05-16 15:09:48 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-12-07 20:21:33 +08:00
2018-05-11 14:44:28 +08:00
2018-06-07 16:11:49 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2021-05-19 13:54:24 +08:00
2019-05-24 11:51:00 +08:00
2024-02-01 17:01:31 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2019-03-21 10:28:17 +08:00
2022-04-08 13:54:47 +08:00
2018-12-27 09:58:20 +08:00
2023-09-19 14:26:02 +08:00
2018-05-11 14:44:28 +08:00
2022-11-25 10:43:34 +08:00