Lines Matching refs:bmv
146 struct getbmapx *bmv, in xfs_getbmap_report_one() argument
151 struct kgetbmap *p = out + bmv->bmv_entries; in xfs_getbmap_report_one()
167 if (!(bmv->bmv_iflags & BMV_IF_DELALLOC)) in xfs_getbmap_report_one()
177 (bmv->bmv_iflags & BMV_IF_PREALLOC)) in xfs_getbmap_report_one()
186 bmv->bmv_offset = p->bmv_offset + p->bmv_length; in xfs_getbmap_report_one()
187 bmv->bmv_length = max(0LL, bmv_end - bmv->bmv_offset); in xfs_getbmap_report_one()
188 bmv->bmv_entries++; in xfs_getbmap_report_one()
195 struct getbmapx *bmv, in xfs_getbmap_report_hole() argument
201 struct kgetbmap *p = out + bmv->bmv_entries; in xfs_getbmap_report_hole()
203 if (bmv->bmv_iflags & BMV_IF_NO_HOLES) in xfs_getbmap_report_hole()
210 bmv->bmv_offset = p->bmv_offset + p->bmv_length; in xfs_getbmap_report_hole()
211 bmv->bmv_length = max(0LL, bmv_end - bmv->bmv_offset); in xfs_getbmap_report_hole()
212 bmv->bmv_entries++; in xfs_getbmap_report_hole()
217 struct getbmapx *bmv) in xfs_getbmap_full() argument
219 return bmv->bmv_length == 0 || bmv->bmv_entries >= bmv->bmv_count - 1; in xfs_getbmap_full()
250 struct getbmapx *bmv, /* user bmap structure */ in xfs_getbmap() argument
254 int iflags = bmv->bmv_iflags; in xfs_getbmap()
263 if (bmv->bmv_iflags & ~BMV_IF_VALID) in xfs_getbmap()
273 if (bmv->bmv_length < -1) in xfs_getbmap()
275 bmv->bmv_entries = 0; in xfs_getbmap()
276 if (bmv->bmv_length == 0) in xfs_getbmap()
349 if (bmv->bmv_length == -1) { in xfs_getbmap()
351 bmv->bmv_length = max(0LL, max_len - bmv->bmv_offset); in xfs_getbmap()
354 bmv_end = bmv->bmv_offset + bmv->bmv_length; in xfs_getbmap()
356 first_bno = bno = XFS_BB_TO_FSBT(mp, bmv->bmv_offset); in xfs_getbmap()
357 len = XFS_BB_TO_FSB(mp, bmv->bmv_length); in xfs_getbmap()
369 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, bno, in xfs_getbmap()
374 while (!xfs_getbmap_full(bmv)) { in xfs_getbmap()
382 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, bno, in xfs_getbmap()
384 if (xfs_getbmap_full(bmv)) in xfs_getbmap()
396 error = xfs_getbmap_report_one(ip, bmv, out, bmv_end, in xfs_getbmap()
398 if (error || xfs_getbmap_full(bmv)) in xfs_getbmap()
405 if (bmv->bmv_entries > 0) in xfs_getbmap()
406 out[bmv->bmv_entries - 1].bmv_oflags |= in xfs_getbmap()
410 !xfs_getbmap_full(bmv)) { in xfs_getbmap()
411 xfs_getbmap_report_hole(ip, bmv, out, bmv_end, in xfs_getbmap()