Lines Matching refs:range

241 	struct btrfs_ioctl_defrag_range_args range;
272 memset(&range, 0, sizeof(range));
273 range.len = (u64)-1;
274 range.start = cur;
275 range.extent_thresh = defrag->extent_thresh;
278 ret = btrfs_defrag_file(inode, NULL, &range, defrag->transid,
286 cur = max(cur + fs_info->sectorsize, range.start);
698 /* It's beyond our target range, definitely not extent found */
900 /* Wait for any existing ordered extent in the range */
927 * Now the page range has no ordered extent any more. Read the page to
964 * @locked: if the range has already held extent lock
1018 * If this range of the extent map is already flagged for delalloc,
1025 * because we do the space reservation while holding the range
1027 * extent, requires locking the range;
1032 * extent). If we mark pages in an adjacent range for defrag,
1033 * then we will have a larger contiguous range for delalloc,
1090 * last range of the target list.
1134 * Otherwise, we can only go the end of the specified range.
1148 * Defrag one contiguous target range.
1151 * @target: target range to defrag
1152 * @pages: locked pages covering the defrag range
1158 * Pages should be locked, no ordered extent in the pages range,
1235 /* Lock the pages range */
1241 * which range really needs to be defragged.
1244 * so that we won't relock the extent range and cause deadlock.
1311 * our range may already be invalid (e.g. hole punched).
1312 * Skip if our range is before last_scanned_ret, as there is
1313 * no need to defrag the range anymore.
1324 * Here we may not defrag any range if holes are punched before
1352 * @range: defrag options including range and flags
1358 * Return >=0 for the number of sectors defragged, and range->start will be updated
1361 * defragging all the range).
1364 struct btrfs_ioctl_defrag_range_args *range,
1372 bool do_compress = (range->flags & BTRFS_DEFRAG_RANGE_COMPRESS);
1376 u32 extent_thresh = range->extent_thresh;
1382 if (range->start >= isize)
1386 if (range->compress_type >= BTRFS_NR_COMPRESS_TYPES)
1388 if (range->compress_type)
1389 compress_type = range->compress_type;
1395 if (range->start + range->len > range->start) {
1396 /* Got a specific range */
1397 last_byte = min(isize, range->start + range->len);
1403 /* Align the range */
1404 cur = round_down(range->start, fs_info->sectorsize);
1420 * Make writeback start from the beginning of the range, so that the
1421 * defrag range can be written sequentially.
1476 * Update range.start for autodefrag, this will indicate where to start
1479 range->start = cur;
1485 if (range->flags & BTRFS_DEFRAG_RANGE_START_IO) {
1491 if (range->compress_type == BTRFS_COMPRESS_LZO)
1493 else if (range->compress_type == BTRFS_COMPRESS_ZSTD)