Merge pull request #19 from mnederlof/add-discard-support-ceph
Add discard support for ceph backends
diff --git a/README.rst b/README.rst
index 73f684b..10c3c73 100644
--- a/README.rst
+++ b/README.rst
@@ -355,6 +355,7 @@
user: cinder
secret_uuid: da74ccb7-aa59-1721-a172-0006b1aa4e3e
client_cinder_key: AQDOavlU6BsSJhAAnpFR906mvdgdfRqLHwu0Uw==
+ report_discard_supported: True
http://ceph.com/docs/master/rbd/rbd-openstack/
diff --git a/cinder/files/backend/_ceph.conf b/cinder/files/backend/_ceph.conf
index c57483d..524bb6b 100644
--- a/cinder/files/backend/_ceph.conf
+++ b/cinder/files/backend/_ceph.conf
@@ -47,3 +47,9 @@
# cluster. If value < 0, no timeout is set and default
# librados value is used. (integer value)
#rados_connect_timeout=-1
+
+# Report to clients of Cinder that the backend supports discard (aka.
+# trim/unmap). This will not actually change the behavior of the backend or the
+# client directly, it will only notify that it can be used. (boolean value)
+#report_discard_supported = false
+report_discard_supported={{ backend.get('report_discard_supported', False)|lower }}