ceph: using hash value to compose dentry offset
If MDS sorts dentries in dirfrag in hash order, we use hash value to compose dentry offset. dentry offset is: (0xff << 52) | ((24 bits hash) << 28) | (the nth entry hash hash collision) This offset is stable across directory fragmentation. This alos means there is no need to reset readdir offset if directory get fragmented in the middle of readdir. Signed-off-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
parent
076c40f18d
commit
f3c4ebe65e
6 changed files with 136 additions and 47 deletions
|
|
@ -357,6 +357,7 @@ extern const char *ceph_mds_op_name(int op);
|
|||
*/
|
||||
#define CEPH_READDIR_FRAG_END (1<<0)
|
||||
#define CEPH_READDIR_FRAG_COMPLETE (1<<8)
|
||||
#define CEPH_READDIR_HASH_ORDER (1<<9)
|
||||
|
||||
union ceph_mds_request_args {
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue