Lines Matching refs:tcur
181 struct xfs_trim_cur *tcur, in xfs_trim_gather_extents() argument
207 if (tcur->by_bno) { in xfs_trim_gather_extents()
210 error = xfs_alloc_lookup_le(cur, tcur->start, 0, &i); in xfs_trim_gather_extents()
212 error = xfs_alloc_lookup_ge(cur, tcur->start, 0, &i); in xfs_trim_gather_extents()
213 } else if (tcur->start == 0) { in xfs_trim_gather_extents()
216 error = xfs_alloc_lookup_ge(cur, 0, tcur->count, &i); in xfs_trim_gather_extents()
220 error = xfs_alloc_lookup_le(cur, tcur->start, tcur->count, &i); in xfs_trim_gather_extents()
226 tcur->count = 0; in xfs_trim_gather_extents()
252 tcur->start = fbno; in xfs_trim_gather_extents()
253 tcur->count = flen; in xfs_trim_gather_extents()
262 if (fbno + flen < tcur->start) { in xfs_trim_gather_extents()
266 if (fbno > tcur->end) { in xfs_trim_gather_extents()
268 if (tcur->by_bno) { in xfs_trim_gather_extents()
269 tcur->count = 0; in xfs_trim_gather_extents()
276 if (fbno < tcur->start) { in xfs_trim_gather_extents()
277 flen -= tcur->start - fbno; in xfs_trim_gather_extents()
278 fbno = tcur->start; in xfs_trim_gather_extents()
280 if (fbno + flen > tcur->end + 1) in xfs_trim_gather_extents()
281 flen = tcur->end - fbno + 1; in xfs_trim_gather_extents()
284 if (flen < tcur->minlen) { in xfs_trim_gather_extents()
286 if (tcur->by_bno) in xfs_trim_gather_extents()
288 tcur->count = 0; in xfs_trim_gather_extents()
304 if (tcur->by_bno) in xfs_trim_gather_extents()
317 tcur->count = 0; in xfs_trim_gather_extents()
351 struct xfs_trim_cur tcur = { in xfs_trim_perag_extents() local
360 tcur.by_bno = true; in xfs_trim_perag_extents()
374 error = xfs_trim_gather_extents(pag, &tcur, extents); in xfs_trim_perag_extents()
397 } while (tcur.count != 0); in xfs_trim_perag_extents()