Lines Matching defs:ofs
85 return (tdi1->tmpnode->node->ofs - tdi2->tmpnode->node->ofs);
92 uint64_t ofs = *(const uint64_t *)key;
94 return (tdi->tmpnode->node->ofs - ofs);
112 return (frag1->ofs - frag2->ofs);
119 uint64_t ofs = *(const uint64_t *)key;
121 return (frag->ofs - ofs);
147 uint64_t ofs;
154 ofs = CHFS_GET_OFS(nref->nref_offset) + sizeof(struct chfs_flash_data_node);
161 err = chfs_read_leb(chmp, nref->nref_lnr, buf, ofs, len, &retlen);
323 uint64_t end_ofs = newtd->node->ofs + newtd->node->size;
328 node = rb_tree_find_node(&rii->tdi_root, &newtd->node->ofs);
344 if (this->tmpnode->node->ofs > end_ofs)
363 tmp_td->node->ofs >= newtd->node->ofs &&
364 tmp_td->node->ofs + tmp_td->node->size <= end_ofs) {
372 while (tmp_td && tmp_td->node->ofs + tmp_td->node->size <= end_ofs) {
395 tmp_td->node->ofs <= newtd->node->ofs &&
396 tmp_td->node->ofs + tmp_td->node->size >= end_ofs) {
401 dbg("this ofs: %llu, size: %u\n",
402 (unsigned long long)tmp_td->node->ofs,
440 if (this->tmpnode->node->ofs + this->tmpnode->node->size > newtd->node->ofs) {
458 while (this && this->tmpnode->node->ofs < end_ofs) {
469 new_fragment(struct chfs_full_dnode *fdn, uint32_t ofs, uint32_t size)
475 newfrag->ofs = ofs;
496 if (lastend < newfrag->node->ofs) {
499 holefrag = new_fragment(NULL, lastend, newfrag->node->ofs - lastend);
527 this = (struct chfs_node_frag *)rb_tree_find_node_leq(fragtree, &newfrag->ofs);
530 lastend = this->ofs + this->size;
536 if (lastend <= newfrag->ofs) {
537 if (lastend && (lastend - 1) >> PAGE_SHIFT == newfrag->ofs >> PAGE_SHIFT) {
545 if (newfrag->ofs > this->ofs) {
550 if (this->ofs + this->size > newfrag->ofs + newfrag->size) {
554 newfrag2 = new_fragment(this->node, newfrag->ofs + newfrag->size,
555 this->ofs + this->size - newfrag->ofs - newfrag->size);
559 this->size = newfrag->ofs - this->ofs;
567 this->size = newfrag->ofs - this->ofs;
575 if (newfrag->ofs + newfrag->size >= this->ofs+this->size) {
578 this->ofs += newfrag->size;
588 while ((this = frag_next(fragtree, newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) {
593 if (!this || newfrag->ofs + newfrag->size == this->ofs)
596 this->size = (this->ofs + this->size) - (newfrag->ofs + newfrag->size);
597 this->ofs = newfrag->ofs + newfrag->size;
666 if (frag && frag->ofs != size) {
667 if (frag->ofs + frag->size > size) {
668 frag->size = size - frag->ofs;
674 while (frag && frag->ofs >= size) {
692 if (frag->ofs + frag->size < size) {
693 return frag->ofs + frag->size;
697 if (frag->node && (frag->ofs & (PAGE_SIZE - 1)) == 0) {
721 dbg("[MARK] lnr: %u ofs: %u\n", this->node->nref->nref_lnr,
750 newfrag = new_fragment(fd, fd->ofs, fd->size);
759 if (newfrag->ofs & (PAGE_SIZE - 1)) {
768 if ((newfrag->ofs+newfrag->size) & (PAGE_SIZE - 1)) {
848 td->node->ofs = le64toh(dnode->offset);
1102 off_t ofs;
1115 ofs = bp->b_blkno * PAGE_SIZE;
1116 frag = (struct chfs_node_frag *)rb_tree_find_node_leq(&ip->fragtree, &ofs);
1118 if (!frag || frag->ofs > ofs || frag->ofs + frag->size <= ofs) {