Project

General

Profile

Bug #6841

Undirty freed spill blocks

Added by Dan McDonald over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2016-03-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

This is from ZFS-on-Linux https://github.com/zfsonlinux/zfs/commit/4254acb05743dc2175ae76f6e15b0785d4b688fd

It may also relate to #5833 and friends. My user who is continuously being bitten by #5833 recommended checking this and two other ZoL fixes out.

From their report:

If a spill block's dbuf hasn't yet been written when a spill block is
freed, the unwritten version will still be written.  This patch handles
the case in which a spill block's dbuf is freed and undirties it to
prevent it from being written.

The most common case in which this could happen is when xattr=sa is being
used and a long xattr is immediately replaced by a short xattr as in:

    setfattr -n user.test -v very_very_very..._long_value  <file>
    setfattr -n user.test -v short_value  <file>

The first value must be sufficiently long that a spill block is generated
and the second value must be short enough to not require a spill block.
In practice, this would typically happen due to internal xattr operations
as a result of setting acltype=posixacl.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

History

#1

Updated by Electric Monk over 3 years ago

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

git commit 445e67805dd2ca6c3a2363b2ec9e163c62370233

commit  445e67805dd2ca6c3a2363b2ec9e163c62370233
Author: Tim Chase <tim@chase2k.com>
Date:   2016-04-05T14:40:19.000Z

    6841 Undirty freed spill blocks
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF