Re: [PATCH] fs:aio: Remove TODO comment suggesting hash or array usage in io_cancel()
Jan Kara <[email protected]>
| Newsgroups | gmane.linux.kernel.aio.general,gmane.linux.file-systems,gmane.linux.kernel |
|---|---|
| Message-ID | <20241112120252.a75tg4xqszn7nou3@quack3> |
On Tue 12-11-24 17:08:34, Mohammed Anees wrote: > The comment suggests a hash or array approach to > store the active requests. Currently it iterates > through all the active requests and when found > deletes the requested request, in the linked list. > However io_cancel() isn’t a frequently used operation, > and optimizing it wouldn’t bring a substantial benefit > to real users and the increased complexity of maintaining > a hashtable for this would be significant and will slow > down other operation. Therefore remove this TODO > to avoid people spending time improving this. > > Signed-off-by: Mohammed Anees <[email protected]> Looks good. Feel free to add: Reviewed-by: Jan Kara <[email protected]> Honza > --- > fs/aio.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/aio.c b/fs/aio.c > index e8920178b50f..72e3970f4225 100644 > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -2191,7 +2191,6 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, > return -EINVAL; > > spin_lock_irq(&ctx->ctx_lock); > - /* TODO: use a hash or array, this sucks. */ > list_for_each_entry(kiocb, &ctx->active_reqs, ki_list) { > if (kiocb->ki_res.obj == obj) { > ret = kiocb->ki_cancel(&kiocb->rw); > -- > 2.47.0 > -- Jan Kara <[email protected]> SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"[email protected]">[email protected]</a>