> From: "Andi Kleen" <[EMAIL PROTECTED]>
> > Does this mean that unwriten extents are supported now in pagebuf?
> Otherwise
> > this ioctl would need to prezero the disks blocks to prevent old data
> > from being leaked, right?
> 
> I don't know specifically about the current Linux pagebuf code, but in
> general this is not necessarily the case.  If the interfaces are set up so
> that one can know when the whole block is about to be overwritten with new
> data, no zeroing is necessary for that block.

It is in the read case though - XFS comes from an enviroment exactly like
that you describe below.

Steve

> 
> FWIW, I've worked on a system very recently that recognizes three states for
> an extent:
> 
> (1) Fully allocated and filled with valid data (which may be zeros).  Reads
> come from disk, partial writes require a read of current contents first
> (this is a heterogeneous system in which the FS blocksize might not match a
> particular node's page/IO size, so partial reads and writes occur even
> through the cache).
> 
> (2) Allocated but not written/zeroed yet.  Reads return zeros without disk
> access[a], partial writes must zero any "remainder".
> 
> (3) Not even allocated (sparse allocation).  Reads return zeros, writes are
> disallowed in this state.
> 
> The part marked [a] is critical in the current context.  If you want to do
> this sort of thing safely, you have to recognize that the allocated space
> does not actually contain valid data, and can be written but not read.  WOM,
> anyone?  ;-)  Otherwise you're forced to assume the worst, and do zeroing
> which may or may not actually be necessary.
> 
> 


-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to