From owner-freebsd-fs@FreeBSD.ORG Wed Sep 12 07:27:04 2012 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 5DAC31065673 for ; Wed, 12 Sep 2012 07:27:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AA2128FC08 for ; Wed, 12 Sep 2012 07:27:03 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA05193; Wed, 12 Sep 2012 10:27:00 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TBhLg-0006ER-2Q; Wed, 12 Sep 2012 10:27:00 +0300 Message-ID: <50503941.3030202@FreeBSD.org> Date: Wed, 12 Sep 2012 10:26:57 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120901 Thunderbird/15.0 MIME-Version: 1.0 To: Nicolas Rachinsky References: <20120911161049.GA21635@mid.pc5.i.0x5.de> <504F6D9C.2040000@FreeBSD.org> <20120911191452.GA48029@mid.pc5.i.0x5.de> <504F967B.6030108@FreeBSD.org> <20120911201026.GA12674@mid.pc5.i.0x5.de> In-Reply-To: <20120911201026.GA12674@mid.pc5.i.0x5.de> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: bug? with zfs, symlinks and extended attributes 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: Wed, 12 Sep 2012 07:27:04 -0000 on 11/09/2012 23:10 Nicolas Rachinsky said the following: > Verbatim "xxx...". > > There was other content, but replacing that with "xxx..." did not > change anything. I did not change the length; when I let every > symlink point to "foo", the results changed, and I did not find > broken symlinks. Thank you for a very good testcase. Please try this patch. diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c index 9bb5cbc..a89f3be 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c @@ -578,7 +578,7 @@ sa_find_sizes(sa_os_t *sa, sa_bulk_attr_t *attr_desc, int attr_count, for (i = 0; i != attr_count; i++) { boolean_t is_var_sz; - *total += attr_desc[i].sa_length; + *total += P2ROUNDUP(attr_desc[i].sa_length, 8); if (done) goto next; -- Andriy Gapon