From d134105bba6ee635dfec640659a9f81dac200330 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 10 Jul 2010 12:50:24 -0700 Subject: [PATCH] Linux 2.6.34 compat: add_range() symbol collision The prototype for an add_range() function was added to the kernel header include/linux/range.h which conflicts with the static add_range() defined in zfs_fm.c. To resolve the conflict all range functions in zfs_fm.c have been prefixed with zei which is short for the zfs_ecksum_info struct since all of these functions operate on that base structure. --- module/zfs/zfs_fm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c index 5138f49e52..409f4f99fb 100644 --- a/module/zfs/zfs_fm.c +++ b/module/zfs/zfs_fm.c @@ -420,7 +420,7 @@ update_histogram(uint64_t value_arg, uint16_t *hist, uint32_t *count) * to the new smallest gap, to prepare for our next invocation. */ static void -shrink_ranges(zfs_ecksum_info_t *eip) +zei_shrink_ranges(zfs_ecksum_info_t *eip) { uint32_t mingap = UINT32_MAX; uint32_t new_allowed_gap = eip->zei_mingap + 1; @@ -465,13 +465,13 @@ shrink_ranges(zfs_ecksum_info_t *eip) } static void -add_range(zfs_ecksum_info_t *eip, int start, int end) +zei_add_range(zfs_ecksum_info_t *eip, int start, int end) { struct zei_ranges *r = eip->zei_ranges; size_t count = eip->zei_range_count; if (count >= MAX_RANGES) { - shrink_ranges(eip); + zei_shrink_ranges(eip); count = eip->zei_range_count; } if (count == 0) { @@ -493,7 +493,7 @@ add_range(zfs_ecksum_info_t *eip, int start, int end) } static size_t -range_total_size(zfs_ecksum_info_t *eip) +zei_range_total_size(zfs_ecksum_info_t *eip) { struct zei_ranges *r = eip->zei_ranges; size_t count = eip->zei_range_count; @@ -570,7 +570,7 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info, if (start == -1) continue; - add_range(eip, start, idx); + zei_add_range(eip, start, idx); start = -1; } else { if (start != -1) @@ -580,10 +580,10 @@ annotate_ecksum(nvlist_t *ereport, zio_bad_cksum_t *info, } } if (start != -1) - add_range(eip, start, idx); + zei_add_range(eip, start, idx); /* See if it will fit in our inline buffers */ - inline_size = range_total_size(eip); + inline_size = zei_range_total_size(eip); if (inline_size > ZFM_MAX_INLINE) no_inline = 1;