From d2e23899649c348326f306b61d12fbd4f6fb0b66 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 22 Mar 2010 16:38:53 -0700 Subject: [PATCH] Fix a bug in committing of dirty inodes to stable storage. Previously, if an inode changed while it was being committed, we would stall all future commits. Now allow those commits to proceed once the first commit is done. --- bluesky/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluesky/cache.c b/bluesky/cache.c index 8d2cda1..1f10db0 100644 --- a/bluesky/cache.c +++ b/bluesky/cache.c @@ -28,10 +28,10 @@ static void writeback_complete(gpointer a, gpointer i) g_mutex_lock(inode->lock); inode->change_commit = inode->change_pending; + inode->change_pending = 0; if (inode->change_count == inode->change_commit) { /* If inode is no longer dirty... */ inode->change_time = 0; - inode->change_pending = 0; } g_mutex_unlock(inode->lock); -- 2.20.1