linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve Graegert" <graegerts@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: FILE_FLAG_WRITE_THROUGH
Date: Tue, 4 Apr 2006 21:13:02 +0200	[thread overview]
Message-ID: <6a00c8d50604041213w5fda863btd5d675cbaa4d2ca5@mail.gmail.com> (raw)
In-Reply-To: <4432B296.8050408@gmail.com>

On 4/4/06, Rebelde <jrsilva2k@gmail.com> wrote:
> Hi
>
> On Windows XP I can write directly to disk whitout cache write using the
> CreateFile function with FILE_FLAG_WRITE_THROUGH. Could someone tell me
> how to make this on Linux?

What you're looking for is a filesystem-specific feature and can be
utilized using the O_DIRECT flag in the open(2) system call.  If
you're filesystem does not support raw i/o EINVAL is returned.  Since
I am using XFS I can't tell you about other fs, but I suppose Ext2,
Ext3 and JFS do support it. (Corrections welcome.)

	\Steve

  reply	other threads:[~2006-04-04 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 17:53 FILE_FLAG_WRITE_THROUGH Rebelde
2006-04-04 19:13 ` Steve Graegert [this message]
2006-04-05  4:02 ` FILE_FLAG_WRITE_THROUGH Glynn Clements
2006-04-05  6:50   ` FILE_FLAG_WRITE_THROUGH Progga
2006-04-05  7:36     ` FILE_FLAG_WRITE_THROUGH Steve Graegert
2006-04-05 18:47       ` FILE_FLAG_WRITE_THROUGH Glynn Clements
2006-04-06  7:02         ` FILE_FLAG_WRITE_THROUGH Steve Graegert
2006-04-05  7:31   ` FILE_FLAG_WRITE_THROUGH Steve Graegert
2006-04-05 13:43     ` FILE_FLAG_WRITE_THROUGH Al Boldi

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=6a00c8d50604041213w5fda863btd5d675cbaa4d2ca5@mail.gmail.com \
    --to=graegerts@gmail.com \
    --cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).