Sfoglia il codice sorgente

folders->directories

Signed-off-by: hsinko <21551195@zju.edu.cn>
hsinko 9 anni fa
parent
commit
772f5495b7
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      daemon/graphdriver/aufs/aufs.go

+ 5 - 0
daemon/graphdriver/aufs/aufs.go

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