• Ilya Dryomov's avatar
    libceph: eliminate overflows in ceph_calc_file_object_mapping() · db2196a5
    Ilya Dryomov authored
    bl, stripeno and objsetno should be u64 -- otherwise large enough files
    get corrupted.  How large depends on file layout:
    
    - 4M-objects layout (default): any file over 16P
    - 64K-objects layout (smallest possible object size): any file over 512T
    
    Only CephFS is affected, rbd doesn't use ceph_calc_file_object_mapping()
    yet.  Fortunately, CephFS has a max_file_size configurable, the default
    for which is way below both of the above numbers.
    
    Reimplement the logic from scratch with no layout validation -- it's
    done on the MDS side.
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    Reviewed-by: default avatarAlex Elder <elder@linaro.org>
    db2196a5
osdmap.c 61.3 KB