Skip to contentSkip to conversation

update ZFS for pygrub from illumos

PATCH New Igor Kozhkuhov 3 participants 14 messages Oct 31, 2013 – Nov 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 update ZFS for pygrub from illumos

Provide update only for ZFS from illumos upstream for pygrub

#1 lore raw

PATCH 1/1 Update ZFS sources from illumos.org:

https://github.com/illumos/illumos-gate/tree/master/usr/src/grub/grub-0.97/stage2
Additional CFLAGS rules have been added after 'CFLAGS += -Werror -D_GNU_SOURCE' in Rules.mk

tools/libfsimage/zfs/Makefile +6 -1
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/Makefile
@@ -25,7 +25,7 @@
 XEN_ROOT = $(CURDIR)/../../..
 
 CFLAGS += -DFSYS_ZFS -DFSIMAGE -I$(XEN_ROOT)/tools/libfsimage/zfs
-LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c
+LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c zfs_lz4.c
 
 FS = zfs
 
@@ -36,3 +36,8 @@ all: fs-all
 install: fs-install
 
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
+
+# need for build illumos ZFS
+CFLAGS += -Wno-parentheses
+CFLAGS += -Wno-unused
+# end
tools/libfsimage/zfs/fsi_zfs.h +3 -0
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/fsi_zfs.h
@@ -36,6 +36,8 @@
 
 /* Boot signature related defines for the findroot command */
 #define	BOOTSIGN_DIR	"/boot/grub/bootsign"
+#define	BOOTSIGN_ARGLEN	(MAXNAMELEN + 10)	/* (<sign>,0,d) */
+#define	BOOTSIGN_LEN	(sizeof (BOOTSIGN_DIR) + 1 + BOOTSIGN_ARGLEN)
 #define	BOOTSIGN_BACKUP	"/etc/bootsign"
 
 /* Maybe redirect memory requests through grub_scratch_mem. */
@@ -60,6 +62,7 @@
 #define grub_strstr strstr
 #define grub_strlen strlen
 #define grub_memmove memmove
+#define grub_isspace isspace
 
 extern char current_bootpath[MAXPATHLEN];
 extern char current_rootpool[MAXNAMELEN];
tools/libfsimage/zfs/fsys_zfs.c +448 -194

1,032 lines not on this page · raw message

tools/libfsimage/zfs/fsys_zfs.h +38 -22

90 lines not on this page · raw message

tools/libfsimage/zfs/zfs-include/dmu.h +65 -5

117 lines not on this page · raw message

tools/libfsimage/zfs/zfs-include/dsl_dataset.h +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/dsl_dataset.h
@@ -24,8 +24,6 @@
 #ifndef	_SYS_DSL_DATASET_H
 #define	_SYS_DSL_DATASET_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 typedef struct dsl_dataset_phys {
 	uint64_t ds_dir_obj;
 	uint64_t ds_prev_snap_obj;
tools/libfsimage/zfs/zfs-include/dsl_dir.h +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/dsl_dir.h
@@ -24,8 +24,6 @@
 #ifndef	_SYS_DSL_DIR_H
 #define	_SYS_DSL_DIR_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 typedef struct dsl_dir_phys {
 	uint64_t dd_creation_time; /* not actually used */
 	uint64_t dd_head_dataset_obj;
tools/libfsimage/zfs/zfs-include/spa.h +6 -1
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/spa.h
@@ -16,11 +16,16 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 /*
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
 #ifndef _SYS_SPA_H
 #define	_SYS_SPA_H
 
@@ -65,7 +70,7 @@
 /*
  * Size of block to hold the configuration data (a packed nvlist)
  */
