Lines Matching refs:bmv
154 struct getbmapx *bmv, in xfs_getbmap_report_one() argument
159 struct kgetbmap *p = out + bmv->bmv_entries; in xfs_getbmap_report_one()
175 if (!(bmv->bmv_iflags & BMV_IF_DELALLOC)) in xfs_getbmap_report_one()
185 (bmv->bmv_iflags & BMV_IF_PREALLOC)) in xfs_getbmap_report_one()
194 bmv->bmv_offset = p->bmv_offset + p->bmv_length; in xfs_getbmap_report_one()
195 bmv->bmv_length = max(0LL, bmv_end - bmv->bmv_offset); in xfs_getbmap_report_one()
196 bmv->bmv_entries++; in xfs_getbmap_report_one()
203 struct getbmapx *bmv, in xfs_getbmap_report_hole() argument
209 struct kgetbmap *p = out + bmv->bmv_entries; in xfs_getbmap_report_hole()
211 if (bmv->bmv_iflags & BMV_IF_NO_HOLES) in xfs_getbmap_report_hole()
218 bmv->bmv_offset = p->bmv_offset + p->bmv_length; in xfs_getbmap_report_hole()
219 bmv->bmv_length = max(0LL, bmv_end - bmv->bmv_offset); in xfs_getbmap_report_hole()
220 bmv->bmv_entries++; in xfs_getbmap_report_hole()
225 struct getbmapx *bmv) in xfs_getbmap_full() argument
227 return bmv->bmv_length == 0 || bmv->bmv_entries >= bmv->bmv_count - 1; in xfs_getbmap_full()
258 struct getbmapx *bmv, /* user bmap structure */ in xfs_getbmap() argument
262 int iflags = bmv->bmv_iflags; in xfs_getbmap()
271 if (bmv->bmv_iflags & ~BMV_IF_VALID) in xfs_getbmap()
281 if (bmv->bmv_length < -1) in xfs_getbmap()
283 bmv->bmv_entries = 0; in xfs_getbmap()
284 if (bmv->bmv_length == 0) in xfs_getbmap()
357 if (bmv->bmv_length == -1) { in xfs_getbmap()
359 bmv->bmv_length = max(0LL, max_len - bmv->bmv_offset); in xfs_getbmap()
362 bmv_end = bmv->bmv_offset + bmv->bmv_length; in xfs_getbmap()
364 first_bno = bno = XFS_BB_TO_FSBT(mp, bmv->bmv_offset); in xfs_getbmap()
365 len = XFS_BB_TO_FSB(mp, bmv->bmv_length); in xfs_getbmap()
377 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, bno, in xfs_getbmap()
382 while (!xfs_getbmap_full(bmv)) { in xfs_getbmap()
390 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, bno, in xfs_getbmap()
392 if (xfs_getbmap_full(bmv)) in xfs_getbmap()
404 error = xfs_getbmap_report_one(ip, bmv, out, bmv_end, in xfs_getbmap()
406 if (error || xfs_getbmap_full(bmv)) in xfs_getbmap()
413 if (bmv->bmv_entries > 0) in xfs_getbmap()
414 out[bmv->bmv_entries - 1].bmv_oflags |= in xfs_getbmap()
418 !xfs_getbmap_full(bmv)) { in xfs_getbmap()
419 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, in xfs_getbmap()