Merge pull request #20530 from hsinko/myDev

Add some comments for daemon/graphdriver/aufs/aufs.go
This commit is contained in:
Tibor Vass
2016-03-01 11:35:35 -05:00

View File

@@ -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