All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@argo.co.il>
To: Karthik Sarangan <karthiks@cdac.in>
Cc: linux-kernel@vger.kernel.org
Subject: Re: O_DIRECT for block device
Date: Thu, 22 Sep 2005 11:34:59 +0300	[thread overview]
Message-ID: <43326CB3.8080607@argo.co.il> (raw)
In-Reply-To: <4332697C.7070409@cdac.in>

Karthik Sarangan wrote:

> I have a scsi hdd configured at /dev/sdb.
>
> open("/dev/sdb", O_DIRECT) succeeds.
> A 'read' or 'write' returns -1 and errno is EINVAL.
>
> How to read and write data to it? They do not seem to work. I have a 
> 262144 byte buffer for data transfer.

make sure your buffer is aligned on a 512 byte boundary.

  reply	other threads:[~2005-09-22  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  8:21 O_DIRECT for block device Karthik Sarangan
2005-09-22  8:34 ` Avi Kivity [this message]
2005-09-22  8:40 ` Joel Becker
     [not found]   ` <43329590.3050006@cdac.in>
     [not found]     ` <20050922152028.GJ27375@ca-server1.us.oracle.com>
2005-09-23  5:36       ` Karthik Sarangan

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=43326CB3.8080607@argo.co.il \
    --to=avi@argo.co.il \
    --cc=karthiks@cdac.in \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.