Bug 153258 - [patch][zfs] creating ZVOLs requires `refreservation' ability
Summary: [patch][zfs] creating ZVOLs requires `refreservation' ability
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-12-17 21:40 UTC by swell.k
Modified: 2022-10-17 12:38 UTC (History)
0 users

See Also:


Attachments
a.diff (1.34 KB, patch)
2010-12-17 21:40 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2010-12-17 21:40:08 UTC
Creating zfs volumes for ordinary users requires ability to modify
`refreservation' property.

Is this reproducable on opensolaris?

How-To-Repeat: root# zpool create blah gptid/A-B-C-E
root# zfs allow luser create,mount blah
root# sysctl vfs.usermount=1

luser$ zfs create -V10m blah/test
cannot create 'blah/test': permission denied

luser$ truss zfs create -V10m blah/test 2>&1 | fgrep ioctl | tail -1
ioctl(3,0xcc285a18 { IORW 0x5a('Z'), 24, 3112 },0xffffd110) ERR#1 'Operation not permitted'

luser$ grep "'Z'.*24" /usr/src/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
#define ZFS_IOC_CREATE                  _IOWR('Z', 24, struct zfs_cmd)

root# zfs allow luser refreservation
luser$ zfs create -V10m blah/test
luser$ find /dev/zvol -ls
    86        1 dr-xr-xr-x    3 root             wheel                 512 Dec 17 21:24 /dev/zvol
    87        1 dr-xr-xr-x    2 root             wheel                 512 Dec 17 21:24 /dev/zvol/blah
    85        0 crw-r-----    1 root             operator           0,  85 Dec 17 21:23 /dev/zvol/blah/test
Comment 1 swell.k 2010-12-17 21:43:16 UTC
Anonymous <swell.k@gmail.com> writes:

> Creating zfs volumes for ordinary users requires ability to modify
> `refreservation' property.

It doesn't affect `sparse' volumes, those created with `-s' option.
So, `refreservation' ability is not required for the following to work

  luser$ zfs create -sV10m blah/test
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:32 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:38:21 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>