Lines Matching refs:file_offset
104 uint64_t file_offset; member
111 return (f1->file_offset - f2->file_offset); in offset_cmp()
121 struct file_offset_head file_offset; member
130 uint64_t *file_offset) in get_file_offset() argument
137 RB_FOREACH_SAFE(offset, file_offset_head, &priv_user->file_offset, in get_file_offset()
141 *file_offset = offset->file_offset + offset->count * in get_file_offset()
145 &priv_user->file_offset, offset); in get_file_offset()
159 uint64_t file_offset) in put_file_offset() argument
164 offset->file_offset = file_offset; in put_file_offset()
168 RB_INSERT(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
169 offset_nxt = RB_NEXT(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
170 offset_prv = RB_PREV(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
172 offset_nxt->file_offset == offset->file_offset + offset->count * in put_file_offset()
175 RB_REMOVE(file_offset_head, &priv_user->file_offset, in put_file_offset()
180 offset->file_offset == offset_prv->file_offset + offset_prv->count * in put_file_offset()
183 RB_REMOVE(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
346 uint64_t file_offset; in gntdev_alloc_gref() local
360 error = get_file_offset(priv_user, arg->count, &file_offset); in gntdev_alloc_gref()
368 grefs[i].file_index = file_offset + i * PAGE_SIZE; in gntdev_alloc_gref()
408 arg->index = file_offset; in gntdev_alloc_gref()
974 RB_FOREACH_SAFE(offset, file_offset_head, &priv_user->file_offset, in per_user_data_dtor()
976 RB_REMOVE(file_offset_head, &priv_user->file_offset, offset); in per_user_data_dtor()
998 RB_INIT(&priv_user->file_offset); in gntdev_open()
1000 offset->file_offset = 0; in gntdev_open()
1002 RB_INSERT(file_offset_head, &priv_user->file_offset, offset); in gntdev_open()