Project

General

Profile

Actions

Bug #15913

open

zfs: get_special_prop() should also check for ZFS_TYPE_SNAPSHOT

Added by Toomas Soome 8 days ago. Updated 8 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

With zfs-tests run for #15512, we got panic with debug build:

> ::status
debugging crash dump vmcore.0 (64-bit) from test
operating system: 5.11 release-0-gba179997cef (i86pc)
build version: heads/release-0-gba179997cef

image uuid: 3b586323-2a88-41f6-9386-92670996f297
panic message: assertion failed: ds_type == ZFS_TYPE_VOLUME, file: ../../common/fs/zfs/zcp_get.c, line: 449
dump content: kernel pages only

So we get assert because we are attempting to access ZFS_PROP_VOLSIZE, but dataset type is not ZFS_TYPE_VOLUME. Incidentally, it actually is ZFS_TYPE_SNAPSHOT.

So I started to dig around and found interesting fact - when #7431 was integrated, we got assertion:

ASSERT(ds_type == ZFS_TYPE_VOLUME);

The same assert was also in OpenZFS tree at that time, see https://github.com/openzfs/openzfs/blob/master/usr/src/uts/common/fs/zfs/zcp_get.c#L449 but current OpenZFS is based on ZoL and has expanded the assert expression to include ZFS_TYPE_SNAPSHOT. The change to add ZFS_TYPE_SNAPSHOT is included in the commit implementing #7431, see https://github.com/openzfs/zfs/blob/master/module/zfs/zcp_get.c#L356

Apparently we need to deal with this assert if we ever want to integrate #15512, and I think we do want to integrate it, because it is part of the commit chain leading to other interesting developments.


Related issues

Related to illumos gate - Feature #7431: ZFS Channel ProgramsClosedChris Williamson2016-09-27

Actions
Related to illumos gate - Bug #15512: zfs: Check the dataset type more rigorously when fetching properties.Pending RTIToomas Soome

Actions
Actions #1

Updated by Toomas Soome 8 days ago

Actions #2

Updated by Toomas Soome 8 days ago

  • Related to Bug #15512: zfs: Check the dataset type more rigorously when fetching properties. added
Actions #3

Updated by Electric Monk 8 days ago

  • Gerrit CR set to 3041
Actions

Also available in: Atom PDF