Skip to content

Fix devdax_open_ipc_handle() and devdax_close_ipc_handle() #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Oct 24, 2024

Description

Fix devdax_open_ipc_handle() and devdax_close_ipc_handle()

devdax_open_ipc_handle() has to use the path of the remote
/dev/dax got from the IPC handle, not the local one.

devdax_open_ipc_handle() has to use also the memory protection
got from the IPC handle, so let's add the memory protection
to the IPC handle.

devdax_open_ipc_handle() should mmap only the required range of memory,
not the whole /dev/dax device, so let's add the length of the allocation
to the IPC handle.

devdax_close_ipc_handle() should unmap only the required range of memory,
not the whole /dev/dax device.

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@ldorau ldorau requested a review from a team as a code owner October 24, 2024 07:48
@ldorau ldorau force-pushed the Fix_devdax_open_ipc_handle branch from e3a5fcf to 8ec05ad Compare October 24, 2024 08:40
@ldorau ldorau marked this pull request as draft October 24, 2024 09:08
@ldorau ldorau changed the title Fix devdax_open_ipc_handle() [WIP] Fix devdax_open_ipc_handle() Oct 24, 2024
@ldorau ldorau force-pushed the Fix_devdax_open_ipc_handle branch 5 times, most recently from ba0cb7b to e640016 Compare October 24, 2024 13:12
devdax_open_ipc_handle() has to use the path of the remote
/dev/dax got from the IPC handle, not the local one.

devdax_open_ipc_handle() has to use also the memory protection
got from the IPC handle, so let's add the memory protection
to the IPC handle.

devdax_open_ipc_handle() should mmap only the required range of memory,
not the whole /dev/dax device, so let's add the length of the allocation
to the IPC handle.

devdax_close_ipc_handle() should unmap only the required range of memory,
not the whole /dev/dax device.

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau changed the title [WIP] Fix devdax_open_ipc_handle() Fix devdax_open_ipc_handle() and devdax_close_ipc_handle() Oct 24, 2024
@ldorau ldorau marked this pull request as ready for review October 24, 2024 13:15
@ldorau ldorau force-pushed the Fix_devdax_open_ipc_handle branch from e640016 to 7706431 Compare October 24, 2024 13:18
@ldorau ldorau requested a review from vinser52 October 24, 2024 13:56
@ldorau
Copy link
Contributor Author

ldorau commented Oct 24, 2024

It requires more changes, closing for now, will be reopened

@ldorau ldorau closed this Oct 24, 2024
@ldorau
Copy link
Contributor Author

ldorau commented Oct 24, 2024

Reopened in #838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants