From owner-freebsd-fs@FreeBSD.ORG Mon Nov 29 13:37:22 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7342106566B for ; Mon, 29 Nov 2010 13:37:22 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2BEEB8FC12 for ; Mon, 29 Nov 2010 13:37:21 +0000 (UTC) Received: by bwz2 with SMTP id 2so4126137bwz.13 for ; Mon, 29 Nov 2010 05:37:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=e6ekA6MUduTYS+udSplbhVXRgb3Nl/TbA1Xak+LmX0s=; b=AHhbSyRngX9nq/XdoX1QDDM3/3igxm+rpQB7VQBNmZVV5pLpP0XKM3yt4+Ee6SsG4U WvUk3MMSfvKHYnXFIZgL/XwYg1l+mW8DzeINwBn0KPznSD2CQO06WuxkM9P9q4HxMgQC m1ltjbhhT7pXcyCP8Vz6mDNk5C9ryJKMs2+5k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=ZTbtzroH6Q/kSZBqxXRN/qivCJiwlBKX5xjk8xGHRg7gSF6PoB+4ila+diT8aR0LM4 x2U/WMeJgxRj+MQkXqh/RIPr6SOYYnlYXntYGBHlLFvOLx22zvi5k4iF1NdAmzQi8htG V/3/kycE6a6FbfLLbh8xXIgou/1fphzGhrSJU= Received: by 10.204.118.207 with SMTP id w15mr4840211bkq.197.1291037840929; Mon, 29 Nov 2010 05:37:20 -0800 (PST) Received: from enapierala.whl (58.wheelsystems.com [83.12.187.58]) by mx.google.com with ESMTPS id v1sm2034233bkt.17.2010.11.29.05.37.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Nov 2010 05:37:19 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <4CF2F923.1050104@jrv.org> Date: Mon, 29 Nov 2010 14:37:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4CF26B15.6090009@jrv.org> <7A3D90B8-EEC0-4FC2-9744-C58379709901@FreeBSD.org> <4CF2F923.1050104@jrv.org> To: James R. Van Artsdalen X-Mailer: Apple Mail (2.1082) Cc: freebsd-fs Subject: Re: ZFS panic: empty ZFS ACL X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 13:37:22 -0000 Wiadomo=B6=E6 napisana przez James R. Van Artsdalen w dniu 2010-11-29, o = godz. 01:51: > Edward Tomasz Napiera=B3a wrote: >> Could you try the patch below? >>=20 >> Index: sys/cddl/compat/opensolaris/kern/opensolaris_acl.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- sys/cddl/compat/opensolaris/kern/opensolaris_acl.c (revision = 215553) >> +++ sys/cddl/compat/opensolaris/kern/opensolaris_acl.c (working = copy) >> @@ -105,7 +105,10 @@ >> struct acl_entry *entry; >> const ace_t *ace; >>=20 >> - KASSERT(nentries >=3D 1, ("empty ZFS ACL")); >> + if (nentries < 1) { >> + printf("acl_from_aces: empty ZFS ACL; returning = EINVAL.\n"); >> + return (EINVAL); >> + } >>=20 >> if (nentries > ACL_MAX_ENTRIES) { >> /* >>=20 >> -- >> If you cut off my head, what would I say? Me and my head, or me and = my body? >>=20 >=20 >=20 > The patch prevents the panic but EINVAL propagates back up to the > application in an undesirable way: >=20 > kraken:/root# ls -ld /STUFF/fearhome/Backups > ls: /STUFF/fearhome/Backups: Invalid argument > drwxr-xr-x 9 james james 10 Oct 17 2007 /STUFF/fearhome/Backups > kraken:/root# That's intentional. Empty ACL is not a valid condition - it's kind of = like filesystem corruption; no idea why OSX port allowed for that. To get rid of the error, try using chmod(1). Please report whether it = works or not. -- If you cut off my head, what would I say? Me and my head, or me and my = body?