Lines Matching defs:erp
3102 xfs_ext_irec_t *erp; /* irec pointer */
3106 erp = xfs_iext_idx_to_irec(ifp, &page_idx, &erp_idx, 0);
3107 return &erp->er_extbuf[page_idx];
3197 xfs_ext_irec_t *erp;
3203 erp = xfs_iext_idx_to_irec(ifp, &page_idx, &erp_idx, 1);
3207 erp = ifp->if_u1.if_ext_irec;
3210 if (erp && erp->er_extcount + ext_diff <= XFS_LINEAR_EXTS) {
3211 if (page_idx < erp->er_extcount) {
3212 memmove(&erp->er_extbuf[page_idx + ext_diff],
3213 &erp->er_extbuf[page_idx],
3214 (erp->er_extcount - page_idx) *
3216 memset(&erp->er_extbuf[page_idx], 0, byte_diff);
3218 erp->er_extcount += ext_diff;
3222 else if (erp) {
3229 * in the page, then erp is NULL and erp_idx is set to
3236 erp = xfs_iext_irec_new(ifp, erp_idx);
3237 erp->er_extcount = count;
3272 xfs_ext_irec_t *erp; /* pointer to irec entry */
3280 erp = &ifp->if_u1.if_ext_irec[erp_idx];
3281 nex2 = erp->er_extcount - idx;
3290 memmove(nex2_ep, &erp->er_extbuf[idx], byte_diff);
3291 erp->er_extcount -= nex2;
3293 memset(&erp->er_extbuf[idx], 0, byte_diff);
3303 ext_diff = MIN(ext_cnt, (int)XFS_LINEAR_EXTS - erp->er_extcount);
3305 erp->er_extcount += ext_diff;
3311 erp = xfs_iext_irec_new(ifp, erp_idx);
3313 erp->er_extcount = ext_diff;
3324 ext_avail = XFS_LINEAR_EXTS - erp->er_extcount;
3331 i = erp->er_extcount;
3341 erp++;
3343 memmove(&erp->er_extbuf[nex2], erp->er_extbuf,
3344 erp->er_extcount * sizeof(xfs_bmbt_rec_t));
3352 erp = xfs_iext_irec_new(ifp, erp_idx);
3354 memmove(&erp->er_extbuf[i], nex2_ep, byte_diff);
3356 erp->er_extcount += nex2;
3500 xfs_ext_irec_t *erp; /* indirection array pointer */
3509 erp = xfs_iext_idx_to_irec(ifp, &page_idx, &erp_idx, 0);
3510 ASSERT(erp != NULL);
3514 nex2 = MAX((erp->er_extcount - (nex1 + ext_cnt)), 0);
3515 ext_diff = MIN(ext_cnt, (erp->er_extcount - nex1));
3520 if (ext_diff == erp->er_extcount) {
3527 erp = &ifp->if_u1.if_ext_irec[erp_idx];
3536 memmove(&erp->er_extbuf[nex1],
3537 &erp->er_extbuf[nex1 + ext_diff],
3541 memset(&erp->er_extbuf[nex1 + nex2], 0, (XFS_IEXT_BUFSZ -
3544 erp->er_extcount -= ext_diff;
3549 erp++;
3754 xfs_ext_irec_t *erp = NULL; /* indirection array pointer */
3770 erp = xfs_iext_bno_to_irec(ifp, bno, &erp_idx);
3771 base = erp->er_extbuf;
3772 high = erp->er_extcount - 1;
3790 idx += erp->er_extoff;
3798 idx += erp->er_extoff;
3822 xfs_ext_irec_t *erp = NULL; /* indirection array pointer */
3836 erp = &ifp->if_u1.if_ext_irec[erp_idx];
3837 erp_next = erp_idx < nlists - 1 ? erp + 1 : NULL;
3838 if (bno < xfs_bmbt_get_startoff(erp->er_extbuf)) {
3848 return erp;
3865 xfs_ext_irec_t *erp = NULL; /* pointer to current irec */
3883 erp = &ifp->if_u1.if_ext_irec[erp_idx];
3884 prev = erp_idx > 0 ? erp - 1 : NULL;
3885 if (page_idx < erp->er_extoff || (page_idx == erp->er_extoff &&
3888 } else if (page_idx > erp->er_extoff + erp->er_extcount ||
3889 (page_idx == erp->er_extoff + erp->er_extcount &&
3892 } else if (page_idx == erp->er_extoff + erp->er_extcount &&
3893 erp->er_extcount == XFS_LINEAR_EXTS) {
3897 erp = erp_idx < nlists ? erp + 1 : NULL;
3900 page_idx -= erp->er_extoff;
3906 return(erp);
3917 xfs_ext_irec_t *erp; /* indirection array pointer */
3924 erp = kmem_alloc(sizeof(xfs_ext_irec_t), KM_NOFS);
3933 erp->er_extbuf = ifp->if_u1.if_extents;
3934 erp->er_extcount = nextents;
3935 erp->er_extoff = 0;
3940 ifp->if_u1.if_ext_irec = erp;
3953 xfs_ext_irec_t *erp; /* indirection array pointer */
3967 erp = ifp->if_u1.if_ext_irec;
3969 memmove(&erp[i], &erp[i-1], sizeof(xfs_ext_irec_t));
3974 erp = ifp->if_u1.if_ext_irec;
3975 erp[erp_idx].er_extbuf = kmem_alloc(XFS_IEXT_BUFSZ, KM_NOFS);
3977 memset(erp[erp_idx].er_extbuf, 0, XFS_IEXT_BUFSZ);
3978 erp[erp_idx].er_extcount = 0;
3979 erp[erp_idx].er_extoff = erp_idx > 0 ?
3980 erp[erp_idx-1].er_extoff + erp[erp_idx-1].er_extcount : 0;
3981 return (&erp[erp_idx]);
3992 xfs_ext_irec_t *erp; /* indirection array pointer */
3998 erp = &ifp->if_u1.if_ext_irec[erp_idx];
3999 if (erp->er_extbuf) {
4001 -erp->er_extcount);
4002 kmem_free(erp->er_extbuf);
4005 erp = ifp->if_u1.if_ext_irec;
4007 memmove(&erp[i], &erp[i+1], sizeof(xfs_ext_irec_t));
4066 xfs_ext_irec_t *erp, *erp_next;/* pointers to irec entries */
4073 erp = &ifp->if_u1.if_ext_irec[erp_idx];
4074 erp_next = erp + 1;
4076 (XFS_LINEAR_EXTS - erp->er_extcount)) {
4077 memcpy(&erp->er_extbuf[erp->er_extcount],
4080 erp->er_extcount += erp_next->er_extcount;