Project

General

Profile

Bug #9438

Holes can lose birth time info if a block has a mix of birth times

Added by Brad Lewis over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-04-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

As reported by https://github.com/zfsonlinux/zfs/issues/4996, there is yet another hole birth issue. In this one, if a block is entirely holes, but the birth times are not all the same, we lose that information by creating one hole with the current txg as its birth time.

The ZoL PR's fix approach is incorrect. Ultimately, the problem here is that when you truncate and write a file in the same transaction group, the dbuf for the indirect block will be zeroed out to deal with the truncation, and then written for the write. During this process, we will lose hole birth time information for any holes in the range. In the case where a dnode is being freed, we need to determine whether the block should be converted to a higher-level hole in the zio pipeline, and if so do it when the dnode is being synced out.

History

#1

Updated by Electric Monk over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 738e2a3ce3b2579222d6855e7fe75b5bcfcddf8d

commit  738e2a3ce3b2579222d6855e7fe75b5bcfcddf8d
Author: Paul Dagnelie <pcd@delphix.com>
Date:   2018-06-19T19:28:21.000Z

    9438 Holes can lose birth time info if a block has a mix of birth times
    Reviewed by: Matt Ahrens <matt@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF