Skip to content

Commit b6c6b03

Browse files
committed
Remove an extra check for gang blocks in SNPRINTF_BLKPTR
This check, which compares the asizes of two different DVAs within the same BP, was added by illumos-gate commit b24ab67[^1], and I can't understand why. It doesn't appear to do anything useful, so remove it. [^1]: illumos/illumos-gate@b24ab67 Sponsored by: ConnectWise Signed-off-by: Alan Somers<[email protected]>
1 parent 5ccd822 commit b6c6b03

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

include/sys/spa.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,6 @@ typedef struct blkptr {
678678
(u_longlong_t)BP_GET_IV2(bp), \
679679
ws); \
680680
} \
681-
if (BP_IS_GANG(bp) && \
682-
DVA_GET_ASIZE(&bp->blk_dva[2]) <= \
683-
DVA_GET_ASIZE(&bp->blk_dva[1]) / 2) \
684-
copies--; \
685681
len += func(buf + len, size - len, \
686682
"[L%llu %s] %s %s %s %s %s %s %s%c" \
687683
"size=%llxL/%llxP birth=%lluL/%lluP fill=%llu%c" \
@@ -694,8 +690,7 @@ typedef struct blkptr {
694690
BP_GET_BYTEORDER(bp) == 0 ? "BE" : "LE", \
695691
BP_IS_GANG(bp) ? "gang" : "contiguous", \
696692
BP_GET_DEDUP(bp) ? "dedup" : "unique", \
697-
copies >= 0 && copies <= 3 ? copyname[copies] : \
698-
"invalid", \
693+
copyname[copies], \
699694
ws, \
700695
(u_longlong_t)BP_GET_LSIZE(bp), \
701696
(u_longlong_t)BP_GET_PSIZE(bp), \

0 commit comments

Comments
 (0)