[lkml]   [2004]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: dd PATCH: add conv=direct
Andy Isaacson <> wrote:
> On modern Linux, apparently the correct way to bypass the buffer cache
> when writing to a block device is to open the block device with
> O_DIRECT. This enables, for example, the user to more easily force a
> reallocation of a single sector of an IDE disk with a media error
> (without overwriting anything but the 1k "sector pair" containing the
> error). dd(1) is convenient for this purpose, but is lacking a method
> to force O_DIRECT. The enclosed patch adds a "conv=direct" flag to
> enable this usage.

This would be rather nice to have. You'll need to ensure that the data
is page-aligned in memory.

While you're there, please add an fsync-before-closing option.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:02    [W:0.085 / U:3.308 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site