DragonFly BSD
DragonFly bugs List (threaded) for 2009-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: panic: assertion: cursor->trans->sync_lock_refs > 0 in hammer_recover_cursor


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Oct 2009 17:47:30 -0700 (PDT)

:Happened when I started 8 mirror-stream at the same time.
:
:cheers
:   simon

    Yours are easier to track down :-)  Try the patch below.

    Tomokazu's are more difficult.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


diff --git a/sys/vfs/hammer/hammer_mirror.c b/sys/vfs/hammer/hammer_mirror.c
index 574b74d..05e12a0 100644
--- a/sys/vfs/hammer/hammer_mirror.c
+++ b/sys/vfs/hammer/hammer_mirror.c
@@ -462,8 +462,10 @@ hammer_ioc_mirror_write(hammer_transaction_t trans, hammer_inode_t ip,
 		 */
 		if (error == EDEADLK) {
 			while (error == EDEADLK) {
+				hammer_sync_lock_sh(trans);
 				hammer_recover_cursor(&cursor);
 				error = hammer_cursor_upgrade(&cursor);
+				hammer_sync_unlock(trans);
 			}
 		} else {
 			if (error == EALREADY)



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]