On Fri, Sep 15, 2006 at 09:31:04AM +0100, Ceri Davies wrote: > On Thu, Sep 14, 2006 at 05:08:18PM -0500, Nicolas Williams wrote: > > Yes, but the checksum is stored with the pointer. > > > > So then, for each file/directory there's a dnode, and that dnode has > > several block pointers to data blocks or indirect blocks, and indirect > > blocks have pointers to... and so on. > > Does ZFS have block fragments? If so, then updating an unrelated file > would change the checksum.
No. It has variable sized blocks. A block pointer in ZFS is much more than just a block number. Among other things a block pointer has the checksum of the block it points to. See the on-disk layout document for more info. There is no way that updating one file could change another's checksum. What does matter is that the ZFS checksum of a file, to be O(1), depends on the on-disk layout of the file, and anything that would change that (today nothing would) would change the ZFS checksum of the file. So I think that ZFS checksums, if exposed, are best left as a file change test optimization, not as an actual checksum of the file. Nico -- _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss