Date: Fri, 9 Dec 2011 05:00:23 GMT From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru> To: freebsd-fs@FreeBSD.org Subject: Re: kern/149208: mksnap_ffs(8) hang/deadlock Message-ID: <201112090500.pB950Nv8028541@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/149208; it has been noted by GNATS. From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112090500.pB950Nv8028541>