From owner-freebsd-current@FreeBSD.ORG Thu Dec 29 03:41:40 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4043816A41F; Thu, 29 Dec 2005 03:41:40 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from hepitas.ongs.net (hepitas.ongs.net [202.216.232.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id C943B43D53; Thu, 29 Dec 2005 03:41:39 +0000 (GMT) (envelope-from ozawa@ongs.co.jp) Received: from [IPv6???1] (localhost.ongs.net [127.0.0.1]) by hepitas.ongs.net (Postfix) with ESMTP id EA2333F; Thu, 29 Dec 2005 12:21:14 +0900 (JST) Message-ID: <43B35AF4.5040408@ongs.co.jp> Date: Thu, 29 Dec 2005 12:41:40 +0900 From: Masanori OZAWA Organization: ONGS Inc. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051219) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: daichi@freebsd.org Subject: [unionfs][patch] improvements of the unionfs - Problem Report, kern/91010 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ozawa@ongs.co.jp List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 03:41:40 -0000 I gave a send-pr around the improvement of the unionfs. Please look at the follow url in specific for interested poeple whom it may committer or official people who can merge my patches. http://www.freebsd.org/cgi/query-pr.cgi?pr=91010 The established unionfs implementaion is weak around thier functions. Some systems that use unionfs like FreeSBIE need more rich function. My improvements give the more rich features to get it on. I want to give a suggestion to the maintainer of unionfs to merge my patch :) New features of my improvements are follow: ---- mount_unionfs: - added "[-c ]" Set copy strategy for copying from lower layer to upper layer around files and directories. The strategies are "old", "fullcopy" and "useful" setting by root only. old: the same strategy as established unionfs. (default) fullcopy: upper layer gets full copy of lower layer status. useful: user can get access controlling by -m, -M, -u and -g. only owner's access permission get chagne when target owner is the same as original owner. - added "[-m permission]" Set access permission for file with "useful" strategy only. mount target directory gives default permission. permission given by "-M" gives default permission when "-m" is not given. - added "[-M permission]" Set access permission for directory with "useful" strategy only. mount target directory gives default permission. permission given by "-m" gives default permission when "-M" is not given. - added "[-u owner]" Set owner with "useful" strategy only. mount target directory gives default owner. - added "[-g group]" Set group with "useful" strategy only. mount target directory gives default group. - deleted "[-r]" "-r" option is not needed because mount_nullfs has instead ---- I got some load test, and looks like it works fine. The simple test is to use some commads like cp, mv, mkdir, chmod and ls. The heavy test is like as follow: # mount_unionfs -c useful /usr/ufs1 /usr/obj # mount_unionfs /usr/ufs2 /usr/src # cd /usr/src # make buildkernel # make clean # make -j2 buildworld # make clean # umount /usr/obj # cd # umount /usr/src Wojciech A. Koszek has pointed out, my improvements of unionfs can not get the same way to use with nullfs. The problem depends on the locking mechanism of the FreeBSD VFS. Unionfs, of course, should control the two fs locks both of the upper layer and the lower layer. It use ``struct vnode *vp; vp->v_vnlock = foobar;'' as lock mechanism. And nullfs use the same one. That is a problem. I think that nullfs should get change of the implementaion from the complexity of the implementation rather than to get change of unionf's implementation. However, as a first step of the unionfs-improvements, to merge my patches is very meaningful I think. Finally, so sorry my English is not enough to get communication with you. My boss, daichi@freebsd.org gives us the help of communication (as a matter of fact he wrote most of this mail ;) . Please gives daichi@freebsd.org as CC: for my mail. Thanks. :) -- ONGS Inc. Masanori OZAWA (ozawa@ongs.co.jp) WWW: http://www.ongs.co.jp/