From owner-freebsd-stable@FreeBSD.ORG Wed Jun 4 16:10:07 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02581065674 for ; Wed, 4 Jun 2008 16:10:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 373488FC22 for ; Wed, 4 Jun 2008 16:10:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m54GA1Op017346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Jun 2008 19:10:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m54GA1U8024178; Wed, 4 Jun 2008 19:10:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m54GA1ma024174; Wed, 4 Jun 2008 19:10:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Jun 2008 19:10:01 +0300 From: Kostik Belousov To: Andriy Gapon Message-ID: <20080604161001.GF63348@deviant.kiev.zoral.com.ua> References: <4846AFC3.3050101@icyb.net.ua> <20080604152332.GE63348@deviant.kiev.zoral.com.ua> <4846B5D9.1050903@icyb.net.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3ozdenm5Azl6mQ8k" Content-Disposition: inline In-Reply-To: <4846B5D9.1050903@icyb.net.ua> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: freebsd-stable@freebsd.org Subject: Re: mystery: lock up after fs dump X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2008 16:10:07 -0000 --3ozdenm5Azl6mQ8k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 04, 2008 at 06:33:45PM +0300, Andriy Gapon wrote: > on 04/06/2008 18:23 Kostik Belousov said the following: > > On Wed, Jun 04, 2008 at 06:07:47PM +0300, Andriy Gapon wrote: > [snip] > >> dumps are done on live filesystems using -L. > [snip] > >> 4. both systems have gjournal support (on 6.X it is added via a > >> "non-official" patch), there are gjournaled filesystems on both systems > >> and they are dumped. > >=20 > > Do you use snapshots on the gjournaled fs ? I believe this is problemat= ic. >=20 > Yes, I do via dump -L. I don't otherwise (no mksnap_ffs). > I had some thoughts about that. > But... I remember discussing this on geom list and I think pjd said that > this should work and also it worked for me flawlessly except for that > one moment. > BTW, those filesystems are mounted like the following: > ufs, asynchronous, local, noatime, gjournal > This is to say that I do not mix gjournal and softupdates, which is also > possible (at least not prohibited). SU are irrelevant to the problem I am thinking of. vfs_write_suspend() returns 0 when the filesystem being suspended is already in suspend state. vfs_write_resume() clears the suspend state. vfs_write_suspend/vfs_write_resume are used both by snapshot code and the gjournal. If two users of these interfaces interleave, then you could get: thread1 thread2 vfs_write_suspend() <- fs is suspended there vfs_write_suspend() <- returns 0 vfs_write_resume() <- fs is no more suspended thread2 is burned in flame Snapshots are protected against this because they are created through the mount(2). The mount(2) locks the covered vnode and thus serializes snapshot creation (I think there are further serialization points that prevent simultaneous snapshotting of the same fs). There is nothing I can see that protects snapshots/gjournal interaction. --3ozdenm5Azl6mQ8k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkhGvlkACgkQC3+MBN1Mb4hZfgCghe9eqX5YceUj0yI8MJVQATJ6 8d8An3dpAThLkUWRFDilpI13vfye22hY =jkJq -----END PGP SIGNATURE----- --3ozdenm5Azl6mQ8k--