Feature #3236

zio nop-write

Added by Christopher Siden over 2 years ago. Updated over 2 years ago.

Status:Closed Start date:2012-09-28
Priority:Normal Due date:
Assignee:Christopher Siden % Done:

100%

Category:zfs - Zettabyte File System
Target version:-
Difficulty:Medium Tags:needs-triage

Description

When overwriting a block which is check summed with a cryptographically secure hash function we can compare the old and new checksums for the block to determine if they differ (at almost no cost since we were going to do the checksums anyway). If they do not differ we don't actually need to do the write. This:
1) Reduces I/O
2) Reduces space usage, because if the old block is referenced by a snapshot we will need to keep both copies of the block around even though they contain the same data.

This functionality is only enabled if:
1) The old and new blocks are checksummed using the same algorithm.
2) That algorithm is cryptographically secure (e.g. sha256)
3) Compression is enabled on that block.

History

Updated by Christopher Siden over 2 years ago

  • Tracker changed from Bug to Feature

Updated by Christopher Siden over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100
commit 80901aea8e78a2c20751f61f01bebd1d5b5c2ba5
Author: George Wilson <george.wilson@delphix.com>
Date:   Tue Nov 13 14:55:48 2012 -0800

    3236 zio nop-write
    Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Christopher Siden <chris.siden@delphix.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Updated by Martin Matuška over 2 years ago

Why does this functionality require enabled dataset compression? Thanks.

Updated by Christopher Siden over 2 years ago

Martin Matuška wrote:

Why does this functionality require enabled dataset compression? Thanks.

If compression is disabled we don't do any weird space saving tricks in case the user expects space to be used predictably.

Also available in: Atom PDF