• Yan, Zheng's avatar
    ceph: choose readdir frag based on previous readdir reply · b50c2de5
    Yan, Zheng authored
    The dirfragtree is lazily updated, it's not always accurate. Infinite
    loops happens in following circumstance.
    - client send request to read frag A
    - frag A has been fragmented into frag B and C. So mds fills the reply
      with contents of frag B
    - client wants to read next frag C. ceph_choose_frag(frag value of C)
      return frag A.
    The fix is using previous readdir reply to calculate next readdir frag
    when possible.
    Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
dir.c 39.8 KB