[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6601abe90906181253u657e67a7u67025774cc53bc4f@mail.gmail.com>
Date: Thu, 18 Jun 2009 12:53:17 -0700
From: Curt Wohlgemuth <curtw@...gle.com>
To: ext4 development <linux-ext4@...r.kernel.org>
Subject: O_DIRECT and delayed allocation question
This might be a question with an obvious answer, but I'd like
verification one way or the other.
Does the use of O_DIRECT essentially disable delayed allocation for a
given file?
My simple tests show a larger degree of block fragmentation for files
written using O_DIRECT than without, and on its face, this makes sense
to me. This fragmentation can be removed by using fallocate() on a
file before extending it with writes.
(Strictly speaking, I guess the use of O_DIRECT wouldn't "disable"
delayed allocation, since the blocks are allocated at the "normal"
time -- when going to disk. But effectively there would be a lot less
block grouping available to build large extents if each write goes to
disk immediately, instead of going through the page cache.)
Thanks,
Curt
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists