Project

General

Profile

Feature #5556

cannot set property for 'pool/dataset': 'sharenfs' is too long

Added by ovi chis almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-01-23
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

in libzfs_dataset.c zfs checks if property string is greater then ZAP_MAXNAMELEN

if (strlen(nvpair_name(elem)) >= ZAP_MAXNAMELEN) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"property name '%s' is too long"),
propname);
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
goto error;
}
ZAP_MAXNAMELEN is defined as PATH_MAX at 1024
  • PATH_MAX is defined by the POSIX standard. All modern systems
  • provide it.

getconf -a | grep PATH_MAX
PATH_MAX: 1024
_POSIX_PATH_MAX: 255
_XOPEN_PATH_MAX: 1024

If the PATH_MAX would be increased to 4096 (same as in Linux) this would be sorted and sharenfs would accept longer strings
Tested in linux with zfs and it allows for 4x the same value

ex:
:~# zfs set sharenfs=nosuid,sec=sys,rw=@10.31.6.101:@10.31.6.115:@10.31.6.64/26:@10.32.5.30:@10.32.5.40:@127.0.0.1:@10.32.25.38:@10.32.25.39:@10.32.25.37:@200.200.200.2:@172.21.7.35:@172.21.7.36:@10.41.4.21:@10.41.4.22:@10.41.4.23:@10.41.4.24:@10.41.4.25:@10.41.4.26:@172.28.242.1:@172.28.242.6,root=@10.31.6.101:@10.31.6.115:@10.31.6.64/26:@10.32.5.30:@10.32.5.40:@127.0.0.1:@10.32.25.38:@10.32.25.37:@10.32.25.39:@200.200.200.2:@193.62.193.235:@10.41.9.0/24:@10.31.3.224/27:@10.31.4.27:@10.31.4.28:@192.168.13.87:@193.62.193.202:@193.62.193.205:@193.62.193.197:@193.62.193.198:@193.62.193.201:@10.42.5.40:@10.42.5.50:@10.50.5.254:@10.50.5.0/24:@193.62.193.224/28:@172.21.7.35:@172.21.7.36:@10.41.4.21:@10.41.4.22:@10.41.4.23:@10.41.4.24:@10.41.4.25:@10.41.4.26:@172.28.242.1:@172.28.242.6,ro=@193.62.193.235:@10.41.9.0/24:@10.31.3.224/27:@10.31.4.27:@10.31.4.28:@192.168.13.87:@193.62.193.202:@193.62.193.205:@10.32.5.30:@10.32.5.40:@193.62.193.197:@193.62.193.198:@193.62.193.201:@10.42.5.40:@10.42.5.50:@10.50.5.254:@10.50.5.0/24:@193.62.193.224/28 ovi/tewst2
cannot set property for 'ovi/tewst2': 'sharenfs' is too long

History

#1

Updated by Marcel Telka almost 5 years ago

  • Project changed from OpenIndiana Distribution to illumos gate
#2

Updated by Marcel Telka almost 5 years ago

  • Category set to zfs - Zettabyte File System

Also available in: Atom PDF