From owner-freebsd-fs@freebsd.org Mon Aug 3 12:23:02 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764849B1CF1 for ; Mon, 3 Aug 2015 12:23:02 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5C778CB1 for ; Mon, 3 Aug 2015 12:23:02 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: by mailman.ysv.freebsd.org (Postfix) id 59D769B1CEF; Mon, 3 Aug 2015 12:23:02 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5976B9B1CEE for ; Mon, 3 Aug 2015 12:23:02 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DFFCCAF; Mon, 3 Aug 2015 12:23:01 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 0215615344D; Mon, 3 Aug 2015 14:22:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c-WQdtP2j6GN; Mon, 3 Aug 2015 14:22:46 +0200 (CEST) Received: from [192.168.101.176] (vpn.ecoracks.nl [31.223.170.173]) by smtp.digiware.nl (Postfix) with ESMTPA id 526E1153431; Mon, 3 Aug 2015 14:22:46 +0200 (CEST) Subject: Re: Multiple entries in ZFS "sharenfs" property? To: lev@FreeBSD.org References: <130767529.20150801150343@serebryakov.spb.ru> <55BDF5D2.3090306@digiware.nl> <1941826477.20150802210808@serebryakov.spb.ru> <55BE83FA.1060208@digiware.nl> <55BF5932.2090107@FreeBSD.org> Cc: fs@freebsd.org From: Willem Jan Withagen Message-ID: <55BF5D16.9060705@digiware.nl> Date: Mon, 3 Aug 2015 14:22:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55BF5932.2090107@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2015 12:23:02 -0000 On 3-8-2015 14:06, Lev Serebryakov wrote: > On 02.08.2015 23:56, Willem Jan Withagen wrote: > >> Nope, that doesn't work, as far as I can tell. You'd have to revert >> to editting /etc/exports. > Yep, I know. > >> Or hack on 'zfs set sharenfs' to generate multiple lines, in some >> sort of format. Like making ';' a line separator, and then prefix >> each part with the volume we are modifying. > >> Place to give it a go are in: >> cddl/compat/opensolaris/misc/fsshare.c:213 if (share) { >> fprintf(newfd, "%s\t%s\n", mountpoint, translate_opts(shareopts)); >> } And there split the shareopts on the split char (eg. ';') in >> several shareopts and then loop over them. Disadvantage is that the >> max length op the options is: MAXPATHLEN. So you can easily run out >> of space if you have many exports to do. > Here is PR with patch about this, from 2012 :( 'mmmm PR URL is missing, I looked but did not find anything. Just send you some code this morning.... Don't you have commit bits??? So you could checkin a fix if you wanted? Usually if I have a patch, I just ask (and reask) a previous committer of that file if he/she wants to do the honnors. Mostly things go fast from there. --WjW