Skip to content

Commit

Permalink
client: Add explicit values for VXattr.setxattr_cb
Browse files Browse the repository at this point in the history
Add setxattr_cb: nullptr where we don't initialize that field. This is
necessary on older compilers that expect fields in declaration order.
Otherwise they fail with "non-trivial designated initializers not
supported".

Signed-off-by: Marcel Lauhoff <[email protected]>
  • Loading branch information
Marcel Lauhoff committed Nov 22, 2023
1 parent 280dbd4 commit 890ddf1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13352,6 +13352,7 @@ size_t Client::_vxattrcb_client_id(Inode *in, char *val, size_t size)
{ \
name: CEPH_XATTR_NAME(_type, _name), \
getxattr_cb: &Client::_vxattrcb_ ## _type ## _ ## _name, \
setxattr_cb: nullptr, \
readonly: true, \
exists_cb: NULL, \
flags: _flags, \
Expand All @@ -13360,6 +13361,7 @@ size_t Client::_vxattrcb_client_id(Inode *in, char *val, size_t size)
{ \
name: CEPH_XATTR_NAME2(_type, _name, _field), \
getxattr_cb: &Client::_vxattrcb_ ## _name ## _ ## _field, \
setxattr_cb: nullptr, \
readonly: false, \
exists_cb: &Client::_vxattrcb_layout_exists, \
flags: 0, \
Expand All @@ -13368,6 +13370,7 @@ size_t Client::_vxattrcb_client_id(Inode *in, char *val, size_t size)
{ \
name: CEPH_XATTR_NAME(_type, _name), \
getxattr_cb: &Client::_vxattrcb_ ## _type ## _ ## _name, \
setxattr_cb: nullptr, \
readonly: false, \
exists_cb: &Client::_vxattrcb_quota_exists, \
flags: 0, \
Expand All @@ -13377,6 +13380,7 @@ const Client::VXattr Client::_dir_vxattrs[] = {
{
name: "ceph.dir.layout",
getxattr_cb: &Client::_vxattrcb_layout,
setxattr_cb: nullptr,
readonly: false,
exists_cb: &Client::_vxattrcb_layout_exists,
flags: 0,
Expand All @@ -13400,6 +13404,7 @@ const Client::VXattr Client::_dir_vxattrs[] = {
{
name: "ceph.quota",
getxattr_cb: &Client::_vxattrcb_quota,
setxattr_cb: nullptr,
readonly: false,
exists_cb: &Client::_vxattrcb_quota_exists,
flags: 0,
Expand All @@ -13411,20 +13416,23 @@ const Client::VXattr Client::_dir_vxattrs[] = {
{
name: "ceph.dir.pin",
getxattr_cb: &Client::_vxattrcb_dir_pin,
setxattr_cb: nullptr,
readonly: false,
exists_cb: &Client::_vxattrcb_dir_pin_exists,
flags: 0,
},
{
name: "ceph.snap.btime",
getxattr_cb: &Client::_vxattrcb_snap_btime,
setxattr_cb: nullptr,
readonly: true,
exists_cb: &Client::_vxattrcb_snap_btime_exists,
flags: 0,
},
{
name: "ceph.mirror.info",
getxattr_cb: &Client::_vxattrcb_mirror_info,
setxattr_cb: nullptr,
readonly: false,
exists_cb: &Client::_vxattrcb_mirror_info_exists,
flags: 0,
Expand All @@ -13436,6 +13444,7 @@ const Client::VXattr Client::_file_vxattrs[] = {
{
name: "ceph.file.layout",
getxattr_cb: &Client::_vxattrcb_layout,
setxattr_cb: nullptr,
readonly: false,
exists_cb: &Client::_vxattrcb_layout_exists,
flags: 0,
Expand All @@ -13448,6 +13457,7 @@ const Client::VXattr Client::_file_vxattrs[] = {
{
name: "ceph.snap.btime",
getxattr_cb: &Client::_vxattrcb_snap_btime,
setxattr_cb: nullptr,
readonly: true,
exists_cb: &Client::_vxattrcb_snap_btime_exists,
flags: 0,
Expand All @@ -13459,13 +13469,15 @@ const Client::VXattr Client::_common_vxattrs[] = {
{
name: "ceph.cluster_fsid",
getxattr_cb: &Client::_vxattrcb_cluster_fsid,
setxattr_cb: nullptr,
readonly: true,
exists_cb: nullptr,
flags: 0,
},
{
name: "ceph.client_id",
getxattr_cb: &Client::_vxattrcb_client_id,
setxattr_cb: nullptr,
readonly: true,
exists_cb: nullptr,
flags: 0,
Expand Down

0 comments on commit 890ddf1

Please sign in to comment.