search for: extent_thresh

Displaying 3 results from an estimated 3 matches for "extent_thresh".

2013 Apr 16
2
[PATCH v2] Btrfs: return error when we specify wrong start to defrag
...tions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 69cd80d..262d9db 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1152,8 +1152,11 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, u64 new_align = ~((u64)128 * 1024 - 1); struct page **pages = NULL; - if (extent_thresh == 0) - extent_thresh = 256 * 1024; + if (isize == 0) + return 0; + + if (range->start >= isize) + return -EINVAL; if (range->flags & BTRFS_DEFRAG_RANGE_COMPRESS) { if (range->compress_type > BTRFS_COMPRESS_TYPES) @@ -1162,8 +1165,8 @@ int btrfs_defrag_file(struct inode...
2010 Nov 16
2
[Btrfs-Progs] Update for lzo support
...;': - compress = 1; + compress_type = BTRFS_COMPRESS_ZLIB; + if (optarg) + compress_type = parse_compress_type(optarg); fancy_ioctl = 1; break; case ''f'': @@ -202,8 +216,10 @@ int do_defrag(int ac, char **av) range.start = start; range.len = len; range.extent_thresh = thresh; - if (compress) + if (compress_type) { range.flags |= BTRFS_DEFRAG_RANGE_COMPRESS; + range.compress_type = compress_type; + } if (flush) range.flags |= BTRFS_DEFRAG_RANGE_START_IO; diff --git a/ctree.h b/ctree.h index b79e238..4ad7f7d 100644 --- a/ctree.h +++ b/ctree.h @@ -350,...
2012 Jun 18
3
[PATCH] Ignore unfragmented file checks in defrag when compression enabled
I noticed that btrfs fi defrag -c<method> can''t be used to compress files unless they are fragmented. This patch corrects the problem, by informing should_defrag_range if compression is enabled, and skipping tests for extent and adjacent extents if it is. Andrew Mahone (1): btrfs: ignore unfragmented file checks in defrag when compression enabled fs/btrfs/ioctl.c | 10