diff options
author | Jeff Layton <jlayton@kernel.org> | 2019-05-06 09:38:47 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-05-07 13:43:05 -0400 |
commit | b726ec972cf2122137fbc47847b4fcc7b3bc2801 (patch) | |
tree | cb991782dce8513dbbcf66c2cdcbb2681ec53d58 /fs/ceph | |
parent | cede185b1ba3118e1912385db4812a37d9e9b205 (diff) |
libceph: make ceph_pr_addr take an struct ceph_entity_addr pointer
GCC9 is throwing a lot of warnings about unaligned accesses by
callers of ceph_pr_addr. All of the current callers are passing a
pointer to the sockaddr inside struct ceph_entity_addr.
Fix it to take a pointer to a struct ceph_entity_addr instead,
and then have the function make a copy of the sockaddr before
printing it.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/debugfs.c | 2 | ||||
-rw-r--r-- | fs/ceph/mdsmap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index b014fc7d4e3c..b3fc5fe26a1a 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c | |||
@@ -37,7 +37,7 @@ static int mdsmap_show(struct seq_file *s, void *p) | |||
37 | struct ceph_entity_addr *addr = &mdsmap->m_info[i].addr; | 37 | struct ceph_entity_addr *addr = &mdsmap->m_info[i].addr; |
38 | int state = mdsmap->m_info[i].state; | 38 | int state = mdsmap->m_info[i].state; |
39 | seq_printf(s, "\tmds%d\t%s\t(%s)\n", i, | 39 | seq_printf(s, "\tmds%d\t%s\t(%s)\n", i, |
40 | ceph_pr_addr(&addr->in_addr), | 40 | ceph_pr_addr(addr), |
41 | ceph_mds_state_name(state)); | 41 | ceph_mds_state_name(state)); |
42 | } | 42 | } |
43 | return 0; | 43 | return 0; |
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c index 1a2c5d390f7f..701b4fb0fb5a 100644 --- a/fs/ceph/mdsmap.c +++ b/fs/ceph/mdsmap.c | |||
@@ -205,7 +205,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end) | |||
205 | 205 | ||
206 | dout("mdsmap_decode %d/%d %lld mds%d.%d %s %s\n", | 206 | dout("mdsmap_decode %d/%d %lld mds%d.%d %s %s\n", |
207 | i+1, n, global_id, mds, inc, | 207 | i+1, n, global_id, mds, inc, |
208 | ceph_pr_addr(&addr.in_addr), | 208 | ceph_pr_addr(&addr), |
209 | ceph_mds_state_name(state)); | 209 | ceph_mds_state_name(state)); |
210 | 210 | ||
211 | if (mds < 0 || state <= 0) | 211 | if (mds < 0 || state <= 0) |