Project

General

Profile

Bug #7071

lzc_snapshot does not fill in errlist on ENOENT

Added by Igor Kozhukhov over 3 years ago. Updated about 3 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

upstream
DLPX-40482 lzc_snapshot does not fill in errlist on ENOENT


Related issues

Related to illumos gate - Bug #5789: lzc_snapshot() produces inconsistent errlist for different errorsNew2015-04-03

Actions

History

#1

Updated by Andriy Gapon over 3 years ago

  • Related to Bug #5789: lzc_snapshot() produces inconsistent errlist for different errors added
#2

Updated by Matthew Ahrens over 3 years ago

lzc_snapshot() takes a list of snapshot to create. If the list contains both datasets that exist and datasets that do not exist, the expected behavior is that the returned error map will contain an errno for each dataset that is missing (or at least the first one). Instead the error map is empty, so we have no indication as to what datasets were problematic.

The problem is that zfs_secpolicy_snapshot() is causing the ioctl to bail early, when it can't find the dataset in order to determine if it is assigned to a zone.

Fix is to not call secpolicy funcs if the process is root in the global zone. This will also improve performance (marginally). This is a bit of a hack, but it is easy and correct.

#3

Updated by Electric Monk about 3 years ago

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

git commit 25f7d993adbfb3452ac4625b3791670746d35ae3

commit  25f7d993adbfb3452ac4625b3791670746d35ae3
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2016-07-14T19:08:46.000Z

    7071 lzc_snapshot does not fill in errlist on ENOENT
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF