Project

General

Profile

Bug #6529

Properly handle updates of variably-sized SA entries.

Added by Matthew Ahrens over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-12-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

During the update process in sa_modify_attrs(), the sizes of existing
variably-sized SA entries are obtained from sa_lengths[]. The case where
a variably-sized SA was being replaced neglected to increment the index
into sa_lengths[], so subsequent variable-length SAs would be rewritten
with the wrong length. This patch adds the missing increment operation
so all variably-sized SA entries are stored with their correct lengths.

Another problem was that index into attr_desc[] was increased even when
an attribute was removed. If that attribute was not the last attribute,
then the last attribute was lost.


Related issues

Related to illumos gate - Bug #6434: sa_find_sizes() may compute wrong SA header sizeClosed2015-11-05

Actions

History

#1

Updated by Electric Monk over 3 years ago

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

git commit e7e978b1f75353cb29673af9b35453c20c2827bf

commit  e7e978b1f75353cb29673af9b35453c20c2827bf
Author: Andriy Gapon <avg@icyb.net.ua>
Date:   2015-12-22T05:37:35.000Z

    6529 Properly handle updates of variably-sized SA entries.
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Ned Bass <bass6@llnl.gov>
    Reviewed by: Tim Chase <tim@chase2k.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

#2

Updated by Alek Pinchuk over 3 years ago

  • Related to Bug #6434: sa_find_sizes() may compute wrong SA header size added

Also available in: Atom PDF