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