-#define	SPA_CONFIG_BLOCKSIZE	(1 << 14)
+#define	SPA_CONFIG_BLOCKSIZE	(1ULL << 14)
 
 /*
  * The DVA size encodings for LSIZE and PSIZE support blocks up to 32MB.
tools/libfsimage/zfs/zfs-include/uberblock_impl.h +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/uberblock_impl.h
@@ -24,8 +24,6 @@
 #ifndef _SYS_UBERBLOCK_IMPL_H
 #define	_SYS_UBERBLOCK_IMPL_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * The uberblock version is incremented whenever an incompatible on-disk
  * format change is made to the SPA, DMU, or ZAP.
tools/libfsimage/zfs/zfs-include/vdev_impl.h +18 -0
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/vdev_impl.h
@@ -24,12 +24,30 @@
 #ifndef _SYS_VDEV_IMPL_H
 #define	_SYS_VDEV_IMPL_H
 
+/* helper macros */
+#undef	offsetof
+#if defined(__GNUC__)
+#define	offsetof(s, m)	__builtin_offsetof(s, m)
+#else
+#define	offsetof(s, m)	((size_t)(&(((s *)0)->m)))
+#endif
+#define	MAX(x, y)		((x) > (y) ? (x) : (y))
+
 #define	VDEV_PAD_SIZE 		(8 << 10)
 /* 2 padding areas (vl_pad1 and vl_pad2) to skip */
 #define	VDEV_SKIP_SIZE		VDEV_PAD_SIZE * 2
 #define	VDEV_PHYS_SIZE		(112 << 10)
 #define	VDEV_UBERBLOCK_RING	(128 << 10)
 
