Lines Matching full:we
25 * We need to walk the filesystem free space and issue discards on the free
26 * space that meet the search criteria (size and location). We cannot issue
28 * still marked as busy. To serialise against extent state changes whilst we are
29 * gathering extents to trim, we must hold the AGF lock to lock out other
32 * However, we cannot just hold the AGF for the entire AG free space walk whilst
33 * we issue discards on each free space that is found. Storage devices can have
36 * extent can take a *long* time. Whilst we are doing this walk, nothing else
37 * can access the AGF, and we can stall transactions and hence the log whilst
41 * Hence we need to take a leaf from the bulkstat playbook. It takes the AGI
47 * We can't do this exactly with free space - once we drop the AGF lock, the
48 * state of the free extent is out of our control and we cannot run a discard
49 * safely on it in this situation. Unless, of course, we've marked the free
50 * extent as busy and undergoing a discard operation whilst we held the AGF
59 * In the context of fstrim, if we find a free extent we need to discard, we
60 * don't have to discard it immediately. All we need to do it record that free
62 * now avoid trying to allocate it. Hence if we mark the extent as busy under
63 * the AGF lock, we can safely discard it without holding the AGF lock because
66 * This also allows us to issue discards asynchronously like we do with online
67 * discard, and so for fast devices fstrim will run much faster as we can have
102 * list. We plug and chain the bios so that we only need a single completion
166 * space before we take the AGF buffer lock are now on disk, and the in xfs_trim_gather_extents()
188 /* nothing of that length left in the AG, we are done */ in xfs_trim_gather_extents()
194 * Loop until we are done with all extents that are large in xfs_trim_gather_extents()
195 * enough to be worth discarding or we hit batch limits. in xfs_trim_gather_extents()
213 * Update the cursor to point at this extent so we in xfs_trim_gather_extents()
239 * If the extent is entirely outside of the range we are in xfs_trim_gather_extents()
266 * If there's no more records in the tree, we are done. Set the in xfs_trim_gather_extents()
276 * we aren't going to issue a discard on them any more. in xfs_trim_gather_extents()
293 * Iterate the free list gathering extents and discarding them. We need a cursor
295 * we found in the last batch as the key to start the next.
332 * We hand the extent list to the discard function here so the in xfs_trim_extents()
337 * However, we must ensure that we do not reference the extent in xfs_trim_extents()
358 * filesystem which does not match to the format we use for filesystem block
360 * is a linear address range. Hence we need to use DADDR based conversions and
383 * We haven't recovered the log, so we cannot use our bnobt-guided in xfs_ioc_trim()
396 * BBTOB would mean we trivially get overflows for values in xfs_ioc_trim()