Project

General

Profile

Bug #3048

zfs {user,group}space [-s|-S] is broken

Added by Yuri Pankov about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2012-08-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

zfs {user,group}space [-s|-S] is broken (misses the entries with the same quota).

# zfs userspace pvs
TYPE        NAME    USED  QUOTA
POSIX User  nobody   10G
POSIX User  root      3K  none
POSIX User  yuri     10G
# zfs userspace -s quota pvs
TYPE        NAME    USED  QUOTA
POSIX User  nobody   10G
POSIX User  root      3K  none
# zfs userspace -S quota pvs
TYPE        NAME    USED  QUOTA
POSIX User  root      3K  none
POSIX User  nobody   10G

History

#1

Updated by Daniil Lunev about 8 years ago

The cause of the bug is using of avl tree in zfs(1M) to sort records. There are two ways to fix it:
1) update avl tree to have a possibility to store values with equal keys, that can be activated by passing/setting a avl_tree option.
2) change data storage structure
I don't actually know what way is better.

#2

Updated by Gary Mills about 8 years ago

I suppose you could append a fake property that's never duplicated, and then omit it on the display. That should fix the sort error.

#3

Updated by Yuri Pankov about 8 years ago

It should be (is) already fixed in https://www.xvoid.org/illumos/webrev/zfs-ugspace/.

#4

Updated by Rich Lowe about 8 years ago

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

Resolved in r13803 commit:b5e49d71ff0e

Also available in: Atom PDF