So then of what use is the parity? 

And how is the metadata used to reconstruct bad data? I understand obviously 
what the metadata contains but I don't get how ZFS traverses through a file 
system and USES the metadata to construct bad blocks.

I understand that you write everything to separate blocks. My question was this:

If you have initially two stripes over two disks like this:

Disk 1: XXXX (Stripe Unit 1)
Disk 2: XXXX (Stripe Unit 2)

You then want to modify something in the first stripe unit with modifications 
which are smaller so now Disk 1 and Disk 2 stripes look like this:

Disk 1: XXYY (the y's indicate modified bits or bytes or whatever)
Disk 2: XXXX

So now, with a full-stripe write, you then make new blocks for both stripes and 
just copy the data over to the new blocks. Now, tell me if I am write with what 
happens on a full-stripe write:

You read in Disk 1 and Disk 2 stripes in the file system cache. You then apply 
the modifications to the Disk 1 stripe within the cache. After this, you 
compute the parity within the cache and finally you write out both Disk 1 
Stripe and Disk 2 stripe to new blocks. Since the modifications to the disk 1 
stripe (the Ys) were smaller than the total stripe size, the new sector which 
will be written to will be of a smaller stripe size than the originals.

Is this correct?
-- 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to