Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 May 1999 19:54:49 -0500 (EST)
From:      Alfred Perlstein <bright@rush.net>
To:        fs@freebsd.org
Subject:   how are partial writes handled in FFS?
Message-ID:  <Pine.BSF.3.96.990524194259.9491a-100000@cygnus.rush.net>

next in thread | raw e-mail | index | archive | help

considering a (dumb) process that writes to a file calling write()
several times.  The writes are done to a buffer, but let's say the
buffer is uncached, what exactly happens?

does:
A) it fetch the block off disk the write the data into it?
b) a block is allocated for the data and the partial write
   is done to it maintaining the offset of the write, the buffer 
   is marked so that before it
   is sync'd back to disk (or any reading from a location not
   within the partial write) that a buffer must be allocated, and
   the on disk data must be read into the buffer, then merged into
   the partially written buffer.

If it is B, or if sometimes B is a possiblity, can someone show me
where the code that does this is located?

thanks,
-Alfred 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990524194259.9491a-100000>