Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 10:26:57 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Nicolas Rachinsky <fbsd-mas-0@ml.turing-complete.org>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: bug? with zfs, symlinks and extended attributes
Message-ID:  <50503941.3030202@FreeBSD.org>
In-Reply-To: <20120911201026.GA12674@mid.pc5.i.0x5.de>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50503941.3030202>