Re: [PATCH] crush: fix a bug in tree bucket decode

2015-06-30 Thread Josh Durgin
On 06/29/2015 10:17 AM, Ilya Dryomov wrote: struct crush_bucket_tree::num_nodes is u8, so ceph_decode_8_safe() should be used. -Wconversion catches this, but I guess it went unnoticed in all the noise it spews. The actual problem (at least for common crushmaps) isn't the u32 -> u8 truncation th

[PATCH] crush: fix a bug in tree bucket decode

2015-06-29 Thread Ilya Dryomov
struct crush_bucket_tree::num_nodes is u8, so ceph_decode_8_safe() should be used. -Wconversion catches this, but I guess it went unnoticed in all the noise it spews. The actual problem (at least for common crushmaps) isn't the u32 -> u8 truncation though - it's the advancement by 4 bytes insead