public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: Karthik Sarangan <karthiks@cdac.in>
Cc: linux-kernel@vger.kernel.org
Subject: Re: O_DIRECT for block device
Date: Thu, 22 Sep 2005 01:40:36 -0700	[thread overview]
Message-ID: <20050922084036.GI27375@ca-server1.us.oracle.com> (raw)
In-Reply-To: <4332697C.7070409@cdac.in>

On Thu, Sep 22, 2005 at 01:51:16PM +0530, Karthik Sarangan wrote:
> open("/dev/sdb", O_DIRECT) succeeds.
> A 'read' or 'write' returns -1 and errno is EINVAL.

	You must align your buffer to at least sector size.  See
posix_memalign(3).

-- 

Life's Little Instruction Book #30

	"Never buy a house without a fireplace."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

  parent reply	other threads:[~2005-09-22  8:40 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
2005-09-22  8:40 ` Joel Becker [this message]
     [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=20050922084036.GI27375@ca-server1.us.oracle.com \
    --to=joel.becker@oracle.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox