svn commit: r217049 - in stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

J. Hellenthal jhell at DataIX.net
Thu Jan 6 20:54:40 UTC 2011


Heads-up this currently has broken
~mm/patches/zfs/v28/stable-8-zfsv28-20101218.patch.xz
~mm/patches/zfs/v28/stable-8-zfsv28-20101223-nopython.patch.xz

Attached is a reject of the applied patch regarding zio.c and the diff
extracted from the above patches with a make.log from script(1).

The make.log is from after I worked those changes into zio.c

On 01/06/2011 04:40, Martin Matuska wrote:
> My mistake: s/pav/pjd/g
> 
> Dňa 06.01.2011 10:34, Martin Matuska  wrote / napísal(a):
>> Author: mm
>> Date: Thu Jan  6 09:34:22 2011
>> New Revision: 217049
>> URL: http://svn.freebsd.org/changeset/base/217049
>>
>> Log:
>>   MFC r216919:
>>   
>>   MFp4 186485, 186859:
>>   Fix a race by defining two tasks in the zio structure
>>   as we can still be returning from issue task when interrupt task is used.
>>   
>>   Reviewed by:	pav
>>   Approved by:	pav
>>
>> Modified:
>>   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
>>   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
>> Directory Properties:
>>   stable/8/sys/   (props changed)
>>   stable/8/sys/amd64/include/xen/   (props changed)
>>   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
>>   stable/8/sys/contrib/dev/acpica/   (props changed)
>>   stable/8/sys/contrib/pf/   (props changed)
>>
>> Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
>> ==============================================================================
>> --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Thu Jan  6 08:33:48 2011	(r217048)
>> +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Thu Jan  6 09:34:22 2011	(r217049)
>> @@ -340,7 +340,8 @@ struct zio {
>>  
>>  #ifdef _KERNEL
>>  	/* FreeBSD only. */
>> -	struct ostask	io_task;
>> +	struct ostask	io_task_issue;
>> +	struct ostask	io_task_interrupt;
>>  #endif
>>  };
>>  
>>
>> Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
>> ==============================================================================
>> --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Thu Jan  6 08:33:48 2011	(r217048)
>> +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Thu Jan  6 09:34:22 2011	(r217049)
>> @@ -947,6 +947,18 @@ zio_taskq_dispatch(zio_t *zio, enum zio_
>>  {
>>  	spa_t *spa = zio->io_spa;
>>  	zio_type_t t = zio->io_type;
>> +#ifdef _KERNEL
>> +	struct ostask *task;
>> +#endif
>> +
>> +	ASSERT(q == ZIO_TASKQ_ISSUE || q == ZIO_TASKQ_INTERRUPT);
>> +
>> +#ifdef _KERNEL
>> +	if (q == ZIO_TASKQ_ISSUE)
>> +		task = &zio->io_task_issue;
>> +	else /* if (q == ZIO_TASKQ_INTERRUPT) */
>> +		task = &zio->io_task_interrupt;
>> +#endif
>>  
>>  	/*
>>  	 * If we're a config writer or a probe, the normal issue and
>> @@ -970,8 +982,13 @@ zio_taskq_dispatch(zio_t *zio, enum zio_
>>  		q++;
>>  
>>  	ASSERT3U(q, <, ZIO_TASKQ_TYPES);
>> +#ifdef _KERNEL
>>  	(void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q],
>> -	    (task_func_t *)zio_execute, zio, &zio->io_task);
>> +	    (task_func_t *)zio_execute, zio, task);
>> +#else
>> +	(void) taskq_dispatch(spa->spa_zio_taskq[t][q],
>> +	    (task_func_t *)zio_execute, zio, TQ_SLEEP);
>> +#endif
>>  }
>>  
>>  static boolean_t
>> @@ -2300,9 +2317,16 @@ zio_done(zio_t *zio)
>>  			 * Reexecution is potentially a huge amount of work.
>>  			 * Hand it off to the otherwise-unused claim taskq.
>>  			 */
>> +#ifdef _KERNEL
>>  			(void) taskq_dispatch_safe(
>>  			    spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
>> -			    (task_func_t *)zio_reexecute, zio, &zio->io_task);
>> +			    (task_func_t *)zio_reexecute, zio,
>> +				&zio->io_task_issue);
>> +#else
>> +			(void) taskq_dispatch(
>> +			    spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
>> +				(task_func_t *)zio_reexecute, zio, TQ_SLEEP);
>> +#endif
>>  		}
>>  		return (ZIO_PIPELINE_STOP);
>>  	}
> _______________________________________________
> svn-src-stable-8 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8
> To unsubscribe, send any mail to "svn-src-stable-8-unsubscribe at freebsd.org"


-- 

Regards,

 jhell,v
 JJH48-ARIN
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zio.c.diff
Type: text/x-patch
Size: 52094 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-stable-8/attachments/20110106/051da821/zio.c-0001.bin
-------------- next part --------------
***************
*** 943,953 ****
   */
  
  static void
- zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q)
  {
  	spa_t *spa = zio->io_spa;
  	zio_type_t t = zio->io_type;
  
  	/*
  	 * If we're a config writer or a probe, the normal issue and
  	 * interrupt threads may all be blocked waiting for the config lock.
--- 1063,1086 ----
   */
  
  static void
+ zio_taskq_dispatch(zio_t *zio, enum zio_taskq_type q, boolean_t cutinline)
  {
  	spa_t *spa = zio->io_spa;
  	zio_type_t t = zio->io_type;
+ 	int flags = TQ_SLEEP | (cutinline ? TQ_FRONT : 0);
+ #ifdef _KERNEL
+ 	struct ostask *task;
+ #endif
  
+ 	ASSERT(q == ZIO_TASKQ_ISSUE || q == ZIO_TASKQ_INTERRUPT);
+ 
+ #ifdef _KERNEL
+ 	if (q == ZIO_TASKQ_ISSUE)
+ 		task = &zio->io_task_issue;
+ 	else /* if (q == ZIO_TASKQ_INTERRUPT) */
+ 		task = &zio->io_task_interrupt;
+ #endif
+ 
  	/*
  	 * If we're a config writer or a probe, the normal issue and
  	 * interrupt threads may all be blocked waiting for the config lock.
***************
*** 970,977 ****
  		q++;
  
  	ASSERT3U(q, <, ZIO_TASKQ_TYPES);
  	(void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q],
- 	    (task_func_t *)zio_execute, zio, &zio->io_task);
  }
  
  static boolean_t
--- 1103,1115 ----
  		q++;
  
  	ASSERT3U(q, <, ZIO_TASKQ_TYPES);
+ #ifdef _KERNEL
  	(void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q],
+ 	    (task_func_t *)zio_execute, zio, flags, task);
+ #else
+ 	(void) taskq_dispatch(spa->spa_zio_taskq[t][q],
+ 	    (task_func_t *)zio_execute, zio, flags);
+ #endif
  }
  
  static boolean_t
***************
*** 2317,2334 ****
  			 * Reexecution is potentially a huge amount of work.
  			 * Hand it off to the otherwise-unused claim taskq.
  			 */
  			(void) taskq_dispatch_safe(
  			    spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
- 			    (task_func_t *)zio_reexecute, zio, &zio->io_task);
  		}
  		return (ZIO_PIPELINE_STOP);
  	}
  
- 	ASSERT(zio_walk_children(zio) == NULL);
  	ASSERT(zio->io_reexecute == 0);
  	ASSERT(zio->io_error == 0 || (zio->io_flags & ZIO_FLAG_CANFAIL));
  
  	/*
  	 * It is the responsibility of the done callback to ensure that this
  	 * particular zio is no longer discoverable for adoption, and as
  	 * such, cannot acquire any new parents.
--- 2917,2952 ----
  			 * Reexecution is potentially a huge amount of work.
  			 * Hand it off to the otherwise-unused claim taskq.
  			 */
+ #ifdef _KERNEL
  			(void) taskq_dispatch_safe(
  			    spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
+ 			    (task_func_t *)zio_reexecute, zio, TQ_SLEEP,
+ 			    &zio->io_task_issue);
+ #else
+ 			(void) taskq_dispatch(
+ 			    spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
+ 			    (task_func_t *)zio_reexecute, zio, TQ_SLEEP);
+ #endif
  		}
  		return (ZIO_PIPELINE_STOP);
  	}
  
+ 	ASSERT(zio->io_child_count == 0);
  	ASSERT(zio->io_reexecute == 0);
  	ASSERT(zio->io_error == 0 || (zio->io_flags & ZIO_FLAG_CANFAIL));
  
  	/*
+ 	 * Report any checksum errors, since the I/O is complete.
+ 	 */
+ 	while (zio->io_cksum_report != NULL) {
+ 		zio_cksum_report_t *zcr = zio->io_cksum_report;
+ 		zio->io_cksum_report = zcr->zcr_next;
+ 		zcr->zcr_next = NULL;
+ 		zcr->zcr_finish(zcr, NULL);
+ 		zfs_ereport_free_checksum(zcr);
+ 	}
+ 
+ 	/*
  	 * It is the responsibility of the done callback to ensure that this
  	 * particular zio is no longer discoverable for adoption, and as
  	 * such, cannot acquire any new parents.
-------------- next part --------------
Script started on Thu Jan  6 15:28:39 2011
make
cc -O2 -pipe -DFREEBSD_NAMECACHE -DBUILDING_ZFS -DDEBUG=1 -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/src/sys/modules/zfs/../../cddl/compat/opensolaris -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/zmod -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common -I/usr/src/sys/modules/zfs/../.. -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/common/zfs -I/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/common -I/usr/src/sys/modules/zfs/../../../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -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/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
cc1: warnings being treated as errors
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c: In function 'zio_taskq_dispatch':
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:1108: warning: passing argument 4 of 'taskq_dispatch_safe' makes integer from pointer without a cast
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:1108: error: too few arguments to function 'taskq_dispatch_safe'
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c: In function 'zio_done':
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:2907: warning: passing argument 4 of 'taskq_dispatch_safe' makes integer from pointer without a cast
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c:2907: error: too few arguments to function 'taskq_dispatch_safe'
*** Error code 1

Stop in /usr/src/sys/modules/zfs.

Script done on Thu Jan  6 15:28:40 2011


More information about the svn-src-stable-8 mailing list