mapper: Change order when writing map.
authorFilippos Giannakos <philipgian@grnet.gr>
Fri, 24 Jan 2014 16:14:24 +0000 (18:14 +0200)
committerFilippos Giannakos <philipgian@grnet.gr>
Tue, 28 Jan 2014 15:03:06 +0000 (17:03 +0200)
commit0902228c89d0b44c3e14db6a3fa4e5a4515d466b
tree6a8784e112d510c393584abd99e686e100a178fa
parentc4e8e7282745ef39a505e54eec86a22017b1ec4d
mapper: Change order when writing map.

When writing a map, change the order in which the map metadata and map data are
written. The map metadata is a small block of bytes while the map data can
consist of larger blocks. By doing so, and by always reading the map in the
reverse order (that is first the metadata and then the data), we can create the
illusion of atomic map creation. A map where the metadata have not been written
yet, it can not be loaded and thus cannot get partial data.
xseg/peers/user/mapper-handling.c