From owner-freebsd-fs@FreeBSD.ORG Fri Dec 9 05:00:24 2011 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 686621065675 for ; Fri, 9 Dec 2011 05:00:24 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3E6408FC0C for ; Fri, 9 Dec 2011 05:00:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pB950NHD028544 for ; Fri, 9 Dec 2011 05:00:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pB950Nv8028541; Fri, 9 Dec 2011 05:00:23 GMT (envelope-from gnats) Date: Fri, 9 Dec 2011 05:00:23 GMT Message-Id: <201112090500.pB950Nv8028541@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= Cc: Subject: Re: kern/149208: mksnap_ffs(8) hang/deadlock X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2011 05:00:24 -0000 The following reply was made to PR kern/149208; it has been noted by GNATS. From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= To: bug-followup@FreeBSD.org, karl@denninger.net Cc: Subject: Re: kern/149208: mksnap_ffs(8) hang/deadlock Date: Fri, 9 Dec 2011 06:58:51 +0200 Hi as adviced here http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2008-11/msg00210.html I think you need to add > + if (cg % 10 == 0) > + ffs_syncvnode(vp, MNT_WAIT); in any loop, because of depend on size of disk look can take long time. so: --- ffs_snapshot.c.orig 2011-12-09 06:45:11.000000000 +0000 +++ ffs_snapshot.c 2011-12-09 06:49:43.000000000 +0000 @@ -305,7 +305,7 @@ ip->i_flag |= IN_CHANGE | IN_UPDATE; error = readblock(vp, bp, numblks - 1); bawrite(bp); - if (error != 0) + if (error != 0) // why not just if( error ) ??? goto out; /* * Preallocate critical data structures so that we can copy @@ -324,6 +324,10 @@ if (error) goto out; bawrite(ibp); + if (blkno % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); + if (error) // to be same as line 385 + goto out; } /* * Allocate copies for the superblock and its summary information. @@ -341,6 +345,10 @@ if (error) goto out; bawrite(nbp); + if (loc % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); + if (error) //to be same as line 385 + goto out; } /* * Allocate all cylinder group blocks. @@ -353,6 +361,8 @@ bawrite(nbp); if (cg % 10 == 0) ffs_syncvnode(vp, MNT_WAIT); + if (error) //to be same as line 385 + goto out;. } /* * Copy all the cylinder group maps. Although the but I not shure. Please confirm -- С уважением, Коньков mailto:kes-kes@yandex.ru