Skip to content

Commit

Permalink
move xino stuff to /dev/shm
Browse files Browse the repository at this point in the history
  • Loading branch information
vieux committed Jun 5, 2013
1 parent 04050c4 commit f67ea78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions image.go
Expand Up @@ -126,6 +126,8 @@ func MountAUFS(ro []string, rw string, target string) error {
}
branches := fmt.Sprintf("br:%v:%v", rwBranch, roBranches)

branches += ",xino=/dev/shm/aufs.xino"

//if error, try to load aufs kernel module
if err := mount("none", target, "aufs", 0, branches); err != nil {
log.Printf("Kernel does not support AUFS, trying to load the AUFS module with modprobe...")
Expand Down

2 comments on commit f67ea78

@jpetazzo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the xino table is per filesystem (actually, per branch), and we should therefore use a generated path to avoid collisions.
Warning: simple testing will probably not exhibit the problem, because the xino file is created, then unlinked. But if multiple mounts are done at the same time, there is the possibility that the same xino file gets used twice (I don't know what would happen in that case, honestly).

@jpetazzo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I stand corrected: according to AUFS author, this should work fine[1]

[1] http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg03177.html

Please sign in to comment.