Re: zpool v28 and -current

From: Rich <rincebrain_at_gmail.com>
Date: Sun, 6 Feb 2011 20:38:19 -0500
On Sun, Feb 6, 2011 at 8:05 PM, Rich <rincebrain_at_gmail.com> wrote:

> On Tue, Feb 1, 2011 at 8:12 AM, Anonymous <swell.k_at_gmail.com> wrote:
>
>>  $ fetch http://people.freebsd.org/~pjd/patches/zfs_20101212.patch.bz2
>>  $ fetch -o anon_fixup.diff '
>> http://docs.freebsd.org/cgi/getmsg.cgi?fetch=55203+0+current/freebsd-current+raw
>> '
>>  $ bzip2 -d zfs_20101212.patch.bz2
>>  $ patch -si anon_fixup.diff
>>  $ cd /usr/src
>>  $ patch -Efsp0 -i $OLDPWD/zfs_20101212.patch
>>  [ any rejects here are probably because of $FreeBSD: ...$ vs. $FreeBSD$ ]
>>  $ make -j5 world kernel DESTDIR=/
>>
>> Note, some bugs are fixed in pjd_zfs branch.
>>
>>  http://p4db.freebsd.org/changeList.cgi?FSPC=//depot/user/pjd/zfs/...
>>
>> My guess, pjd's patch was generated before 186914. So, in order to grab
>> all latest p4 commits in the branch try
>>
>>  [...]
>>  $ for ci in 186914 186921 186938 186940 186942 186944 186945 \
>>      187192 187461 187462 187836 187837 187875 187883 188248; do
>>        p4diff $ci >>zfs_v28_sync.diff; done
>>  $ cd /usr/src
>>  $ patch -Efsp0 -i $OLDPWD/zfs_20101212.patch
>>  $ patch -Efsp6 -i $OLDPWD/zfs_v28_sync.diff
>>  [...]
>
>
> Attempted this procedure today, make fails with:
>
> cc -O2 -pipe -DFREEBSD_NAMECACHE -DBUILDING_ZFS -DDEBUG=1
> -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc
>  -I/usr/local/ncvs/src/sys/modules/zfs/../../cddl/compat/opensolaris
> -I/usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs
> -I/usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/zmod
> -I/usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common
> -I/usr/local/ncvs/src/sys/modules/zfs/../..
> -I/usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/common/zfs
> -I/usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/common
> -I/usr/local/ncvs/src/sys/modules/zfs/../../../include
> -DHAVE_KERNEL_OPTION_HEADERS -include
> /usr/obj/usr/local/ncvs/src/sys/DTRACE/opt_global.h -I. -I_at_ -I_at_/contrib/altq
> -finline-limit=8000 --param inline-unit-growth=100 --param
> large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer
> -I/usr/obj/usr/local/ncvs/src/sys/DTRACE  -mcmodel=kernel -mno-red-zone
>  -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
> -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions
> -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-undef
> -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundant-decls
> -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -Wno-switch
> -Wno-pointer-arith -c
> /usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
> /usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:188:
> error: 'zfs_mdcomp_disable' undeclared here (not in a function)
> cc1: warnings being treated as errors
> /usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:
> In function 'arc_write':
> /usr/local/ncvs/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:3580:
> warning: passing argument 7 of 'zio_write' discards qualifiers from pointer
> target type
>

First error is just a variable undefined that was defined in the original
file pre-patching in the function; redefined it as defined in the original.

Second error is because arc_write takes a const of that property now, and
zio_write still doesn't, resulting in the warning as shown. Dunno what the
correct way to fix this is, as it's unclear to me why the change was done.

This looks more broken than I might hope to fix trivially, since working
around the second one above results in more brokenness in dbuf.c. I suppose
I'll wait for an updated patchset to try this out again.

- Rich
Received on Mon Feb 07 2011 - 00:38:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:11 UTC