-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add refcounts to graphdrivers that use fsdiff #22168
Conversation
0a63c60
to
9f277e8
Compare
e16f0ef
to
f8085d1
Compare
|
f8085d1
to
8b3cd7a
Compare
all 💚 |
@@ -338,7 +339,7 @@ func (d *Driver) Remove(id string) error { | |||
} | |||
|
|||
// Get creates and mounts the required file system for the given id and returns the mount path. | |||
func (d *Driver) Get(id string, mountLabel string) (string, error) { | |||
func (d *Driver) Get(id string, mountLabel string) (_ string, retErr error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen this done before. (_ string)
. I don't know if this is cool or something horrid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, cleaned this up :)
8b3cd7a
to
a6a01b1
Compare
This makes sure fsdiff doesn't try to unmount things that shouldn't be. **Note**: This is intended as a temporary solution to have as minor a change as possible for 1.11.1. A bigger change will be required in order to support container re-attach. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
a6a01b1
to
7342060
Compare
LGTM |
@cpuguy83 Is it ok that the |
@tonistiigi It's overall racey I think in terms of the reference counting, but not likely to be a problem in this scenario. |
LGTM |
LGTM |
Any chance this is causing the following issue. In one window
In another window
Run it a second time.
|
@rhatdan Yes, most likely. Note this whole patch is reworked for 1.12 to support the daemon restore case, so please take a look at master as well! |
Yes I will try it there. |
This makes sure fsdiff doesn't try to unmount things that shouldn't be.
Note: This is intended as a temporary solution to have as minor a
change as possible for 1.11.1. A bigger change will be required in order
to support container re-attach.
Fixes #22116