Date: Mon, 29 Nov 2010 14:37:16 +0100 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@FreeBSD.org> To: James R. Van Artsdalen <james-freebsd-fs2@jrv.org> Cc: freebsd-fs <freebsd-fs@FreeBSD.org> Subject: Re: ZFS panic: empty ZFS ACL Message-ID: <BFAEAF6F-2BE5-41F9-8E95-D71BFB05A496@FreeBSD.org> In-Reply-To: <4CF2F923.1050104@jrv.org> References: <4CF26B15.6090009@jrv.org> <7A3D90B8-EEC0-4FC2-9744-C58379709901@FreeBSD.org> <4CF2F923.1050104@jrv.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BFAEAF6F-2BE5-41F9-8E95-D71BFB05A496>