moby/daemon/graphdriver
Vivek Goyal 67fbd34d83 devmapper: Move file write and rename functionality in a separate function
Currently we save device metadata and have a helper function saveMetadata()
which converts data in json format as well as saves it to file. For
converting data in json format, one needs to know what is being saved.

Break this function down in two functions. One function only has file
write capability and takes in argument about byte array of json data.
Now this function does not have to know what data is being saved. It
only knows about a stream of json data is being saved to a file.

This allows me to reuse this function to save a different type of
metadata. In this case I am planning to save NextDeviceId so that
docker can use this device Id upon next restart. Otherwise docker
starts from 0 which is suboptimal.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2014-11-05 09:25:02 -05:00
..
aufs Merge pull request #8813 from jlhawn/aufs_exclude_on_tar_layer 2014-11-04 11:38:12 -05:00
btrfs mount: move the MakePrivate to pkg/mount 2014-10-30 17:04:56 -04:00
devmapper devmapper: Move file write and rename functionality in a separate function 2014-11-05 09:25:02 -05:00
graphtest update go import path and libcontainer 2014-07-24 22:19:50 +00:00
vfs Use archive.CopyWithTar in vfs.Create 2014-10-27 11:38:22 -07:00
driver.go mount: move the MakePrivate to pkg/mount 2014-10-30 17:04:56 -04:00
fsdiff.go Mass gofmt 2014-10-24 15:11:48 -07:00