• Chengguang Xu's avatar
    ceph: optimize memory usage · bb48bd4d
    Chengguang Xu authored
    In current code, regular file and directory use same struct
    ceph_file_info to store fs specific data so the struct has to
    include some fields which are only used for directory
    (e.g., readdir related info), when having plenty of regular files,
    it will lead to memory waste.
    
    This patch introduces dedicated ceph_dir_file_info cache for
    readdir related thins. So that regular file does not include those
    unused fields anymore.
    Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
    Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    bb48bd4d
file.c 44.5 KB