From owner-svn-src-stable-8@FreeBSD.ORG Thu Jan 6 09:40:38 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 244C7106564A; Thu, 6 Jan 2011 09:40:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:100:1043::3]) by mx1.freebsd.org (Postfix) with ESMTP id AC5708FC14; Thu, 6 Jan 2011 09:40:37 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 2107313692C; Thu, 6 Jan 2011 10:40:36 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DveXd5kAH2zL; Thu, 6 Jan 2011 10:40:34 +0100 (CET) Received: from [10.9.8.1] (chello085216231078.chello.sk [85.216.231.78]) by mail.vx.sk (Postfix) with ESMTPSA id D5E24136923; Thu, 6 Jan 2011 10:40:33 +0100 (CET) Message-ID: <4D258E11.9090402@FreeBSD.org> Date: Thu, 06 Jan 2011 10:40:33 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org References: <201101060934.p069YMpl009611@svn.freebsd.org> In-Reply-To: <201101060934.p069YMpl009611@svn.freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r217049 - in stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2011 09:40:38 -0000 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); > }