public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: ltp-list <ltp-list@lists.sf.net>, Arnd Bergmann <arnd@arndb.de>,
	Ralf Baechle <ralf@linux-mips.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [LTP] [PATCH] Add preadv01 test for preadv() and pwritev() syscall
Date: Fri, 12 Jun 2009 15:44:44 +0200	[thread overview]
Message-ID: <4A325BCC.2020701@redhat.com> (raw)
In-Reply-To: <20090612132112.32049.92495.sendpatchset@subratamodak.linux.ibm.com>

   Hi,

> + * Reference: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=601cc11d054ae4b5e9b5babec3d8e4667a2cb9b5

Look at the commit message again ...

> +static ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
> +{
> +    uint32_t pos_high = (offset>>  32)&  0xffffffff;
> +    uint32_t pos_low  =  offset&  0xffffffff;
> +
> +    return syscall(__NR_preadv, fd, iov, iovcnt, pos_high, pos_low);
> +}

No.

#define HALF_BITS (sizeof(unsigned long)*4)
return syscall(__NR_preadv, fd, iov, iovcnt, offset,
                (offset >> HALF_BITS) >> HALF_BITS);

Likewise for pwritev.

Also note that latest glibc has preadv/pwritev support, so you could use 
that instead.

cheers,
   Gerd


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2009-06-12 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12 13:21 [LTP] [PATCH] Add preadv01 test for preadv() and pwritev() syscall Subrata Modak
2009-06-12 13:44 ` Gerd Hoffmann [this message]
2009-06-15 19:15   ` Subrata Modak

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=4A325BCC.2020701@redhat.com \
    --to=kraxel@redhat.com \
    --cc=arnd@arndb.de \
    --cc=ltp-list@lists.sf.net \
    --cc=ralf@linux-mips.org \
    --cc=subrata@linux.vnet.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    /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