From owner-freebsd-current@FreeBSD.ORG Sun Jan 4 20:41:16 2004 Return-Path: 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 F1C5B16A4CE; Sun, 4 Jan 2004 20:41:16 -0800 (PST) Received: from mail.XtremeDev.com (xtremedev.com [216.241.38.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3DFA43D31; Sun, 4 Jan 2004 20:41:11 -0800 (PST) (envelope-from bsdc@xtremedev.com) Received: from localhost (localhost [127.0.0.1]) by mail.XtremeDev.com (Postfix) with ESMTP id 40AC611A8C; Sun, 4 Jan 2004 21:41:11 -0700 (MST) Received: from mail.XtremeDev.com ([127.0.0.1]) by localhost (Amber.XtremeDev.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 97666-01; Sun, 4 Jan 2004 21:41:10 -0700 (MST) Received: by mail.XtremeDev.com (Postfix, from userid 1001) id 9FAB711A8B; Sun, 4 Jan 2004 21:41:10 -0700 (MST) Date: Sun, 4 Jan 2004 21:41:10 -0700 From: BSDC To: Tim Robbins Message-ID: <20040105044110.GA53777@Amber.XtremeDev.com> References: <20031226092650.GA60329@Amber.XtremeDev.com> <3FEC0C6F.7010409@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FEC0C6F.7010409@freebsd.org> User-Agent: Mutt/1.5.5.1i X-Virus-Scanned: by amavisd-new at xtremedev.com cc: current@freebsd.org Subject: Re: unionfs on ufs2 gives "operation not supported" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2004 04:41:17 -0000 On Fri, Dec 26, 2003 at 09:24:47PM +1100, Tim Robbins wrote: > BSDC wrote: > > >Getting "operation not supported" messages on a long ls listing with > >unionfs mounts. Trying to setup a jail using unionfs, has anyone any > >ideas why I'm seeing this with ls? > > > ># mount > >/dev/da0s1a on / (ufs, local, noatime, soft-updates, acls) > >devfs on /dev (devfs, local, multilabel) > >/dev/vinum/usr on /usr (ufs, NFS exported, local, noatime, soft-updates, > >acls) > >/dev/vinum/var on /var (ufs, local, noatime, soft-updates, acls) > >:/usr/jail/template on /usr/jail/172.16.1.1 (unionfs, noatime, > >noclusterw, acls) > >^^^^^^^ > > > ># ls -l /usr/jail/172.16.1.1/ > >ls: /usr/jail/172.16.1.1/.cshrc: Operation not supported > >-rw-r--r-- 2 root wheel 797 Dec 24 03:04 .cshrc > >ls: /usr/jail/172.16.1.1/.profile: Operation not supported > >-rw-r--r-- 2 root wheel 251 Dec 24 03:04 .profile > > > > > The problem seems to be that ls is performing a pathconf(2) > _PC_ACL_EXTENDED request on the file to determine whether ACLs are > supported on the file, and this request is getting passed down from > unionfs to one of the UFS layers, which is indicating that ACLs are > supported, but unionfs does not actually support ACLs. > > I've attached an (untested) patch that should make unionfs reject > _PC_ACL_EXTENDED. Access to files should still be controlled by the > ACLs, but you won't be able to query or modify them through unionfs. Let > me know if this patch works & I'll see if I can get proper ACL support > implemented. > > > Tim Sorry I haven't gotten back sooner, just got in from my vacation. I just tried the patch, and it eliminated the "Operation not supported" messages. Forgive my uninformed newbie question, but why the error message when unionfs is just passing _PC_ACL_EXTENDED requests down to the fs below? If the fs below supports it, shouldn't it handle it just fine? Anyways, just thought I'd let you know the patch works. Thanks! > ==== //depot/user/tjr/freebsd-tjr/src/sys/fs/unionfs/union_vnops.c#5 - /p4/src/sys/fs/unionfs/union_vnops.c ==== > @@ -51,6 +51,7 @@ > #include > #include > #include > +#include > #include > > #include > @@ -1780,6 +1781,9 @@ > struct union_node *un = VTOUNION(ap->a_vp); > struct vnode *vp; > > + if (ap->a_name == _PC_ACL_EXTENDED) > + return (EINVAL); > + > vp = union_lock_other(un, td); > KASSERT(vp != NULL, ("union_pathconf: backing vnode missing!")); >