Lines Matching defs:bmv
259 struct getbmapx *bmv,
264 struct kgetbmap *p = out + bmv->bmv_entries;
283 ASSERT((bmv->bmv_iflags & BMV_IF_DELALLOC) != 0);
292 (bmv->bmv_iflags & BMV_IF_PREALLOC))
301 bmv->bmv_offset = p->bmv_offset + p->bmv_length;
302 bmv->bmv_length = max(0LL, bmv_end - bmv->bmv_offset);
303 bmv->bmv_entries++;
310 struct getbmapx *bmv,
316 struct kgetbmap *p = out + bmv->bmv_entries;
318 if (bmv->bmv_iflags & BMV_IF_NO_HOLES)
325 bmv->bmv_offset = p->bmv_offset + p->bmv_length;
326 bmv->bmv_length = max(0LL, bmv_end - bmv->bmv_offset);
327 bmv->bmv_entries++;
332 struct getbmapx *bmv)
334 return bmv->bmv_length == 0 || bmv->bmv_entries >= bmv->bmv_count - 1;
356 * Get inode's extents as described in bmv, and format for output.
358 * are mapped, until the passed-in bmv->bmv_count slots have
365 struct getbmapx *bmv, /* user bmap structure */
369 int iflags = bmv->bmv_iflags;
378 if (bmv->bmv_iflags & ~BMV_IF_VALID)
388 if (bmv->bmv_length < -1)
390 bmv->bmv_entries = 0;
391 if (bmv->bmv_length == 0)
464 if (bmv->bmv_length == -1) {
466 bmv->bmv_length = max(0LL, max_len - bmv->bmv_offset);
469 bmv_end = bmv->bmv_offset + bmv->bmv_length;
471 first_bno = bno = XFS_BB_TO_FSBT(mp, bmv->bmv_offset);
472 len = XFS_BB_TO_FSB(mp, bmv->bmv_length);
486 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, bno,
491 while (!xfs_getbmap_full(bmv)) {
499 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, bno,
501 if (xfs_getbmap_full(bmv))
513 error = xfs_getbmap_report_one(ip, bmv, out, bmv_end,
515 if (error || xfs_getbmap_full(bmv))
522 out[bmv->bmv_entries - 1].bmv_oflags |= BMV_OF_LAST;
525 !xfs_getbmap_full(bmv)) {
526 xfs_getbmap_report_hole(ip, bmv, out, bmv_end,