+#define	VDEV_UBERBLOCK_SHIFT(sh)		\
+	MAX((sh), UBERBLOCK_SHIFT)
+#define	VDEV_UBERBLOCK_COUNT(sh)		\
+	(VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT(sh))
+#define	VDEV_UBERBLOCK_OFFSET(sh, n)	\
+	offsetof(vdev_label_t, vl_uberblock[(n) << VDEV_UBERBLOCK_SHIFT(sh)])
+#define	VDEV_UBERBLOCK_SIZE(sh)			\
+	(1ULL << VDEV_UBERBLOCK_SHIFT(sh))
+
 typedef struct vdev_phys {
 	char		vp_nvlist[VDEV_PHYS_SIZE - sizeof (zio_eck_t)];
 	zio_eck_t	vp_zbt;
tools/libfsimage/zfs/zfs-include/zap_leaf.h +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/zap_leaf.h
@@ -24,8 +24,6 @@
 #ifndef	_SYS_ZAP_LEAF_H
 #define	_SYS_ZAP_LEAF_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #define	ZAP_LEAF_MAGIC 0x2AB1EAF
 
 /* chunk size = 24 bytes */
tools/libfsimage/zfs/zfs-include/zfs.h +12 -3
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/zfs.h
@@ -16,9 +16,10 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #ifndef	_SYS_FS_ZFS_H
@@ -27,7 +28,14 @@
 /*
  * On-disk version number.
  */
-#define	SPA_VERSION			24ULL
+#define	SPA_VERSION_INITIAL		1ULL
+#define	SPA_VERSION_BEFORE_FEATURES	28ULL
+#define	SPA_VERSION			5000ULL
+#define	SPA_VERSION_FEATURES		5000ULL
+
+#define	SPA_VERSION_IS_SUPPORTED(v) \
+	(((v) >= SPA_VERSION_INITIAL && (v) <= SPA_VERSION_BEFORE_FEATURES) || \
+	((v) >= SPA_VERSION_FEATURES && (v) <= SPA_VERSION))
 
 /*
  * The following are configuration names used in the nvlist describing a pool's
@@ -67,6 +75,7 @@
 #define	ZPOOL_CONFIG_DDT_HISTOGRAM	"ddt_histogram"
 #define	ZPOOL_CONFIG_DDT_OBJ_STATS	"ddt_object_stats"
 #define	ZPOOL_CONFIG_DDT_STATS		"ddt_stats"
+#define	ZPOOL_CONFIG_FEATURES_FOR_READ	"features_for_read"
 /*
  * The persistent vdev state is stored as separate values rather than a single
  * 'vdev_state' entry.  This is because a device can be in multiple states, such
tools/libfsimage/zfs/zfs-include/zfs_acl.h +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/zfs_acl.h
@@ -24,8 +24,6 @@
 #ifndef	_SYS_FS_ZFS_ACL_H
 #define	_SYS_FS_ZFS_ACL_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifndef _UID_T
 #define	_UID_T
 typedef	unsigned int uid_t;			/* UID type */
tools/libfsimage/zfs/zfs-include/zio.h +14 -0
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs-include/zio.h
@@ -20,6 +20,9 @@
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2013 by Saso Kiselkov. All rights reserved.
+ */
 
 #ifndef _ZIO_H
 #define	_ZIO_H
@@ -73,6 +76,17 @@ enum zio_compress {
 	ZIO_COMPRESS_OFF,
 	ZIO_COMPRESS_LZJB,
 	ZIO_COMPRESS_EMPTY,
+	ZIO_COMPRESS_GZIP_1,
+	ZIO_COMPRESS_GZIP_2,
+	ZIO_COMPRESS_GZIP_3,
+	ZIO_COMPRESS_GZIP_4,
+	ZIO_COMPRESS_GZIP_5,
+	ZIO_COMPRESS_GZIP_6,
+	ZIO_COMPRESS_GZIP_7,
+	ZIO_COMPRESS_GZIP_8,
+	ZIO_COMPRESS_GZIP_9,
+	ZIO_COMPRESS_ZLE,
+	ZIO_COMPRESS_LZ4,
 	ZIO_COMPRESS_FUNCTIONS
 };
 
tools/libfsimage/zfs/zfs_fletcher.c +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs_fletcher.c
@@ -21,8 +21,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include "fsys_zfs.h"
 
 
tools/libfsimage/zfs/zfs_lz4.c new file +313 -0

313 lines not on this page · raw message

tools/libfsimage/zfs/zfs_lzjb.c +5 -7
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs_lzjb.c
@@ -21,8 +21,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include "fsys_zfs.h"
 
 #define	MATCH_BITS	6
@@ -34,10 +32,10 @@
 int
 lzjb_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len)
 {
-	uint8_t *src = s_start;
-	uint8_t *dst = d_start;
-	uint8_t *d_end = (uint8_t *)d_start + d_len;
-	uint8_t *cpy, copymap = '\0';
+	uchar_t *src = s_start;
+	uchar_t *dst = d_start;
+	uchar_t *d_end = (uchar_t *)d_start + d_len;
+	uchar_t *cpy, copymap = '\0';
 	int copymask = 1 << (NBBY - 1);
 
 	while (dst < d_end) {
@@ -49,7 +47,7 @@ lzjb_decompress(void *s_start, void *d_s
 			int mlen = (src[0] >> (NBBY - MATCH_BITS)) + MATCH_MIN;
 			int offset = ((src[0] << NBBY) | src[1]) & OFFSET_MASK;
 			src += 2;
-			if ((cpy = dst - offset) < (uint8_t *)d_start)
+			if ((cpy = dst - offset) < (uchar_t *)d_start)
 				return (-1);
 			while (--mlen >= 0 && dst < d_end)
 				*dst++ = *cpy++;
tools/libfsimage/zfs/zfs_sha256.c +0 -2
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/zfs_sha256.c
@@ -21,8 +21,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include "fsys_zfs.h"
 
 /*
#2 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 1 line · Igor Kozhkuhov

https://github.com/illumos/illumos-gate/tree/master/usr/src/grub/grub-0.97/stage2

Is this link to a specific unchanging version? It looks to me like it probably changes everytime something is committed.

Quoted 1 line

Additional CFLAGS rules have been added after 'CFLAGS += -Werror -D_GNU_SOURCE' in Rules.mk

Actually, they've been added to tools/libfsimage/zfs/Makefile ?

Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Quoted 14 lines

diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/Makefile

tools/libfsimage/zfs/Makefile +1 -1
@@ -25,7 +25,7 @@
 XEN_ROOT = $(CURDIR)/../../..
 
 CFLAGS += -DFSYS_ZFS -DFSIMAGE -I$(XEN_ROOT)/tools/libfsimage/zfs
-LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c
+LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c zfs_lz4.c
 
 FS = zfs
 

tools/libfsimage/zfs/Makefile all: fs-all · line 42

Quoted 7 lines
tools/libfsimage/zfs/Makefile +4 -0
@@ -36,3 +36,8 @@ all: fs-all
 install: fs-install
 
 include $(XEN_ROOT)/tools/libfsimage/Rules.mk
+
+# need for build illumos ZFS
+CFLAGS += -Wno-parentheses
+CFLAGS += -Wno-unused

Are these really needed right at the end like this rather than in the same paragraph as the CFLAGS stuff in the context of the previous hunk?

tools/libfsimage/zfs/fsi_zfs.h

Quoted 6 lines
tools/libfsimage/zfs/Makefile +1 -0
+# end

diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/fsi_zfs.h

tools/libfsimage/zfs/fsi_zfs.h +0 -0
@@ -36,6 +36,8 @@
[...]

I'm not in much position to comment on the actual code.

Ian.

#3 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 6 lines · Ian Campbell
Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Maybe he should use "Questioned-by" to make clear this is not a typo :-)

Christoph

#4 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 9 lines · Christoph
Quoted 6 lines · Ian Campbell
Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Maybe he should use "Questioned-by" to make clear this is not a typo :-)

Or just skip it?

#5 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

could you please let me know what i need to do next ?

--
Best regards,
Igor Kozhukhov

Quoted 14 lines · Ian Campbell
Quoted 9 lines · Christoph
Quoted 6 lines · Ian Campbell
Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Maybe he should use "Questioned-by" to make clear this is not a typo :-)

Or just skip it?

#6 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Hi Ian,

we can use:
https://github.com/illumos/illumos-gate/tree/master/usr/src/grub@2acef22db7808606888f8f92715629ff3ba555b9

will it be correct ?
change set after '@'

about -Werror

by GCC specific, if we want to disable some warnings we should add rules after -Werror. example:
-Werror -Wno-parentheses -Wno-unused

if we add rules "-Wno-parentheses -Wno-unused" before "-Werror" - they will be ignored and we will have build problem.

--
Best regards,
Igor Kozhukhov

Quoted 26 lines · Igor Kozhukhov

could you please let me know what i need to do next ?

--
Best regards,
Igor Kozhukhov

Quoted 14 lines · Ian Campbell
Quoted 9 lines · Christoph
Quoted 6 lines · Ian Campbell
Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Maybe he should use "Questioned-by" to make clear this is not a typo :-)

Or just skip it?

#7 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

(please don't top post)

Quoted 7 lines · Igor Kozhukhov

Hi Ian,

we can use:
https://github.com/illumos/illumos-gate/tree/master/usr/src/grub@2acef22db7808606888f8f92715629ff3ba555b9

will it be correct ?
change set after '@'

That link is 404 for me.

Quoted 7 lines

about -Werror

by GCC specific, if we want to disable some warnings we should add rules after -Werror. example:
-Werror -Wno-parentheses -Wno-unused

if we add rules "-Wno-parentheses -Wno-unused" before "-Werror" - they will be ignored and we will have build problem.

Are you sure? We have at least some instances of this in our tree already and it doesn't seem to be having any adverse impact.

The Werror docs don't say anything about this requirement, just "Make all warnings into errors.". Since Werror doesn't actually enable or disable any warnings itself I can't see why the ordering would matter.

Ian.

#8 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 4 lines · Ian Campbell
Quoted 2 lines · Igor Kozhukhov

Hi Ian,

Quoted 8 lines
Quoted 5 lines

we can use:
https://github.com/illumos/illumos-gate/tree/master/usr/src/grub@2acef22db7808606888f8f92715629ff3ba555b9

will it be correct ?
change set after '@'

That link is 404 for me.

Could you please let me know how to get URL+changes et on GITHUB or another version control system ? my URL contain:
main URL: https://github.com/illumos/illumos-gate/tree/master/usr/src/grub
changeset: 2acef22db7808606888f8f92715629ff3ba555b9

for compare with next updates if needed.

Quoted 6 lines
Quoted 6 lines

about -Werror

by GCC specific, if we want to disable some warnings we should add rules after -Werror. example:
-Werror -Wno-parentheses -Wno-unused

Quoted 9 lines
Quoted 1 line

if we add rules "-Wno-parentheses -Wno-unused" before "-Werror" - they will be ignored and we will have build problem.

Are you sure? We have at least some instances of this in our tree already and it doesn't seem to be having any adverse impact.

The Werror docs don't say anything about this requirement, just "Make all warnings into errors.". Since Werror doesn't actually enable or disable any warnings itself I can't see why the ordering would matter.

Yes - i'm sure. I have tested my changes with my rules before "-Werror" - they was ignored and i can see build issues. I have tested by gcc44 and gcc47.

Quoted 2 lines

Ian.

-Igor

#9 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 13 lines · Igor Kozhukhov
Quoted 10 lines · Ian Campbell
Quoted 7 lines · Igor Kozhukhov

Hi Ian,

we can use:
https://github.com/illumos/illumos-gate/tree/master/usr/src/grub@2acef22db7808606888f8f92715629ff3ba555b9

will it be correct ?
change set after '@'

Quoted 8 lines
Quoted 2 lines

That link is 404 for me.

Could you please let me know how to get URL+changes et on GITHUB or another version control system ? my URL contain:
main URL: https://github.com/illumos/illumos-gate/tree/master/usr/src/grub
changeset: 2acef22db7808606888f8f92715629ff3ba555b9

for compare with next updates if needed.

Just saying it in words is fine (changeset 2aceetcetc from
https://github/...etcetc).

Quoted 11 lines
Quoted 11 lines
Quoted 7 lines

about -Werror

by GCC specific, if we want to disable some warnings we should add rules after -Werror. example:
-Werror -Wno-parentheses -Wno-unused

if we add rules "-Wno-parentheses -Wno-unused" before "-Werror" - they will be ignored and we will have build problem.

Are you sure? We have at least some instances of this in our tree already and it doesn't seem to be having any adverse impact.

Quoted 7 lines
Quoted 4 lines

The Werror docs don't say anything about this requirement, just "Make all warnings into errors.". Since Werror doesn't actually enable or disable any warnings itself I can't see why the ordering would matter.

Yes - i'm sure. I have tested my changes with my rules before "-Werror" - they was ignored and i can see build issues. I have tested by gcc44 and gcc47.

How odd. Are you sure it is the position relative to Werror which matters and not e.g. -Wall ?

Ian.

#10 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 21 lines · Ian Campbell
Quoted 20 lines · Igor Kozhukhov
Quoted 4 lines · Ian Campbell
Quoted 2 lines · Igor Kozhukhov

Hi Ian,

Quoted 8 lines
Quoted 5 lines

we can use:
https://github.com/illumos/illumos-gate/tree/master/usr/src/grub@2acef22db7808606888f8f92715629ff3ba555b9

will it be correct ?
change set after '@'

That link is 404 for me.

Could you please let me know how to get URL+changes et on GITHUB or another version control system ? my URL contain:
main URL: https://github.com/illumos/illumos-gate/tree/master/usr/src/grub
changeset: 2acef22db7808606888f8f92715629ff3ba555b9

Quoted 5 lines
Quoted 1 line

for compare with next updates if needed.

Just saying it in words is fine (changeset 2aceetcetc from
https://github/...etcetc).

Could you please help me with example ?
can we use what i wrote above ?

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 7 lines

about -Werror

by GCC specific, if we want to disable some warnings we should add rules after -Werror. example:
-Werror -Wno-parentheses -Wno-unused

if we add rules "-Wno-parentheses -Wno-unused" before "-Werror" - they will be ignored and we will have build problem.

Are you sure? We have at least some instances of this in our tree already and it doesn't seem to be having any adverse impact.

The Werror docs don't say anything about this requirement, just "Make all warnings into errors.". Since Werror doesn't actually enable or disable any warnings itself I can't see why the ordering would matter.

Quoted 7 lines
Quoted 3 lines

Yes - i'm sure. I have tested my changes with my rules before "-Werror" - they was ignored and i can see build issues. I have tested by gcc44 and gcc47.

How odd. Are you sure it is the position relative to Werror which matters and not e.g. -Wall ?

I have tested in on current build env - if i put my variables before "-Werror" - i have build failed. if my additional rules for disable warning will be added after "-Werror" - all work well

Quoted 2 lines

Ian.

-Igor

#11 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

In reply to Ian Campbell
Quoted 4 lines · Ian Campbell
Quoted 2 lines · Igor Kozhukhov

Hi Ian,

Quoted 8 lines
Quoted 5 lines

we can use:
https://github.com/illumos/illumos-gate/tree/master/usr/src/grub@2acef22db7808606888f8f92715629ff3ba555b9

will it be correct ?
change set after '@'

That link is 404 for me.

Could you please let me know how to get URL+changes et on GITHUB or another version control system ? my URL contain:
main URL: https://github.com/illumos/illumos-gate/tree/master/usr/src/grub
changeset: 2acef22db7808606888f8f92715629ff3ba555b9

for compare with next updates if needed.

Quoted 6 lines
Quoted 6 lines

about -Werror

by GCC specific, if we want to disable some warnings we should add rules after -Werror. example:
-Werror -Wno-parentheses -Wno-unused

Quoted 9 lines
Quoted 1 line

if we add rules "-Wno-parentheses -Wno-unused" before "-Werror" - they will be ignored and we will have build problem.

Are you sure? We have at least some instances of this in our tree already and it doesn't seem to be having any adverse impact.

The Werror docs don't say anything about this requirement, just "Make all warnings into errors.". Since Werror doesn't actually enable or disable any warnings itself I can't see why the ordering would matter.

Yes - i'm sure. I have tested my changes with my rules before "-Werror" - they was ignored and i can see build issues. I have tested by gcc44 and gcc47.

Quoted 2 lines

Ian.

-Igor

#12 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

In reply to Ian Campbell

Hi Ian,

I'm sorry for misunderstanding about Asked-by tag - i'm new on xen contribution.

please find my comments below inline.

--
Best regards,
Igor Kozhukhov

Quoted 5 lines · Ian Campbell
Quoted 1 line · Igor Kozhkuhov

https://github.com/illumos/illumos-gate/tree/master/usr/src/grub/grub-0.97/stage2

Is this link to a specific unchanging version? It looks to me like it probably changes everytime something is committed.

This link specified where i got sources for libfsimage ZFS updates.

Quoted 5 lines
Quoted 2 lines

Additional CFLAGS rules have been added after 'CFLAGS += -Werror -D_GNU_SOURCE' in Rules.mk

Actually, they've been added to tools/libfsimage/zfs/Makefile ?

Rules.mk contain 'CFLAGS += -Werror -D_GNU_SOURCE'
this file included to zfs/Makefile on bottom. if we have to add additional rules for disable GCC warnings we should to add our rules after -Werror. I have added additional rules for ZFS compilations after including Rules.mk in zfs/Makefile

Quoted 7 lines
Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Sorry for this - my misunderstanding of process.

Quoted 36 lines
Quoted 17 lines

diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/Makefile

tools/libfsimage/zfs/Makefile +0 -0
@@ -25,7 +25,7 @@

XEN_ROOT = $(CURDIR)/../../..

CFLAGS += -DFSYS_ZFS -DFSIMAGE -I$(XEN_ROOT)/tools/libfsimage/zfs

tools/libfsimage/zfs/Makefile +1 -1
-LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c
+LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c zfs_lz4.c

FS = zfs

tools/libfsimage/zfs/Makefile +0 -0
@@ -36,3 +36,8 @@ all: fs-all

install: fs-install

include $(XEN_ROOT)/tools/libfsimage/Rules.mk

tools/libfsimage/zfs/Makefile all: fs-all · line 42

Quoted 4 lines
tools/libfsimage/zfs/Makefile +4 -0
+
+# need for build illumos ZFS
+CFLAGS += -Wno-parentheses
+CFLAGS += -Wno-unused

Are these really needed right at the end like this rather than in the same paragraph as the CFLAGS stuff in the context of the previous hunk?

tools/libfsimage/zfs/fsi_zfs.h

Quoted 6 lines

+# end
diff -r 7c12aaa128e3 -r 7afe0b19c898 tools/libfsimage/zfs/fsi_zfs.h

tools/libfsimage/zfs/fsi_zfs.h +0 -0
@@ -36,6 +36,8 @@
[...]

I'm not in much position to comment on the actual code.

Ian.

#13 lore raw

Re: [PATCH 1 of 1] Update ZFS sources from illumos.org:

Quoted 9 lines · Igor Kozhukhov
Quoted 5 lines · Ian Campbell
Quoted 1 line · Igor Kozhkuhov

https://github.com/illumos/illumos-gate/tree/master/usr/src/grub/grub-0.97/stage2

Is this link to a specific unchanging version? It looks to me like it probably changes everytime something is committed.

This link specified where i got sources for libfsimage ZFS updates.

It's not a static copy of the source though. Someone can't use this link in a years time to go and compare what has changed since this sync because it will have changed.

There needs to be a changeset ID corresponding to the exact source you imported in there somewhere, either in the URL or in a comment.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Additional CFLAGS rules have been added after 'CFLAGS += -Werror -D_GNU_SOURCE' in Rules.mk

Actually, they've been added to tools/libfsimage/zfs/Makefile ?

Rules.mk contain 'CFLAGS += -Werror -D_GNU_SOURCE'
this file included to zfs/Makefile on bottom. if we have to add additional rules for disable GCC warnings we should to add our rules after -Werror.

Why must they be after -Werror?

Quoted 10 lines

I have added additional rules for ZFS compilations after including Rules.mk in zfs/Makefile

Quoted 7 lines
Quoted 2 lines

This isn't one of our standard tags, I take it you didn't mean Acked-by, since I didn't ack it. I think all I did was ask for submitting patches to be followed etc, no need to credit me for that IMHO.

Sorry for this - my misunderstanding of process.

No problem.

Ian.