-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lock the mounts list with its own lockfile
Separate loading and saving the mountpoints.json table out of the main layer load/save paths so that they can be called independently, so that we can mount and unmount layers (which requires that we update that information) when the layer list itself may only be held with a read lock. The new loadMounts() and saveMounts() methods need to be called only for read-write layer stores. Callers that just refer to the mount information can take a read lock on the mounts information, but callers that modify the mount information need to acquire a write lock. Break the unwritten "stores don't manage their own locks" rule and have the layer store handle managing the lock for the mountpoints list, with the understanding that the layer store's lock will always have been acquired before we try to take the mounts lock. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
- Loading branch information
Showing
1 changed file
with
141 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters