Commit Graph

107 Commits

Author SHA1 Message Date
c7d1f45ca3 Merge pull request #9233 from inatatsu/fix-pkg-units-size-for-gccgo
Fix to avoid a compile error due to float to int truncation with GCCGO
Upstream-commit: 2acb856dff848bd69c5e971f6352854a26362164
Component: engine
2014-12-18 18:33:01 -08:00
149e33e015 Fix vet errors about json tags for unexported fields
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c7ff6bf69149bc5892633d95ebfacaf3ad36a008
Component: engine
2014-12-12 11:01:46 -08:00
d335495a31 devmapper: Use transactions during device deletion
Use transaction logic during device deletion and do rollback if transaction
is not complete. Following is the sequence of events.

- Open transaction and save to metafile
- Delete device from pool
- Delete device metadata file from disk
- Close Transaction

If docker crashes without closing transaction then rollback will take
place upon next docker start.
 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 17b75a21a667a27a9a27565ab282cd615dbdb66e
Component: engine
2014-12-03 13:06:43 -05:00
18c76d6b93 devmapper: Use transaction mechanism during device or snap device creation
Finally this patch uses the notion of transaction for device or snapshot
device creation. 

Following is sequence of event.

- Open a trasaction and save details in a file.
- Create a new device/snapshot device
- If a new device id is used, refresh transaction with new device id details.
- Create device metadata file
- Close transaction.

If docker crashes anywhere in between without closing transaction, then
upon next start, docker will figure out that there was a pending transaction
and it will roll back transaction. That is it will do following.

- Delete Device from pool
- Delete device metadata file
- Remove transaction file to mark no transaction is pending.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: c115c4aa45ba82f27859b0afba5724d437857879
Component: engine
2014-12-03 13:06:43 -05:00
f802074502 devmapper: Find a free device Id to use for device creation
Finally, we seem to have all the bits to keep track of all used device
Ids and find a free device Id to use when creating a  new device. Start
using it.

Ideally we should completely move away from retry logic when pool returns
-EEXISTS. For now I have retained that logic and I simply output a warning.
When things are stable, we should be able to get rid of it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: e28a419e1197bf50bbb378b02f0226c3115edeaa
Component: engine
2014-12-03 13:06:43 -05:00
c3a04ca795 devmapper: Open code createDevice() and createSnapDevice()
Open code createDevice() and createSnapDevice() and move all the logic
in the caller.

This is a sheer code reorganization so that all device Id allocation
logic is in one function. That way in case of erros, one can easily
cleanup and mark device Id free again. (Later patches benefit from
it).

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 14d0dd855ee1e7cd1a3185c3d5a00e7afccb5c43
Component: engine
2014-12-03 13:06:43 -05:00
a3ad44f760 devmapper: Provide a helper function getNextDeviceId()
Right now we are accessing devices.NextDeviceId directly and also 
incrementing it at various places.

Instead provide a helper function which is responsile for
incrementing NextDeviceId and return next deviceId. 

This is just code structuring. This will help later once we
convert this function to find a free device Id and it goes
through a bitmap of used/free device Ids.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: a44c23fe6604d1de59c64bbb9dc234c7c3dbede9
Component: engine
2014-12-03 13:06:43 -05:00
336b3bbd52 devmapper: Construct initial device Id map from device meta files
When docker starts, build a used/free Device Id map from the per
device meta files we already have. These meta files have the data
which device Ids are in use. Parse these files and mark device as
used in the map.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 39dc7829dea87d4be8e6e9b2a598fb354ebf4ba0
Component: engine
2014-12-03 13:06:43 -05:00
622c433bcb devmapper: Keep track of used device Ids in a bitmap
Currently devicemapper backend does not keep track of used device Ids in
the pool. It tries a device Id and if that device Id exists in pool, it
tries with a different Id and keeps on doing this in a loop till it succeeds.

This worked fine so far but now we are moving to transaction based
device creation and deletion. We will keep deviceId information in 
transaction which will be rolled back if docker crashed before transaction
was complete.

If we store a deviceId in transaction and later figure out it already
existed in pool and docker crashed, then we will rollback and remove
that existing device Id from pool (which we should not have).

That means, we should know free device Id in pool in advance before
we put that device Id in transaction.

Hence this patch creates a bitmap (one bit each for a deviceId), and
sets the bit if device Id is used otherwise resets it. This patch
is just preparing the ground right now. Actual usage will follow
in later patches.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 4d39e056aac2fadffcb8560101f3c31a2b7db3ae
Component: engine
2014-12-03 13:06:43 -05:00
b4dc28ba46 devmapper: Use a common delete function for all device deletion operation
Right now setupBaseImage() uses deleteDevice() to delete uninitialized
base image while rest of the code uses DeleteDevice(). Change it and
use a common function everywhere for the sake of uniformity.

I can't see what harm can be done by doing little extra locking done
by DeleteDevice().

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 359a38b26a164f430c79fe542babb77c6e48dcc3
Component: engine
2014-12-03 13:06:43 -05:00
63f43eb974 devmapper: Rename NewTransactionId to OpenTransactionId
Very soon we will have the notion of an open transaction and keep its
details in a metafile.

When a new transaction is opened, we allocate a new transaction Id, 
do the device creation/deletion and then we will close the transaction.

I thought that OpenTransactionId better represents the semantics of
transaction Id associated with an open transaction instead of NewtransactionId.

This patch just does the renaming. No functionality change.

I have also introduced a structure "Transaction" which will keep all
the details associated with a transaction. Later patches will add more
fields in this structure.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: f078bcd8e50913fd8b05022ebd047c5a1f2e3d52
Component: engine
2014-12-03 13:06:43 -05:00
d225e227dc devmapper: Allocate new transaction Id using current transaction Id
Currently new transaction Id is created using allocateTransactionId()
function. This function takes NewTransactionId and bumps up by one 
to create NewTransactionId.

I think ideally we should be bumping up devices.TransactionId by 1
to come up with NewTransactionId. Because idea is that devices.TransactionId
contains the current pool transaction Id and to come up with a new
transaction Id bump it up by one.

Current code is not wrong as we are keeping NewTransactionId and
TransactionId in sync. But it will be more direct if we look at
devices.TransactionId to come up with NewTransactionId. That way
we don't have to even initialize NewTransactionId during startup
as first time somebody wants to do a transaction, it will be
allocated fresh.

So simplify the code a bit. No functionality change.
 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 7b0a1b814b8f13e30df466dd66c3fdc2114eac28
Component: engine
2014-12-03 13:06:43 -05:00
f0bbf70516 devmapper: Remove unnecessary condition check in updatePoolTransactionId()
Currently updatePoolTransactionId() checks if NewTransactionId and
TransactionId are not same only then update the transaction Id in pool. This
check is redundant. Currently we call updatePoolTransactionId() only from
two places and both of these first allocate a new transaction Id.

Also updatePoolTransactionId() should only be called after allocating
new transaction Id otherwise it does not make any sense.

Remove the redundant check and reduce confusion.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 6d347aeb6984ebdcb1051212ab3103880ef69ab0
Component: engine
2014-12-03 13:06:43 -05:00
9318108e88 devmapper: Create new helper function for device and snap creation
Create two new helper functions for device and snap device creation. These
functions will not only create the device and also register the device.

Again, makes the code structure better and keeps all transaction logic
contained to functions instead of spilling over into functions like
setupBaseImage or AddDevice().

Just the code reorganization. No functionality change.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: ad9118c696c0953ec48eec15ea4b7546296d7c20
Component: engine
2014-12-03 13:06:43 -05:00
67ef59131f devmapper: Provide a function unregisterDevice()
Currently registerDevice() adds a device to in-memory table, saves metadata
and also updates the pool transaction ID.

Now move transaciton Id update out of registerDevice() and provide a new
function unregisterDevice() which does the reverse of registerDevice().
This will simplify some code down the line and make it more structured.

This is just code reorganization and should not change functionality.
 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 442247927b8e6c102ce1f94de58c7f93aab3d271
Component: engine
2014-12-03 13:06:43 -05:00
eb11479882 devmapper: Use device id as specified by caller
Currently devicemapper CreateDevice and CreateSnapDevice keep on retrying
device creation till a suitable device id is found. 

With new transaction mechanism we need to store device id in transaction
before it has been created.

So change the logic in such a way that caller decides the devices Id to
use. If that device Id is not available, caller bumps up the device Id
and retries.

That way caller can update transaciton too when it tries a new Id. Transaction
related patches will come later in the series.
  
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 7b2b15d3e9f9b7ad898a36bbe5ceb42c9ca58d47
Component: engine
2014-12-03 13:06:43 -05:00
a7eaca43b5 devmapper: Do not add back device into hash map if meta file removal failed
When we are deleting a device, we also delete associated metadata file. If
that file removal fails, we are adding back the device in in-memory
table. I really can't see what's the point. When next lookup takes place
it will be automatically loaded if need be. Remove that code.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 5be77901cd505aad002b912b5febe2ba6baa23fd
Component: engine
2014-12-03 13:06:43 -05:00
4071b33d53 devmapper: Move pool id query and migration of old data in separate function
Right now initMetaData() first queries the pool for current transaciton Id
and then it migrates the old metafile.

Move pool transaction Id query and file migration in separate functions
for better code reuse and organization.

Given we have removed device transaction Id dependency from saveMetaData(),
we don't have to query pool transaction Id before migrating files.
 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 824a87f7efb94e4f307d920c3c3689156d6e633f
Component: engine
2014-12-03 13:06:43 -05:00
f0d19de5f9 devmapper: Remove transaction Id update from saveMetaData()
Right now saveMetaData() is kind of little overloaded function. It is
supposed to save file metadata to disk. But in addition if user has
bumped up NewTransactionId before calling saveMetaData(), then it will
also update the transaction ID in pool.

Keep saveMetaData() simple and let it just save the file. Any update
of pool transaction ID is done inline in the code which needs it.

Also create an helper function updatePoolTransactionId() to update pool
transaction Id.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 0db6cc85edfccb16ce5308eea767530e1a3f6906
Component: engine
2014-12-03 13:06:43 -05:00
48849bb96c devmapper: Remove unnecessary call to allocateTransactionId() during device removal
Remove call to allocateTransactionId() during device removal. This seems to
be unnecessary and it is not clear what this call is doing.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 004d8b9b337f4a6cf68c124e89e02e673c6320fc
Component: engine
2014-12-03 13:06:43 -05:00
9846ed5485 devmapper: Do not check for transaction id during device metadata loading
Again, just because device transaction id is greater than pool transaction
id, it does not guarantee that device is in the pool. So do not check
of this during loading of device metadata.

Docker needs to deal with it. And device activation will fail when we try
to activate a device for whom metafile is present but there is no device
in the pool.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: b721d6d8d0313fbb4b80e12318c96fc4004ee96b
Component: engine
2014-12-03 13:06:43 -05:00
65d86e4b8e devmapper: Do not check for pool transaction id during old metadata migration
Current code is associating a transaction id with each device and if pool
transaction id is greater that value, then current code assumes that device
is there in pool.

Transaction id of pool is a mechanism so that during device creation and
removal one can define a transaction and during startup figure out if
transaction was complete or not. I think we are using transaction id 
throughout the code little inappropriately.

For example, if a device is being deleted, it is possible that we deleted
the device from pool but before we could delete metafile docker crashed.
When docker comes back it will think that device is in the pool (due to
device transaction id being less than pool transaction id) but device
is not in the pool.

Similary, it could happen that some data in the pool is corrupted and
during pool repair some devices are lost (without docker knowing about
it). In that case tool pool transaction id will be higher than device
transaction id and there are no guaratees that device is actually in
the pool.

So move away from this model where we think that a device is in pool if pool
transaction id is greater than device transaction Id. Per device
transaction Id just says that after device creation this should be pool's
transaction Id and nothing more.

Transaction id is per pool property (as opposed to per device property) and
will be used internally to figure out if last transaction was complete or
not and recover from failure during docker startup.  

If for some reason metafile is present but device is not in pool, then 
device activation will fail later.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: bb00453e58a86b9787ac4b3e7df3c48d8ddc3f87
Component: engine
2014-12-03 13:06:43 -05:00
7b6399d928 Merge pull request #9006 from snitm/thin-pool-improvements
Thin pool improvements
Upstream-commit: b47ff77b5ce852bd830bc617d1c4e2c37e346281
Component: engine
2014-11-26 14:44:09 -05:00
3388d83b40 Fix to avoid a compilation error of size_test.go with GCCGO due to float to int truncation
Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>
Upstream-commit: 82a5cd0d3701fc559fb92290ed6bc2974a9d8b6d
Component: engine
2014-11-25 18:12:22 +09:00
c836e22634 devmapper: cleanup some extraneous branching in setupBaseImage()
Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
Upstream-commit: b9f1b0a7514c6e40e7048fb9206001259eb7c33c
Component: engine
2014-11-24 20:06:41 -05:00
b28ed4ddea devmapper: remove unnecessary else branch in getPoolName()
Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
Upstream-commit: 553b50bd37ade60bfafe5d5cc10f984251741f44
Component: engine
2014-11-21 21:36:23 -05:00
0c37aeb40b Mknod more loopbacks for devmapper
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f8509e7940d73ecc0071faf15a865acb1f8dad52
Component: engine
2014-11-21 16:20:35 -08:00
6149f196a8 pkg/devicemapper: missed MAINTAINERS on split
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 3ec623ee2fc503a6236a7b0edde5dd6abb967e49
Component: engine
2014-11-14 11:12:23 -05:00
e0ca5a198f devmapper: disable discards by default if dm.thinpooldev was specified
User may still enable discards by setting dm.blkdiscard=true

Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
Upstream-commit: e49567ba729001c31fe71e4b715eed8f50d7ded9
Component: engine
2014-11-13 13:37:47 -05:00
17af21f92a devmapper: Add option for specifying an lvm2 created thin-pool device
Ideally lvm2 would be used to create/manage the thin-pool volume that is
then handed to docker to exclusively create/manage the thin and thin
snapshot volumes needed for it's containers.  Managing the thin-pool
outside of docker makes for the most feature-rich method of having
docker utilize device mapper thin provisioning as the backing storage
for docker's containers.  lvm2-based thin-pool management feature
highlights include: automatic or interactive thin-pool resize support,
dynamically change thin-pool features, automatic thinp metadata checking
when lvm2 activates the thin-pool, etc.

Docker will not activate/deactivate the specified thin-pool device but
it will exclusively manage/create thin and thin snapshot volumes in it.

Docker will not take ownership of the specified thin-pool device unless
it has 0 data blocks used and a transaction id of 0.  This should help
guard against using a thin-pool that is already in use.

Also fix typos in setupBaseImage() relative to the thin volume type of
the base image.

Docker-DCO-1.1-Signed-off-by: Mike Snitzer <snitzer@redhat.com> (github: snitm)
Upstream-commit: 2b10749cdd0939e4b9e6e18e160984129d733663
Component: engine
2014-11-12 21:03:04 -05:00
90c31c6725 Merge pull request #8986 from vbatts/vbatts-pkg_devicemapper_bindings
devicemapper: split out devicemapper bindings
Upstream-commit: 42861f3b45733268da674b82bceb6deef67b5513
Component: engine
2014-11-12 19:59:36 -05:00
d82839394f Merge pull request #8982 from rhvgoyal/save-restore-device-id
Save restore device Id: issue #8978
Upstream-commit: 9670871e0166658c5b6982d3ccf79a82afb9442c
Component: engine
2014-11-12 15:41:27 -08:00
957b4d5684 devmapper: Take care of some review comments
Took care of some review comments from crosbymichael.

v2:
- Return "err = nil" if file deviceset-metadata file does not exist.
- Use json.Decoder() interface for loading deviceset metadata.

v3:
- Reverted back to json marshal interface in loadDeviceSetMetaData().

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 15c74bebc1ea2d51612b5809b4477551547a8b3d
Component: engine
2014-11-12 09:36:32 -05:00
65be102bc2 docker-remove-redundant-json-tags
In previous patch I had introduce json:"-" tags to be on safer side to make
sure certain fields are not marshalled/unmarshalled. But struct fields
starting with small letter are not exported so they will not be marshalled
anyway. So remove json:"-" tags from there.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 0f57c902450b1d4f7a676dc693689debca002e98
Component: engine
2014-11-06 15:59:25 -05:00
b19230c3ba devmapper: add vbatts to MAINTAINERS
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 2fbfa29318f66aac131bdddd9b32f28b7b7e508a
Component: engine
2014-11-06 14:06:52 -05:00
5bc67250c6 devicemapper: split out devicemapper bindings
This is a first pass at splitting out devicemapper into separate, usable
bindings.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: e2f8fbfbcc450432536e387777b1ff080c94a948
Component: engine
2014-11-05 18:10:38 -05:00
9b64c7701c devmapper: Fix gofmt related build failures
My pull request failed the build due to gofmat issues. I have run gofmt
on specified files and this commit fixes it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: ff56531de47c08157b2a37e6c6b6189a5006dba2
Component: engine
2014-11-05 14:39:54 -05:00
71157e5ee3 devmapper: Save and restore NextDeviceId in a file
The way thin-pool right now is designed, user space is supposed to keep
track of what device ids have already been used. If user space tries to
create a new thin/snap device and device id has already been used, thin
pool retuns -EEXIST.

