From a54c86f9dfbc0540a36decec38fb50e33c8822d9 Mon Sep 17 00:00:00 2001 From: Brad Hubbard Date: Wed, 28 Sep 2016 14:50:28 +1000 Subject: [PATCH] os/filestore: Fix erroneous WARNING: max attr too small When we read the conf values from the conf file we call handle_conf_change which calls set_xattr_limits_via_conf but this is before m_fs_type is initialised so we fall through to the default comaprison with filestore_max_xattr_value_size_other (1024) and erroneously issue the warning. This happens at every startup but subsequent calls once the filestore is mounted proceed as expected. Don't call set_xattr_limits_via_conf unless the filestore is mounted. Fixes: http://tracker.ceph.com/issues/17420 Signed-off-by: Brad Hubbard --- src/os/filestore/FileStore.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index ff92831486199..d1e32dc3ac7b6 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -5519,8 +5519,10 @@ void FileStore::handle_conf_change(const struct md_config_t *conf, changed.count("filestore_max_xattr_value_size_xfs") || changed.count("filestore_max_xattr_value_size_btrfs") || changed.count("filestore_max_xattr_value_size_other")) { - Mutex::Locker l(lock); - set_xattr_limits_via_conf(); + if (backend) { + Mutex::Locker l(lock); + set_xattr_limits_via_conf(); + } } if (changed.count("filestore_queue_max_bytes") || -- 2.39.5