mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Merge pull request #20530 from hsinko/myDev
Add some comments for daemon/graphdriver/aufs/aufs.go
This commit is contained in:
@@ -233,6 +233,8 @@ func (a *Driver) Create(id, parent, mountLabel string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// createDirsFor creates two directories for the given id.
|
||||
// mnt and diff
|
||||
func (a *Driver) createDirsFor(id string) error {
|
||||
paths := []string{
|
||||
"mnt",
|
||||
@@ -243,6 +245,9 @@ func (a *Driver) createDirsFor(id string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Directory permission is 0755.
|
||||
// The path of directories are <aufs_root_path>/mnt/<image_id>
|
||||
// and <aufs_root_path>/diff/<image_id>
|
||||
for _, p := range paths {
|
||||
if err := idtools.MkdirAllAs(path.Join(a.rootPath(), p, id), 0755, rootUID, rootGID); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user