public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@kvack.org>
To: Wendy Cheng <wcheng@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add ENOSYS into sys_io_cancel
Date: Mon, 11 Jul 2005 21:48:45 -0400	[thread overview]
Message-ID: <20050712014845.GA11916@kvack.org> (raw)
In-Reply-To: <42D2C34C.4040406@redhat.com>

Hello Wendy,

Two things: your patch needs to be properly signed off on.  Read 
Documentation/SubmittingPatches for a description of what that entials.  
Secondly, your patch adds whitespace on the end of the else.  Aside 
from that, the printk should be removed -- just replace it with the 
ret = -ENOSYS.

Also, please cc linux-aio@kvack.org on future aio patches.  Cheers,

		-ben 

On Mon, Jul 11, 2005 at 03:06:52PM -0400, Wendy Cheng wrote:
> Previously sent via private mail that doesn't seem to go thru - resend 
> via office mailer.
> 
> Note that other than few exceptions, most of the current filesystem 
> and/or drivers do not have aio cancel specifically defined 
> (kiob->ki_cancel field is mostly NULL). However, sys_io_cancel system 
> call universally sets return code to -EGAIN. This gives applications a 
> wrong impression that this call is implemented but just never works. We 
> have customer inquires about this issue.
> 
> Upload a trivial patch to address this confusion.
> 
> -- Wendy
> 
> 

> --- linux-2.6.12/fs/aio.c	2005-06-17 15:48:29.000000000 -0400
> +++ linux/fs/aio.c	2005-07-10 12:48:14.000000000 -0400
> @@ -1641,8 +1641,9 @@ asmlinkage long sys_io_cancel(aio_contex
>  		cancel = kiocb->ki_cancel;
>  		kiocb->ki_users ++;
>  		kiocbSetCancelled(kiocb);
> -	} else
> +	} else 
>  		cancel = NULL;
> +	 
>  	spin_unlock_irq(&ctx->ctx_lock);
>  
>  	if (NULL != cancel) {
> @@ -1659,8 +1660,10 @@ asmlinkage long sys_io_cancel(aio_contex
>  			if (copy_to_user(result, &tmp, sizeof(tmp)))
>  				ret = -EFAULT;
>  		}
> -	} else
> +	} else {
> +		ret = -ENOSYS;
>  		printk(KERN_DEBUG "iocb has no cancel operation\n");
> +	} 
>  
>  	put_ioctx(ctx);
>  


-- 
"Time is what keeps everything from happening all at once." -- John Wheeler

  reply	other threads:[~2005-07-12  1:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 19:06 [PATCH] Add ENOSYS into sys_io_cancel Wendy Cheng
2005-07-12  1:48 ` Benjamin LaHaise [this message]
2005-07-12 15:49   ` Wendy Cheng
2005-07-12 16:05     ` Benjamin LaHaise
  -- strict thread matches above, loose matches on Subject: below --
2005-07-10 18:25 Shiow-wen Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050712014845.GA11916@kvack.org \
    --to=bcrl@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wcheng@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox