public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>,
	Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Corrections in Documentation/block/ioprio.txt
Date: Thu, 23 Aug 2007 10:45:19 +0200	[thread overview]
Message-ID: <20070823084519.GJ23758@kernel.dk> (raw)
In-Reply-To: <20070823082836.GB27439@linux.vnet.ibm.com>

On Thu, Aug 23 2007, Dhaval Giani wrote:
> On Thu, Aug 23, 2007 at 10:29:30AM +0200, Jens Axboe wrote:
> > On Thu, Aug 23 2007, Dhaval Giani wrote:
> > > Hi Jens,
> > > 
> > > The newer glibc does not allow system calls to be made via _syscallN()
> > > wrapper. They have to be made through syscall(). The ionice code used
> > > the older interface. Correcting it to use syscall.
> > > 
> > > Signed-of-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
> > > 
> > > 
> > > Index: linux-2.6.23-rc3-mm1/Documentation/block/ioprio.txt
> > > ===================================================================
> > > --- linux-2.6.23-rc3-mm1.orig/Documentation/block/ioprio.txt	2007-07-09 05:02:17.000000000 +0530
> > > +++ linux-2.6.23-rc3-mm1/Documentation/block/ioprio.txt	2007-08-23 13:23:28.000000000 +0530
> > > @@ -86,8 +86,9 @@ extern int sys_ioprio_get(int, int);
> > >  #error "Unsupported arch"
> > >  #endif
> > >  
> > > -_syscall3(int, ioprio_set, int, which, int, who, int, ioprio);
> > > -_syscall2(int, ioprio_get, int, which, int, who);
> > > +#define ioprio_set(which, who, ioprio)  syscall(__NR_ioprio_set, which,\
> > > +							who, ioprio)
> > > +#define ioprio_get(which, who)	syscall(__NR_ioprio_get, which, who)
> > 
> > Agree, it fails as-of recent distros. But I prefer a function instead,
> > can you resend with something ala:
> > 
> > static inline int ioprio_set(int which, int who, int ioprio)
> > {
> >         return syscall(__NR_ioprio_set, which, who, ioprio);
> > }
> > 
> > and ditto for ioprio_get()?
> > 
> > -- 
> > Jens Axboe
> 
> Done..
> 
> ----------------------
> 
> The newer glibc does not allow system calls to be made via _syscallN()
> wrapper. They have to be made through syscall(). The ionice code used
> the older interface. Correcting it to use syscall.
>  
> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
> 
> 
> Index: linux-2.6.23-rc3-mm1/Documentation/block/ioprio.txt
> ===================================================================
> --- linux-2.6.23-rc3-mm1.orig/Documentation/block/ioprio.txt	2007-07-09 05:02:17.000000000 +0530
> +++ linux-2.6.23-rc3-mm1/Documentation/block/ioprio.txt	2007-08-23 13:46:08.000000000 +0530
> @@ -86,8 +86,15 @@ extern int sys_ioprio_get(int, int);
>  #error "Unsupported arch"
>  #endif
>  
> -_syscall3(int, ioprio_set, int, which, int, who, int, ioprio);
> -_syscall2(int, ioprio_get, int, which, int, who);
> +static inline int ioprio_set(int which, int who, int ioprio)
> +{
> +	return syscall(__NR_ioprio_set, which, who, ioprio);
> +}
> +
> +static inline int ioprio_get(int which, int who)
> +{
> +	return syscall(__NR_ioprio_get, which, who);
> +}
>  
>  enum {
>  	IOPRIO_CLASS_NONE,

Thanks, applied!

-- 
Jens Axboe


      reply	other threads:[~2007-08-23  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23  8:18 [PATCH] Corrections in Documentation/block/ioprio.txt Dhaval Giani
2007-08-23  8:29 ` Jens Axboe
2007-08-23  8:28   ` Dhaval Giani
2007-08-23  8:45     ` Jens Axboe [this message]

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=20070823084519.GJ23758@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=balbir@in.ibm.com \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vatsa@linux.vnet.ibm.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