Lines Matching defs:cpos

61 				      u32 cpos, u32 old_cluster,
876 u64 cpos, unsigned int len,
889 le32_to_cpu(rec->r_clusters) <= cpos)
891 else if (le64_to_cpu(rec->r_cpos) > cpos)
894 /* ok, cpos fail in this rec. Just return. */
902 ret_rec->r_cpos = cpu_to_le64(cpos);
905 le64_to_cpu(rec->r_cpos) < cpos + len)
907 cpu_to_le32(le64_to_cpu(rec->r_cpos) - cpos);
963 u32 cpos;
981 * We are the last extent rec, so any high cpos should
1003 cpos = le32_to_cpu(eb->h_list.l_recs[index].e_cpos);
1004 ret = ocfs2_find_path(ci, left_path, cpos);
1017 ret = ocfs2_find_cpos_for_right_leaf(sb, left_path, &cpos);
1023 ret = ocfs2_find_path(ci, right_path, cpos);
1050 * Given a cpos and len, try to find the refcount record which contains cpos.
1051 * 1. If cpos can be found in one refcount record, return the record.
1052 * 2. If cpos can't be found, return a fake record which start from cpos
1053 * and end at a small value between cpos+len and start of the next record.
1058 u64 cpos, unsigned int len,
1074 ocfs2_find_refcount_rec_in_rl(ci, ref_root_bh, cpos, len,
1082 low_cpos = cpos & OCFS2_32BIT_POS_MASK;
1132 ocfs2_find_refcount_rec_in_rl(ci, ref_leaf_bh, cpos, len,
1403 * The refcount cpos are ordered by their 64bit cpos,
1407 * Note: The refcount block is already sorted by their low 32 bit cpos,
1451 u32 cpos = 0;
1465 * If we know all the high 32 bit cpos is the same, no need to sort.
1468 * 1. sort the entries by their low 32 bit cpos first so that we can
1469 * find the split cpos easily.
1472 * 4. sort the entries by their 64 bit cpos.
1479 ret = ocfs2_find_refcount_split_pos(rl, &cpos, &split_index);
1485 new_rb->rf_cpos = cpu_to_le32(cpos);
1508 *split_cpos = cpos;
1597 /* Insert the new leaf block with the specific offset cpos. */
1751 u64 cpos = le64_to_cpu(rec->r_cpos);
1762 cpos, len, NULL, &index,
1878 u64 cpos = le64_to_cpu(orig_rec->r_cpos);
1888 * We have to re-get it since now cpos may be moved to
1892 cpos, len, &tmp_rec, &index,
1981 u64 cpos, u32 len, int merge,
1992 (unsigned long long)cpos, len);
1996 cpos, len, &rec, &index,
2015 if (rec.r_refcount && le64_to_cpu(rec.r_cpos) == cpos &&
2018 (unsigned long long)cpos, set_len,
2042 set_len = min((u64)(cpos + len),
2043 le64_to_cpu(rec.r_cpos) + set_len) - cpos;
2044 rec.r_cpos = cpu_to_le64(cpos);
2061 cpos += set_len;
2155 u64 cpos, u32 len,
2160 cpos, len, 1,
2168 int index, u64 cpos, unsigned int len,
2177 BUG_ON(cpos < le64_to_cpu(rec->r_cpos));
2178 BUG_ON(cpos + len >
2183 (unsigned long long)cpos, len);
2185 if (cpos == le64_to_cpu(rec->r_cpos) &&
2191 split.r_cpos = cpu_to_le64(cpos);
2223 u64 cpos, u32 len,
2236 (unsigned long long)cpos, len, delete);
2240 cpos, len, &rec, &index,
2252 r_len = min((u64)(cpos + len), le64_to_cpu(rec.r_cpos) +
2253 le32_to_cpu(rec.r_clusters)) - cpos;
2257 cpos, r_len,
2266 ocfs2_clusters_to_blocks(sb, cpos),
2274 cpos += r_len;
2287 handle_t *handle, u32 cpos, u32 len,
2319 cpos, len, meta_ac, dealloc, delete);
2328 * Mark the already-existing extent at cpos as refcounted for len clusters.
2338 handle_t *handle, u32 cpos,
2346 cpos, len, phys);
2354 ret = ocfs2_change_extent_flag(handle, et, cpos,
2377 u64 cpos = start_cpos;
2385 cpos, clusters, &rec,
2415 recs_add, (unsigned long long)cpos, clusters,
2420 len = min((u64)cpos + clusters, le64_to_cpu(rec.r_cpos) +
2421 le32_to_cpu(rec.r_clusters)) - cpos;
2444 if (cpos == start_cpos &&
2445 cpos != le64_to_cpu(rec.r_cpos))
2449 if (cpos + clusters < le64_to_cpu(rec.r_cpos) +
2458 cpos += len;
2583 * Given an extent that starts at 'start' and an I/O that starts at 'cpos',
2584 * find an offset (start + (n * contig_clusters)) that is closest to cpos
2591 unsigned int cpos)
2593 BUG_ON(start > cpos);
2595 return start + ((cpos - start) & ocfs2_cow_contig_mask(sb));
2619 * cpos is vitual start cluster position we want to do CoW in a
2623 * Normal we will start CoW from the beginning of extent record cotaining cpos.
2629 u32 cpos,
2644 BUG_ON(cpos + write_len > max_cpos);
2647 ret = ocfs2_find_leaf(INODE_CACHE(inode), el, cpos, &eb_bh);
2676 le16_to_cpu(rec->e_leaf_clusters) <= cpos)
2713 want_clusters = (cpos + write_len) -
2728 else if (*cow_len || (*cow_start == cpos)) {
2744 (cpos + write_len)) {
2751 } else if ((rec_end - cpos) <= contig_clusters) {
2754 * this extent will cover cpos.
2758 } else if ((rec_end - cpos) <= want_clusters) {
2761 * extent, we know that the write goes from cpos
2765 * Failing that (ie, cpos is within
2770 *cow_start, cpos);
2782 *cow_start, cpos);
2784 want_clusters = (cpos + write_len) - *cow_start;
2794 if ((*cow_start + *cow_len) >= (cpos + write_len))
2905 u32 cpos, u32 old_cluster,
2917 trace_ocfs2_duplicate_clusters_by_page(cpos, old_cluster,
2920 offset = ((loff_t)cpos) << OCFS2_SB(sb)->s_clustersize_bits;
3003 u32 cpos, u32 old_cluster,
3016 trace_ocfs2_duplicate_clusters_by_page(cpos, old_cluster,
3058 u32 cpos, u32 p_cluster, u32 len,
3071 cpos, len, p_cluster, ext_flags);
3074 replace_rec.e_cpos = cpu_to_le32(cpos);
3088 ret = ocfs2_find_path(et->et_ci, path, cpos);
3096 index = ocfs2_search_extent_list(el, cpos);
3099 "Inode %llu has an extent at cpos %u which can no longer be found\n",
3100 (unsigned long long)ino, cpos);
3116 u32 cpos, u32 old,
3125 cpos, old, new, len, ext_flags);
3130 cpos, old, new, len);
3138 cpos, new, len, ext_flags,
3148 u32 cpos, u32 num_clusters)
3156 start = ((loff_t)cpos) << OCFS2_SB(sb)->s_clustersize_bits;
3177 u32 cpos, u32 p_cluster,
3189 trace_ocfs2_make_clusters_writable(cpos, p_cluster,
3241 cpos, p_cluster,
3262 cpos, p_cluster, new_bit,
3281 cpos += set_len;
3303 ret = ocfs2_cow_sync_writeback(sb, context->inode, cpos,
3376 * Starting at cpos, try to CoW write_len clusters. Don't CoW
3382 u32 cpos, u32 write_len, u32 max_cpos)
3395 cpos, write_len, max_cpos,
3403 cpos, write_len, max_cpos,
3452 * CoW any and all clusters between cpos and cpos+write_len.
3454 * clusters between cpos and cpos+write_len are safe to modify.
3458 u32 cpos, u32 write_len, u32 max_cpos)
3465 ret = ocfs2_get_clusters(inode, cpos, &p_cluster,
3476 ret = ocfs2_refcount_cow_hunk(inode, di_bh, cpos,
3485 cpos += num_clusters;
3516 u32 cpos = 0, clusters = le32_to_cpu(xv->xr_clusters);
3521 while (cpos < clusters) {
3522 ret = ocfs2_xattr_get_clusters(inode, cpos, &p_cluster,
3530 cpos += num_clusters;
3597 u32 cpos, u32 write_len,
3608 cpos, write_len, UINT_MAX,
3658 u32 cpos, u32 p_cluster, u32 num_clusters,
3702 cpos, num_clusters, p_cluster,
3776 u32 cpos, num_clusters, clusters, p_cluster;
3807 cpos = 0;
3808 while (cpos < clusters) {
3809 ret = ocfs2_get_clusters(inode, cpos, &p_cluster,
3818 ref_root_bh, cpos,
3828 cpos += num_clusters;
3871 u32 cpos, u32 p_cluster, u32 num_clusters,
3898 ret = ocfs2_insert_extent(handle, et, cpos,
3978 u32 p_cluster, num_clusters, clusters, cpos;
3988 cpos = 0;
3989 while (cpos < clusters) {
3990 ret = ocfs2_get_clusters(s_inode, cpos, &p_cluster,
3999 cpos, p_cluster,
4009 cpos += num_clusters;