lkml.org 
[lkml]   [2007]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How to flush the disk write cache from userspace
Date
On Tuesday 16 January 2007 00:38, you wrote:
> As always with these things, the devil is in the details. It requires
> the device to support a ->prepare_flush() queue hook, and not all
> devices do that. It will work for IDE/SATA/SCSI, though. In some devices
> you don't want/need to do a real disk flush, it depends on the write
> cache settings, battery backing, etc.

Is there any chance that someone could implement this (I don't have the
skills, unfortunately)? Maybe add a new ioctl() to block devices, so that it
doesn't break any existing code?

I believe it's a very useful (and relatively simple) feature that increases
data integrity and reliability for applications that need this functionality.

I think it must be considered that most people have disk write caches enabled
and are using IDE, SATA or SCSI disks.

I also think there's no point in disabling disks' write caches, since it slows
writes and decreases disks' lifetime, and because there's a better solution.

Personally, I'm not really interested in specific filesystem behaviour, since
my application uses block devices directly (it's a filesystem itself).
Although I think all filesystems should guarantee data integrity in the face
of fsync() or metadata modifications, even if it costs a little performance.

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

\
 
 \ /
  Last update: 2007-01-18 03:47    [W:0.034 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site