lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 7 Jan 2008 13:49:52 +0100
From:	Jörn Engel <joern@...fs.org>
To:	Frantisek Rysanek <Frantisek.Rysanek@...t.cz>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [noob q. on block layer] block IO read-ahead during sequential *write*?

On Mon, 7 January 2008 13:25:09 +0100, Frantisek Rysanek wrote:
> 
> let me start with a simple example. The following commands:
> 
>  cp /dev/zero /dev/hda
>  dd if=/dev/zero of=/dev/hda [bs=512]
> 
> both have one common side-effect: apart from the disk being properly 
> overwritten with zeroes, the kernel seems to keep reading sectors 
> ahead of the current seek position of the sequential write.

Block devices are cached in the page cache.  If you write less than a
full page, any remainder has to be read from the device.

If you retry the dd with bs=4096 (or whatever your architecture's page
size happens to be), does this still occur?

Jörn

-- 
Chance favors only the prepared mind.
-- Louis Pasteur
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