Commit Graph

8 Commits

Author SHA1 Message Date
Kir Kolyshkin a00310b54c pkg/mount: use sort.Slice
Sorting by mount point length can be implemented in a more
straightforward fashion since Go 1.8 introduced sort.Slice()
with an ability to provide a less() function in place.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-03-06 12:46:58 -08:00
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Brian Goff 54dcbab25e Do not remove containers from memory on error
Before this, if `forceRemove` is set the container data will be removed
no matter what, including if there are issues with removing container
on-disk state (rw layer, container root).

In practice this causes a lot of issues with leaked data sitting on
disk that users are not able to clean up themselves.
This is particularly a problem while the `EBUSY` errors on remove are so
prevalent. So for now let's not keep this behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-05 17:02:04 -04:00
Antonio Murdaca 0f5c9d301b pkg: mount: golint
Fix the following warnings:

pkg/mount/mountinfo.go:5:6: type name will be used as mount.MountInfo by other packages, and that stutters; consider calling this Info
pkg/mount/mountinfo.go:7:2: struct field Id should be ID

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-22 10:26:10 +02:00
Jamie Hannaford 9a98556c2b Add documentation for exported functions and types
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
2015-04-03 11:33:34 +02:00
Vincent Batts 91b4ac320f pkg/mount: include optional field
one linux, the optional field designates the sharedsubtree information,
if any.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-11-03 22:05:04 -05:00
Kato Kazuyoshi 3754fdd7ca Support FreeBSD on pkg/mount
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com> (github: kzys)
2014-04-15 23:16:51 +09:00
Paul Nasrat 2e094db639 Extract mount into pkg.
Mount is self contained and generic, it should be in pkg, to allow other pkg modules to use it.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
2014-01-20 13:59:29 -05:00