Project

General

Profile

Bug #7740

fix for 6513 only works in hole punching case, not truncation

Added by Prakash Surya almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2017-01-06
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

The problem is that dbuf_findbp will return ENOENT if the block it's
trying to find is beyond the end of the file. If that happens, we assume
there is no birth time, and so we lose that information when we write
out new blkptrs. We should teach dbuf_findbp to look for things that are
beyond the current end, but not beyond the absolute end of the file.

To verify, create a large file, truncate it to a short length, and then
write beyond the end. Check with zdb to make sure that there are no
holes with birth time zero (will appear as gaps).

History

#1

Updated by Electric Monk over 2 years ago

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

git commit 7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553

commit  7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553
Author: Paul Dagnelie <pcd@delphix.com>
Date:   2017-01-19T02:52:15.000Z

    7740 fix for 6513 only works in hole punching case, not truncation
    Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF