From be52a01c4944af2ed78d171d3d8ac3c99295c41d Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 19 Feb 2016 15:06:12 -0600 Subject: [PATCH] Add tunable to use object map for xattrs Defaults to true if using ext4, false otherwise, and can be explicitly overridden if desired. --- group_vars/all.sample | 7 +++++++ roles/ceph-common/defaults/main.yml | 7 +++++++ roles/ceph-common/templates/ceph.conf.j2 | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/group_vars/all.sample b/group_vars/all.sample index 9b6d4cdcb..7f2bb7f87 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -186,6 +186,13 @@ dummy: # Object backend #osd_objectstore: filestore +# xattrs. by default, 'filestore xattr use omap' is set to 'true' if +# 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can +# be set to 'true' or 'false' to explicitly override those +# defaults. Leave it 'null' to use the default for your chosen mkfs +# type. +# filestore_xattr_use_omap: null + # Performance tuning #filestore_merge_threshold: 40 #filestore_split_multiple: 8 diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index ecaf45d59..df341e939 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -198,6 +198,13 @@ osd_crush_update_on_start: "true" # Object backend osd_objectstore: filestore +# xattrs. by default, 'filestore xattr use omap' is set to 'true' if +# 'osd_mkfs_type' is set to 'ext4'; otherwise it isn't set. This can +# be set to 'true' or 'false' to explicitly override those +# defaults. Leave it 'null' to use the default for your chosen mkfs +# type. +filestore_xattr_use_omap: null + # Performance tuning filestore_merge_threshold: 40 filestore_split_multiple: 8 diff --git a/roles/ceph-common/templates/ceph.conf.j2 b/roles/ceph-common/templates/ceph.conf.j2 index c348acff0..b0c148f06 100644 --- a/roles/ceph-common/templates/ceph.conf.j2 +++ b/roles/ceph-common/templates/ceph.conf.j2 @@ -114,6 +114,12 @@ filestore split multiple = {{ filestore_split_multiple }} osd op threads = {{ osd_op_threads }} filestore op threads = {{ filestore_op_threads }} filestore max sync interval = {{ filestore_max_sync_interval }} +{% if filestore_xattr_use_omap != None %} +filestore xattr use omap = {{ filestore_xattr_use_omap }} +{% elif osd_mkfs_type == "ext4" %} +filestore xattr use omap = true +{# else, default is false #} +{% endif %} osd max scrubs = {{ osd_max_scrubs }} {% if ceph_stable_release not in ['argonaut','bobtail','cuttlefish','dumpling','emperor','firefly','giant'] %} osd scrub begin hour = {{ osd_scrub_begin_hour }}