mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erik Mouw <erik@harddisk-recovery.com>
To: Jens Axboe <axboe@suse.de>
Cc: colin <colin@realtek.com.tw>, linux-kernel@vger.kernel.org
Subject: Re: A problem about DIRECT IO on ext3
Date: Wed, 31 Aug 2005 13:12:48 +0200	[thread overview]
Message-ID: <20050831111248.GA2347@harddisk-recovery.nl> (raw)
In-Reply-To: <20050831080744.GM4018@suse.de>

On Wed, Aug 31, 2005 at 10:07:45AM +0200, Jens Axboe wrote:
> On Mon, Aug 29 2005, Erik Mouw wrote:
> > There are four prerequisites for direct IO:
> > - the file needs to be opened with O_DIRECT
> > - the buffer needs to be page aligned (hint: use getpagesize() instead
> >   of assuming that a page is 4k
> > - reads and writes need to happen *in* multiples of the soft block size
> > - reads and writes need to happen *at* multiples of the soft block size
> 
> Actually, the buffer only needs to be hard block size aligned, same goes
> for the chunk size used for reads/writes.

OK, so that's different from 2.4 where reads/writes needed to be soft
block aligned and buffers page aligned.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
| Data lost? Stay calm and contact Harddisk-recovery.com

  reply	other threads:[~2005-08-31 11:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29 12:15 colin
2005-08-29 13:29 ` Erik Mouw
2005-08-31  8:07   ` Jens Axboe
2005-08-31 11:12     ` Erik Mouw [this message]
2005-08-31 11:15       ` Jens Axboe
2005-10-17  8:52     ` li nux
2005-10-17  8:58       ` li nux
2005-10-17  9:03       ` Jens Axboe
2005-10-17  9:15         ` Grzegorz Kulewski
2005-10-17  9:17           ` Jens Axboe
2005-10-17  9:41             ` li nux
2005-10-17  9:51               ` Jens Axboe
2005-10-17 16:36                 ` Badari Pulavarty
2005-10-17 17:53                   ` Jens Axboe
2005-08-29 13:21 colin

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=20050831111248.GA2347@harddisk-recovery.nl \
    --to=erik@harddisk-recovery.com \
    --cc=axboe@suse.de \
    --cc=colin@realtek.com.tw \
    --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®