Skip to content

Commit

Permalink
os/FileStore: fix mount/remount force_sync race
Browse files Browse the repository at this point in the history
Consider:

 - mount
 - sync_entry is doing some work
 - umount
   - set force_sync = true
   - set done = true
 - sync_entry exits (due to done)
   - ..but does not set force_sync = false
 - mount
 - journal replay starts
 - sync_entry sees force_sync and does a commit while op_seq == 0
 ...crash...

Fixes: #9144
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit dd11042)

Conflicts:
	src/os/FileStore.cc
  • Loading branch information
liewegas committed Aug 26, 2014
1 parent a38cf1b commit 2f11631
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/os/FileStore.cc
Expand Up @@ -1558,6 +1558,8 @@ int FileStore::umount()
backend = generic_backend;
}

force_sync = false;

object_map.reset();

{
Expand Down

0 comments on commit 2f11631

Please sign in to comment.