This patch also supports writing to a temporary file and renaming
rather than appending to an existing file. This helps in avoiding
inconsistent files.
AppendFile ensures that it appends the entire buffer. Returns
an error otherwise, this patch removes the necessity for the
caller to look for 'n' return on short writes.
Ref #1893
Fixes#1636
New format now generates a UUID and includes it along with
the order of disks. So that UUID is the real order of disks
and on command line user is able to specify disks in any order.
This pre-dominantly solves our dilemma.
```
{
"format" : "xl",
"xl" : {
"version" : "1",
"disk": "00e4cf06-5bf5-4bb5-b885-4b2fff4a7959",
"jbod" : [
"00e4cf06-5bf5-4bb5-b885-4b2fff4a7959",
....
"c47d2608-5067-4ed7-b1e4-fb81bdbb549f",
"a543293e-99f1-4310-b540-1e450878e844",
"18f97cbe-529a-456a-b6d4-0feacf64534d"
]
},
"version" : "1"
}
```
When server is run with multiple disks which uses xl interface where
order and count of disks are important, this patch saves such disks
configuration and compares in next run if there is a mismatch.
Fixes#1458