Skip to content

Fix libaio cancellation support

Bart Van Assche linux-fsdevel stable 1 version Applied

Status from this message: Applied to the vfs.misc branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest2 patches 19 repliesApplied

Changes in v4 from the cover letter

- Restored libaio cancellation support.
- Changed the approach to marking libaio requests with a flag in struct kiocb instead of adding a new operation in struct file_operations.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaiofs/aio.c include/linux/fs.h+10 -110 replies
2/2fs/aio: Make io_cancel() generate completions againfs/aio.c+11 -164 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] Fix libaio cancellation support

Hi Christian,

This patch series fixes cancellation support in libaio as follows:
- Restore the code for completing cancelled I/O.
- Ignore requests to support cancellation for I/O not submitted by libaio.

Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes between v3 and v4:
- Restored libaio cancellation support.
- Changed the approach to marking libaio requests with a flag in struct kiocb instead of adding a new operation in struct file_operations.

Changes between v2 and v3:
- Removed libaio cancellation support instead of trying to fix it.

Changes between v1 and v2:
- Fixed a race between request completion and addition to the list of active requests.
- Changed the return type of .cancel_kiocb() from int into void.
- Simplified the .cancel_kiocb() implementations.
- Introduced the ki_opcode member in struct aio_kiocb.
- aio_cancel_and_del() now checks .ki_opcode before accessing union members.
- Left out the include/include/mm changes.

Bart Van Assche (2):
fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio fs/aio: Make io_cancel() generate completions again

 fs/aio.c           | 36 +++++++++++++++++++-----------------
 include/linux/fs.h |  2 ++
 2 files changed, 21 insertions(+), 17 deletions(-)