Project

General

Profile

Bug #6842

Fix empty xattr dir causing lockup

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 fix from ZoL is related to #5833. This appears to detect zeroed XATTR directories like those reported in 5833.

Fix empty xattr dir causing lockup

During zfs_rmnode on a xattr dir, if the system crash just after
dmu_free_long_range, we would get empty xattr dir in delete queue. This would
cause blkid=0 be passed into zap_get_leaf_byblk when doing zfs_purgedir during
mount, and would try to do rw_enter on a wrong structure and cause system
lockup.

We fix this by returning ENOENT when blkid is zero in zap_get_leaf_byblk.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

History

#2

Updated by Electric Monk over 3 years ago

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

git commit 02525cd08fb3730fff3a69cb5376443d481f7839

commit  02525cd08fb3730fff3a69cb5376443d481f7839
Author: Chunwei Chen <tuxoko@gmail.com>
Date:   2016-04-05T14:41:38.000Z

    6842 Fix empty xattr dir causing lockup
    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