Lines Matching refs:run_buf
607 static inline void run_pack_s64(u8 *run_buf, u8 size, s64 v) in run_pack_s64() argument
613 run_buf[7] = p[0]; in run_pack_s64()
616 run_buf[6] = p[1]; in run_pack_s64()
619 run_buf[5] = p[2]; in run_pack_s64()
622 run_buf[4] = p[3]; in run_pack_s64()
625 run_buf[3] = p[4]; in run_pack_s64()
628 run_buf[2] = p[5]; in run_pack_s64()
631 run_buf[1] = p[6]; in run_pack_s64()
634 run_buf[0] = p[7]; in run_pack_s64()
639 static inline s64 run_unpack_s64(const u8 *run_buf, u8 size, s64 v) in run_unpack_s64() argument
645 p[0] = run_buf[7]; in run_unpack_s64()
648 p[1] = run_buf[6]; in run_unpack_s64()
651 p[2] = run_buf[5]; in run_unpack_s64()
654 p[3] = run_buf[4]; in run_unpack_s64()
657 p[4] = run_buf[3]; in run_unpack_s64()
660 p[5] = run_buf[2]; in run_unpack_s64()
663 p[6] = run_buf[1]; in run_unpack_s64()
666 p[7] = run_buf[0]; in run_unpack_s64()
702 static inline void run_pack_s64(u8 *run_buf, u8 size, s64 v) in run_pack_s64() argument
709 run_buf[7] = p[7]; in run_pack_s64()
712 run_buf[6] = p[6]; in run_pack_s64()
715 run_buf[5] = p[5]; in run_pack_s64()
718 run_buf[4] = p[4]; in run_pack_s64()
721 run_buf[3] = p[3]; in run_pack_s64()
724 run_buf[2] = p[2]; in run_pack_s64()
727 run_buf[1] = p[1]; in run_pack_s64()
730 run_buf[0] = p[0]; in run_pack_s64()
735 static inline s64 run_unpack_s64(const u8 *run_buf, u8 size, s64 v) in run_unpack_s64() argument
742 p[7] = run_buf[7]; in run_unpack_s64()
745 p[6] = run_buf[6]; in run_unpack_s64()
748 p[5] = run_buf[5]; in run_unpack_s64()
751 p[4] = run_buf[4]; in run_unpack_s64()
754 p[3] = run_buf[3]; in run_unpack_s64()
757 p[2] = run_buf[2]; in run_unpack_s64()
760 p[1] = run_buf[1]; in run_unpack_s64()
763 p[0] = run_buf[0]; in run_unpack_s64()
775 int run_pack(const struct runs_tree *run, CLST svcn, CLST len, u8 *run_buf, in run_pack() argument
829 if (run_buf) { in run_pack()
831 run_buf[0] = ((u8)(size_size | (offset_size << 4))); in run_pack()
832 run_buf += 1; in run_pack()
835 run_pack_s64(run_buf, size_size, len); in run_pack()
837 run_buf += size_size; in run_pack()
839 run_pack_s64(run_buf, offset_size, dlcn); in run_pack()
840 run_buf += offset_size; in run_pack()
859 if (run_buf) in run_pack()
860 run_buf[0] = 0; in run_pack()
874 CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, in run_unpack() argument
888 run_0 = run_buf; in run_unpack()
889 run_last = run_buf + run_buf_size; in run_unpack()
895 while (run_buf < run_last) { in run_unpack()
897 u8 size_size = *run_buf & 0xF; in run_unpack()
899 u8 offset_size = *run_buf++ >> 4; in run_unpack()
915 len = run_unpack_s64(run_buf, size_size, 0); in run_unpack()
917 run_buf += size_size; in run_unpack()
928 dlcn = (run_buf[offset_size - 1] & 0x80) ? (s64)-1 : 0; in run_unpack()
929 dlcn = run_unpack_s64(run_buf, offset_size, dlcn); in run_unpack()
931 run_buf += offset_size; in run_unpack()
989 return run_buf - run_0; in run_unpack()
1001 CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, in run_unpack_ex() argument
1010 ret = run_unpack(run, sbi, ino, svcn, evcn, vcn, run_buf, run_buf_size); in run_unpack_ex()
1084 int run_get_highest_vcn(CLST vcn, const u8 *run_buf, u64 *highest_vcn) in run_get_highest_vcn() argument
1089 while ((size_size = *run_buf & 0xF)) { in run_get_highest_vcn()
1090 u8 offset_size = *run_buf++ >> 4; in run_get_highest_vcn()
1096 len = run_unpack_s64(run_buf, size_size, 0); in run_get_highest_vcn()
1100 run_buf += size_size + offset_size; in run_get_highest_vcn()