coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] dd: support iflag=direct with arbitrary sized files


From: L A Walsh
Subject: Re: [PATCH] dd: support iflag=direct with arbitrary sized files
Date: Mon, 20 Nov 2017 11:51:27 -0800
User-agent: Thunderbird

Pádraig Brady wrote:

+** Improvements
+
+  dd now supports iflag=direct with arbitrary sized files.
+
 ** Build-related
-----

  What was the use-case for this?  It seems it is a problematic
feature:  if someone uses 'direct', they aren't getting the most
recent version of the file and may get random "slicing"
in the file -- meaning that on-disk sectors may not (if looking
at "byte-order") be contiguous.

   If someone has updated, say,  sectors 0-127 of a file by
inserting a new sentence in block 0 -- which shifts the byte
stream for the whole file, but has only written back sectors
0-16, then someone doing a direct read of sectors 0-127 will see
a discontinuity between sectors 16-17.

   If the purpose is to not wipe the memory cache with a 1-time
read, they can use the madvise option to tell the OS that it
shouldn't keep around sectors after they have been read.

   I can't think of any good use case to force reading
stale sectors off of disk as they on-disk image would have
no integrity if someone else is writing to the file and has
only written a partial update.

-l




reply via email to

[Prev in Thread] Current Thread [Next in Thread]