v2: properly handle later versions in entity_addr decoder internally track addresses as TYPE_LEGACY instead of TYPE_NONE minor cleanup and log changes This is the second posting of this set. This one should handle decoding later versions of the entity_addr_t struct, should there ever be any (thanks, Zheng!). This also breaks up that decoder into smaller helper functions, and changes how we track the addresses internally for better compatibility going forward. Original patch description follows: ------------------------8<------------------------- CEPH_FEATURE_MSG_ADDR2 was added to the userland code a couple of years ago, but the kclient never got support for it. While addr2 doesn't add a lot of new functionality, it is a prerequisite for msgr2 support, which we will eventually need, and the feature bit is shared with CEPH_FEATURE_FS_BTIME and CEPH_FEATURE_FS_CHANGE_ATTR. This set adds support for all of three features (necessary since the bit is shared). I've also added support for querying birthtime via statx(). I was able to do a cephfs mount and ran xfstests on it, but some of the more obscure messages haven't yet been tested. Birthtime support works as expected, but I don't have a great way to test the change attribute. We don't set SB_I_VERSION, so none of the internal kernel users will rely on it, and that value is not exposed to userspace via statx (yet). Given that, we could leave off the last 4 patches for now. Jeff Layton (18): libceph: fix sa_family just after reading address libceph: add ceph_decode_entity_addr libceph: ADDR2 support for monmap libceph: switch osdmap decoding to use ceph_decode_entity_addr libceph: fix watch_item_t decoding to use ceph_decode_entity_addr libceph: correctly decode ADDR2 addresses in incremental OSD maps ceph: have MDS map decoding use entity_addr_t decoder ceph: fix decode_locker to use ceph_decode_entity_addr libceph: use TYPE_LEGACY for entity addrs instead of TYPE_NONE libceph: rename ceph_encode_addr to ceph_encode_banner_addr ceph: add btime field to ceph_inode_info ceph: handle btime in cap messages libceph: turn on CEPH_FEATURE_MSG_ADDR2 ceph: allow querying of STATX_BTIME in ceph_getattr iversion: add a routine to update a raw value with a larger one ceph: add change_attr field to ceph_inode_info ceph: handle change_attr in cap messages ceph: increment change_attribute on local changes fs/ceph/addr.c | 2 + fs/ceph/caps.c | 37 +++++++------ fs/ceph/file.c | 5 ++ fs/ceph/inode.c | 23 ++++++-- fs/ceph/mds_client.c | 21 +++++--- fs/ceph/mds_client.h | 2 + fs/ceph/mdsmap.c | 12 +++-- fs/ceph/snap.c | 3 ++ fs/ceph/super.h | 4 +- include/linux/ceph/ceph_features.h | 1 + include/linux/ceph/decode.h | 13 ++++- include/linux/ceph/mon_client.h | 1 - include/linux/iversion.h | 24 +++++++++ net/ceph/Makefile | 2 +- net/ceph/cls_lock_client.c | 7 ++- net/ceph/decode.c | 86 ++++++++++++++++++++++++++++++ net/ceph/messenger.c | 14 ++--- net/ceph/mon_client.c | 21 +++++--- net/ceph/osd_client.c | 20 ++++--- net/ceph/osdmap.c | 31 ++++++----- 20 files changed, 258 insertions(+), 71 deletions(-) create mode 100644 net/ceph/decode.c -- 2.21.0