]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ceph/mds_client.c
ceph: using hash value to compose dentry offset
[mirror_ubuntu-bionic-kernel.git] / fs / ceph / mds_client.c
index 1c2befcd24fb378e03a9a3844e97fb47bbad1871..7ad31283d510bf8036c7160e85f262da4a417eae 100644 (file)
@@ -185,6 +185,7 @@ static int parse_reply_info_dir(void **p, void *end,
                u16 flags = ceph_decode_16(p);
                info->dir_end = !!(flags & CEPH_READDIR_FRAG_END);
                info->dir_complete = !!(flags & CEPH_READDIR_FRAG_COMPLETE);
+               info->hash_order = !!(flags & CEPH_READDIR_HASH_ORDER);
        }
        if (num == 0)
                goto done;
@@ -214,6 +215,8 @@ static int parse_reply_info_dir(void **p, void *end,
                err = parse_reply_info_in(p, end, &rde->inode, features);
                if (err < 0)
                        goto out_bad;
+               /* ceph_readdir_prepopulate() will update it */
+               rde->offset = 0;
                i++;
                num--;
        }