storage: conf: Don't set any default <mode> in the XML
authorCole Robinson <crobinso@redhat.com>
Mon, 27 Apr 2015 20:48:05 +0000 (16:48 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 26 May 2015 00:52:55 +0000 (20:52 -0400)
commit7c2d65dde2595c07d56aad1e043f7b1836592d89
tree8de783590b0a6440d88aa9fe8d412eb261bb8bf7
parentfafcc818f14893a259fb51390d5a00065bf87f50
storage: conf: Don't set any default <mode> in the XML

The XML parser sets a default <mode> if none is explicitly passed in.
This is then used at pool/vol creation time, and unconditionally reported
in the XML.

The problem with this approach is that it's impossible for other code
to determine if the user explicitly requested a storage mode. There
are some cases where we want to make this distinction, but we currently
can't.

Handle <mode> parsing like we handle <owner>/<group>: if no value is
passed in, set it to -1, and adjust the internal consumers to handle
it.
docs/formatstorage.html.in
docs/schemas/storagecommon.rng
src/conf/storage_conf.c
src/storage/storage_backend.c
src/storage/storage_backend.h
src/storage/storage_backend_fs.c
src/storage/storage_backend_logical.c
tests/storagepoolxml2xmlout/pool-netfs-gluster.xml
tests/storagevolxml2xmlout/vol-gluster-dir.xml
tests/storagevolxml2xmlout/vol-sheepdog.xml