Re: Howto switch off ext4's delayed allocation?

From: Clemens Eisserer
Date: Wed Sep 16 2009 - 14:41:25 EST


Hi Theodore,

Thanks a lot for your work on linux filesystems through the years.

> Sounds like eclipse is broken; most Unix editors (emacs, vim, etc.) do
> correctly use fsync() when writing precious files, such people's
> source files. ÂIn addition, it must be writing the data through a
> decidedly non-standard way. ÂIs it out-and-out deleting the file
> before writing the new version of the file, or something insane like
> that? ÂExt4's hueristics are designed so that for the most common ways
> that applications update files, the data gets forced to disk. ÂIt
> sounds like Eclipse is doing something decidedly non-standard.

I've seen zero-length files after crashes (mostly caused by the intel
2D driver, just updated from 2.8.0 to 2.8.99, hope its better now) by
files edited with kwrite, eclipse and I've even had empty
.bash_history files.
I understand these are application's faults, but for now I had more
troubles with this feature than the additional performance is worth
for me.
My machine is a laptop, where is quite common to suddenly loose power
(my battery is dead).

> If you can run a strace on eclipse while and then arrange to edit an
> existing file and save it, it would be interesting to see what the
> heck it is doing.
I'll have a look.


>> Isn't there a way to switch off the more "dangerous" optimizations in ext4?
>
> The mount option nodelalloc will turn off delayed allocation. ÂThis is
> documented in Documentation/filesystems/ext4.txt.
Thanks :)

- Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/