Re: FILE_FLAG_WRITE_THROUGH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/4/06, Rebelde <jrsilva2k@xxxxxxxxx> 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
-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux