summaryrefslogtreecommitdiff
path: root/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go
Commit message (Collapse)AuthorAgeFilesLines
* Update to Go 1.17.0, and gofmt with Go 1.17Sebastiaan van Stijn2021-08-241-2/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* pkg: devmapper: dynamically load dm_task_deferred_removeAleksa Sarai2018-02-161-2/+4
| | | | | | | | | | | | | | | | | dm_task_deferred_remove is not supported by all distributions, due to out-dated versions of devicemapper. However, in the case where the devicemapper library was updated without rebuilding Docker (which can happen in some distributions) then we should attempt to dynamically load the relevant object rather than try to link to it. This can only be done if Docker was built dynamically, for obvious reasons. In order to avoid having issues arise when dlsym(3) was unnecessary, gate the whole dlsym(3) logic behind a buildflag that we disable by default (libdm_dlsym_deferred_remove). Signed-off-by: Aleksa Sarai <asarai@suse.de>
* Add canonical import commentDaniel Nephin2018-02-051-1/+1
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* pkg/devicemapper: comment nitpicksKir Kolyshkin2017-07-311-1/+1
| | | | | | | | | | | | 1. devmapper_wrapper_{,no_}deferred_remove.go: Comments about LibraryDeferredRemovalSupport were very totally misleading to me. This thing has nothing to do with either static or dynamic linking (but with build tags). Fix the comment accordingly. 2. devmapper.go: Reveal the source of those magic device* constants. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Make pkg/devicemapper and pkg/loopback depend on cgo in build tagsAaron Lehmann2017-03-291-1/+1
| | | | Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
* fix a few golint errorsVictor Vieux2016-11-181-1/+1
| | | | Signed-off-by: Victor Vieux <victorvieux@gmail.com>
* Lint package pkg/devicemapperVincent Demeester2015-09-051-2/+3
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* devicemapper: Create a method to get device info with deferred remove fieldVivek Goyal2015-04-211-0/+4
| | | | | | | | | | Deferred reove functionality was added to library later. So in old version of library it did not report deferred_remove field. Create a new function which also gets deferred_remove field and it will be called only on newer version of library. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
* devicemapper: Add helper functions to allow deferred device removalVivek Goyal2015-04-211-0/+10
A lot of time device mapper devices leak across mount namespace which docker does not know about and when docker tries to deactivate/delete device, operation fails as device is open in some mount namespace. Create a mechanism where one can defer the device deactivation/deletion so that docker operation does not fail and device automatically goes away when last reference to it is dropped. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>