Lines Matching refs:file_offset
102 uint64_t file_offset; member
109 return (f1->file_offset - f2->file_offset); in offset_cmp()
119 struct file_offset_head file_offset; member
128 uint64_t *file_offset) in get_file_offset() argument
135 RB_FOREACH_SAFE(offset, file_offset_head, &priv_user->file_offset, in get_file_offset()
139 *file_offset = offset->file_offset + offset->count * in get_file_offset()
143 &priv_user->file_offset, offset); in get_file_offset()
157 uint64_t file_offset) in put_file_offset() argument
162 offset->file_offset = file_offset; in put_file_offset()
166 RB_INSERT(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
167 offset_nxt = RB_NEXT(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
168 offset_prv = RB_PREV(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
170 offset_nxt->file_offset == offset->file_offset + offset->count * in put_file_offset()
173 RB_REMOVE(file_offset_head, &priv_user->file_offset, in put_file_offset()
178 offset->file_offset == offset_prv->file_offset + offset_prv->count * in put_file_offset()
181 RB_REMOVE(file_offset_head, &priv_user->file_offset, offset); in put_file_offset()
344 uint64_t file_offset; in gntdev_alloc_gref() local
358 error = get_file_offset(priv_user, arg->count, &file_offset); in gntdev_alloc_gref()
366 grefs[i].file_index = file_offset + i * PAGE_SIZE; in gntdev_alloc_gref()
388 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()