Upon receiving -EEXIST, current docker implementation simply tries the
NextDeviceId++ and keeps on doing this till it finds a free device id.

This approach has two issues.

- It is little suboptimal.
- If device id already exists, current kenrel implementation spits out
  a messsage on console.

[17991.140135] device-mapper: thin: Creation of new snapshot 33 of device 3 failed.

Here kenrel is trying to tell user that device id 33 has already been used.
And this shows up for every device id docker tries till it reaches a point
where device ids are not used. So if there are thousands of container and
one is trying to create a new container after fresh docker start, expect
thousands of such warnings to flood console.

This patch saves the NextDeviceId in a file in
/var/lib/docker/devmapper/metadata/deviceset-metadata and reads it back
when docker starts. This way we don't retry lots of device ids which 
have already been used. 

There might be some device ids which are free but we will get back to them
once device numbers wrap around (24bit limit on device ids).

This patch should cut down on number of kernel warnings.

Notice that I am creating a deviceset metadata file which is a global file
for this pool. So down the line if we need to save more data we should be
able to do that.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 8c9e5e5e05f8ddfcf8cd5218edb83d9fe8238d81
Component: engine
2014-11-05 09:25:02 -05:00
e178fdae88 devmapper: Export nextDeviceId so that json.Marshal() can operate on it
I was trying to save nextDeviceId to a file but it would not work and
json.Marshal() will do nothing. Then some search showed that I need to
make first letter of struct field capital, exporting this field and
now json.Marshal() works.

This is a preparatory patch for the next one.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 8e9a18039be6ade0b8db65f7f298959055d86192
Component: engine
2014-11-05 09:25:02 -05:00
cbe4b0091a 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>
Upstream-commit: 67fbd34d8379a1b8232aea5d126a389f64bdc59a
Component: engine
2014-11-05 09:25:02 -05:00
4e9f4b9a1b mount: move the MakePrivate to pkg/mount
The logic is unrelated to graphdriver.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 930a756ad55ad5f4e5e6391b41673743d7254c2b
Component: engine
2014-10-30 17:04:56 -04:00
bad39206ea Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: ee7dd44c017458c8fe0be8e09569b1238366dca3
Component: engine
2014-10-24 15:11:48 -07:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
cde87628c0 Merge pull request #8232 from vbatts/vbatts-devmapper_getDeps
devmapper: include dm_deps information in debug
Upstream-commit: 2f9ffe5b6ac1c547d1b5c228637007b05af48a3f
Component: engine
2014-10-16 14:13:21 -07:00
6e9ab87c7d devmapper: include the version in info
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 5630d466b28283c4d52ecfa5859a67112e8ccaa4
Component: engine
2014-09-25 15:51:02 -04:00
237330891b devmapper: include dm_deps information in debug
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 8e7aa44f0e610f471dec9dd232599b4b9cba80b2
Component: engine
2014-09-25 10:59:23 -04:00
dd5abc97c6 devmapper: resizepool hardcodes files as well
Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 636e8561a86ffba909790e9188ffe282770570f0
Component: engine
2014-09-22 17:03:31 -04:00
b69ca50509 devmapper: docker info devices hard coded
If `--storage-opt dm.datadev=/dev/loop0 --storage-opt
dm.metadatadev=/dev/loop1 ` were provided, the information was not
reflected in the information output.

Closes: #7137

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 7e9ba22dc358196ac0d13524aa05677327f19ff9
Component: engine
2014-09-22 16:40:20 -04:00
ec0fc2a729 graphdriver interface name change, typo fix
Signed-off-by: Josh Hawn <josh.hawn@docker.com>
Upstream-commit: 09ad65ebd5b50fdd7621f42136278102586a7ea8
Component: engine
2014-09-16 15:10:32 -07:00
861f46b221 Refactor use of graphdriver.Differ
Some graphdrivers are Differs and type assertions are made
in various places throughout the project. Differ offers some
convenience in generating/applying diffs of filesystem layers
but for most graphdrivers another code path is taken.

This patch brings all of the logic related to filesystem
diffs in one place, and simplifies the implementation of some
common types like Image, Daemon, and Container.

Signed-off-by: Josh Hawn <josh.hawn@docker.com>
Upstream-commit: dee6b481fe0da1d845261ffff2e610fb05898d3c
Component: engine
2014-09-16 15:10:32 -07:00