CA-184700: Refine initial_allocation for clone and snapshot
CA-184700: Refine initial_allocation for clone and snapshot

From: Stefano Panella <Stefano.Panella@citrix.com>

Existing code was not very precise in case on thin lvhd snapshot
and clone operation, also the value for initial_allocation
was not saved in sm_config.

Now we differentiate between snapshot and clone operation.

In case of snapshot the new two VDIs created are
1) leaf for existing VM -> ia = SR initial_allocation
2) snapshoot            -> ia = 0

In case of clone the new two VDIs created are:
1) leaf for existing VM -> ia = SR initial_allocation
2) leaf for new VM      -> ia = SR initial_allocation

The initial_allocation for these new VDIs is also saved in
their sm_config.

Signed-off-by: Stefano Panella <e1ed83fdabd8cb12bfc02b8141515b791627b7e3@citrix.com>
Reviewed-by: Jorge Martin <c3f1e05fcce351010b03bf05816137fb1dc5c7f2@citrix.com>

kostaslamda/sm,xapi-project/sm,pritha-srivastava/sm,germanop/sm,pritha-srivastava/sm,xapi-project/sm,germanop/sm,chandrikas/sm,pritha-srivastava/sm,germanop/sm,kostaslamda/sm,kostaslamda/sm,chandrikas/sm,xapi-project/sm,chandrikas/sm