modified - I assumed it would not be useful to
compress inline extents.
--
Andrew Mahone
andrew DOT mahone AT gmail DOT com\
btrfs_defrag_compress.patch
Description: Binary data
Inform should_defrag_range if BTRFS_DEFRAG_RANGE_COMPRESS is set. If so, skip
checks for adjacent extents and extent size when deciding whether to defrag,
as these can prevent an uncompressed and unfragmented file from being
compressed as requested.
Signed-off-by: Andrew Mahone
---
fs/btrfs
I noticed that btrfs fi defrag -c 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 unfragm
-by: Andrew Mahone
---
fs/btrfs/ioctl.c |8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0e92e57..9ec23b9 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -832,7 +832,8 @@ static bool defrag_check_next_extent(struct
203.70MB
lz4hc 20270 8280 171.68MB
A large portion of the work was done by Dave Sterba, but in flattening the
commits attribution has been lost. My contribution has been in debugging some
of the cases in which it could crash or produce incorrect data, and cleaning
it up for the ML.
Andrew Maho
Signed-off-by: Andrew Mahone
---
fs/btrfs/lz4.c | 843 +++
fs/btrfs/lz4.h | 128 +
fs/btrfs/lz4hc.c | 685
fs/btrfs/lz4hc.h | 58
4 files changed, 1714 insertions(+)
create mode
Signed-off-by: Andrew Mahone
---
fs/btrfs/ctree.h | 16
fs/btrfs/disk-io.c | 4
fs/btrfs/ioctl.c | 5 +
fs/btrfs/super.c | 22 +-
4 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index
Signed-off-by: Andrew Mahone
---
fs/btrfs/lz4_wrapper.c | 419 +
1 file changed, 419 insertions(+)
create mode 100644 fs/btrfs/lz4_wrapper.c
diff --git a/fs/btrfs/lz4_wrapper.c b/fs/btrfs/lz4_wrapper.c
new file mode 100644
index 000..60854de
Signed-off-by: Andrew Mahone
---
fs/btrfs/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
index 0c4fa2b..ba5dd55 100644
--- a/fs/btrfs/Makefile
+++ b/fs/btrfs/Makefile
@@ -8,7 +8,7 @@ btrfs-y += super.o ctree.o extent-tree.o
Signed-off-by: Andrew Mahone
---
fs/btrfs/compression.c | 2 ++
fs/btrfs/compression.h | 2 ++
fs/btrfs/super.c | 6 --
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 86eff48..3ed7251 100644
--- a/fs/btrfs
Signed-off-by: Andrew Mahone
---
fs/btrfs/ctree.h | 16
fs/btrfs/disk-io.c | 4
fs/btrfs/ioctl.c | 5 +
fs/btrfs/super.c | 22 +-
4 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index
11 matches
Mail list logo