mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bob McElrath <mcelrath+linux@draal.physics.wisc.edu>
To: Andrea Arcangeli <andrea@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: using O_DIRECT
Date: Tue, 4 Sep 2001 03:32:43 -0500	[thread overview]
Message-ID: <20010904033243.A7872@draal.physics.wisc.edu> (raw)
In-Reply-To: <20010903104544.X23180@draal.physics.wisc.edu> <20010903175333.P699@athlon.random> <20010903105714.Y23180@draal.physics.wisc.edu> <20010903180524.Q699@athlon.random> <20010903151342.A2247@draal.physics.wisc.edu> <20010904000902.Z699@athlon.random>
In-Reply-To: <20010904000902.Z699@athlon.random>; from andrea@suse.de on Tue, Sep 04, 2001 at 12:09:02AM +0200

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

Andrea Arcangeli [andrea@suse.de] wrote:
> On Mon, Sep 03, 2001 at 03:13:42PM -0500, Bob McElrath wrote:
> > I have written a small program to use O_DIRECT (attached), after
> > applying your patch o_direct-14 to kernel 2.4.9.  Opening the file with
> > O_DIRECT is successful, but attempts to write to the fd return EINVAL.
> > 
> > Am I doing something wrong?  Should I have to recompile glibc too?
> 
> eh, the alignment and size of the buffer have basically the same
> restrictions of running read/write on a raw device, with the only
> difference that for rawio the granularity is the hardblocksize, while
> for O_DIRECT the granularity is the softblocksize of the filesystem.

Ah, thanks, it's working now.  Makes sense that it should use blocksize
granularity...

> We'll have to relax the granularity of the I/O down to the hardblocksize
> for O_DIRECT too eventually.

I don't really care about the granularity.  The bigger the better,
actually, since I'm streaming data to disk quickly.  ;)

Thanks,
-- Bob

Bob McElrath (rsmcelrath@students.wisc.edu) 
Univ. of Wisconsin at Madison, Department of Physics

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

  reply	other threads:[~2001-09-03 22:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010903104544.X23180@draal.physics.wisc.edu>
     [not found] ` <20010903175333.P699@athlon.random>
     [not found]   ` <20010903105714.Y23180@draal.physics.wisc.edu>
     [not found]     ` <20010903180524.Q699@athlon.random>
2001-09-03 20:13       ` Bob McElrath
2001-09-03 22:09         ` Andrea Arcangeli
2001-09-04  8:32           ` Bob McElrath [this message]
2001-09-03 22:37             ` Andrea Arcangeli

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=20010904033243.A7872@draal.physics.wisc.edu \
    --to=mcelrath+linux@draal.physics.wisc.edu \
    --cc=andrea@suse.de \
    --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

all inboxes | Powered by JetHome®