bug? with zfs, symlinks and extended attributes
Andriy Gapon
avg at FreeBSD.org
Wed Sep 12 07:27:04 UTC 2012
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
More information about the freebsd-fs
mailing list