Save restore device Id: issue #8978

Fixes #8978

During testing of docker with device mapper backend, I often noticed bunch of warnings on console and often thought that if something is wrong with my docker setup. It turned out that docker does not keep track of already used device ids.  This patch series should make docker little bit smarter about it.

More details are in issue and patches. Please review and pull.

Thanks
Vivek
Perhaps add a comment of that.
On Nov 7, 2014 9:03 AM, "Vivek Goyal" <notifications@github.com> wrote:

> In daemon/graphdriver/devmapper/deviceset.go:
>
> > @@ -666,6 +708,10 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
> >  		}
> >  	}
> >
> > +	// Right now this loads only NextDeviceId. If there is more metatadata
> > +	// down the line, we might have to move it earlier.
> > +	devices.loadDeviceSetMetaData()
>
> Because even if there is an error, we can continue. Error does not prevent
> us from making progress. At this point of time loading of nextDeviceId is
> just a hint to docker. When somebody upgrades docker, there will not be any
> deviceset-metadata file and we don't want to error out in that case.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/docker/docker/pull/8982/files#r20011219>.
>