Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jun 2005 23:23:59 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>
Subject:   Re: simplify disksort, please review. 
Message-ID:  <20050610231928.J25650@delplex.bde.org>
In-Reply-To: <9131.1118346135@critter.freebsd.dk>
References:  <9131.1118346135@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Jun 2005, Poul-Henning Kamp wrote:

> In message <20050609193008.GB837@darkness.comp.waw.pl>, Pawel Jakub Dawidek writes:
>
>> The one example of how the order can be broken (write(offset, size)):
>>
>> 	write(1024, 512)
>> 	write(0, 2048)
>
> If you issue these two requests just like that, you get no guarantee
> which order they get written in.
>
> It's not just disksort which might surprise you, tagged queuing and
> write caches may mess up your day as well.

Internal (buffer) caches too.  For 2 sparate writes there must normally
be 2 separate buffers, and if the buffer data overlaps then the buffers
may be incoherent, especially if they are malloced (which rarely happens
now, so overlapping buffers are more likely to just clobber each other
when their data is written to in memory than their data is to become
incoherent).  File systems should use a fixed block size with all buffers
beginning on a block boundary so that they never generate overlapping
buffers.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050610231928.J25650>