Re: [PATCH 30/32] aio: add delayed cancel support

2018-01-15 Thread Christoph Hellwig
On Thu, Jan 11, 2018 at 10:27:05AM -0500, Jeff Moyer wrote: > Duh, good point. My main concern is that things like usb gadget will > have to deal with races between cancellation and completion on their > own. It would be nice if we had infrastructure for them to use. I'll > have a look through t

Re: [PATCH 30/32] aio: add delayed cancel support

2018-01-11 Thread Jeff Moyer
Christoph Hellwig writes: > On Wed, Jan 10, 2018 at 06:26:39PM -0500, Jeff Moyer wrote: >> >> The upcoming aio poll support would like to be able to complete the >> >> iocb inline from the cancellation context, but that would cause >> >> a lock order reversal. Add support for optionally moving t

Re: [PATCH 30/32] aio: add delayed cancel support

2018-01-11 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 06:26:39PM -0500, Jeff Moyer wrote: > >> The upcoming aio poll support would like to be able to complete the > >> iocb inline from the cancellation context, but that would cause > >> a lock order reversal. Add support for optionally moving the cancelation > >> outside the c

Re: [PATCH 30/32] aio: add delayed cancel support

2018-01-10 Thread Jeff Moyer
Jeff Moyer writes: > Christoph Hellwig writes: > >> The upcoming aio poll support would like to be able to complete the >> iocb inline from the cancellation context, but that would cause >> a lock order reversal. Add support for optionally moving the cancelation >> outside the context lock to a

Re: [PATCH 30/32] aio: add delayed cancel support

2018-01-10 Thread Jeff Moyer
Christoph Hellwig writes: > The upcoming aio poll support would like to be able to complete the > iocb inline from the cancellation context, but that would cause > a lock order reversal. Add support for optionally moving the cancelation > outside the context lock to avoid this reversal. > > Sign

[PATCH 30/32] aio: add delayed cancel support

2018-01-10 Thread Christoph Hellwig
The upcoming aio poll support would like to be able to complete the iocb inline from the cancellation context, but that would cause a lock order reversal. Add support for optionally moving the cancelation outside the context lock to avoid this reversal. Signed-off-by: Christoph Hellwig --- fs/a