Skip to content

Commit ebb8765

Browse files
asjkdave
authored andcommitted
btrfs: move btrfs_compression_type to compression.h
So that its better organized. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 8ae1af3 commit ebb8765

File tree

13 files changed

+20
-8
lines changed

13 files changed

+20
-8
lines changed

fs/btrfs/check-integrity.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
#include "locking.h"
107107
#include "check-integrity.h"
108108
#include "rcu-string.h"
109+
#include "compression.h"
109110

110111
#define BTRFSIC_BLOCK_HASHTABLE_SIZE 0x10000
111112
#define BTRFSIC_BLOCK_LINK_HASHTABLE_SIZE 0x10000

fs/btrfs/compression.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
4848
void btrfs_clear_biovec_end(struct bio_vec *bvec, int vcnt,
4949
unsigned long pg_index,
5050
unsigned long pg_offset);
51+
52+
enum btrfs_compression_type {
53+
BTRFS_COMPRESS_NONE = 0,
54+
BTRFS_COMPRESS_ZLIB = 1,
55+
BTRFS_COMPRESS_LZO = 2,
56+
BTRFS_COMPRESS_TYPES = 2,
57+
BTRFS_COMPRESS_LAST = 3,
58+
};
59+
5160
struct btrfs_compress_op {
5261
struct list_head *(*alloc_workspace)(void);
5362

fs/btrfs/ctree.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -718,14 +718,6 @@ struct btrfs_timespec {
718718
__le32 nsec;
719719
} __attribute__ ((__packed__));
720720

721-
enum btrfs_compression_type {
722-
BTRFS_COMPRESS_NONE = 0,
723-
BTRFS_COMPRESS_ZLIB = 1,
724-
BTRFS_COMPRESS_LZO = 2,
725-
BTRFS_COMPRESS_TYPES = 2,
726-
BTRFS_COMPRESS_LAST = 3,
727-
};
728-
729721
struct btrfs_inode_item {
730722
/* nfs style generation number */
731723
__le64 generation;

fs/btrfs/disk-io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "raid56.h"
5151
#include "sysfs.h"
5252
#include "qgroup.h"
53+
#include "compression.h"
5354

5455
#ifdef CONFIG_X86
5556
#include <asm/cpufeature.h>

fs/btrfs/extent_map.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/hardirq.h>
55
#include "ctree.h"
66
#include "extent_map.h"
7+
#include "compression.h"
78

89

910
static struct kmem_cache *extent_map_cache;

fs/btrfs/file-item.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "transaction.h"
2626
#include "volumes.h"
2727
#include "print-tree.h"
28+
#include "compression.h"
2829

2930
#define __MAX_CSUM_ITEMS(r, size) ((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \
3031
sizeof(struct btrfs_item) * 2) / \

fs/btrfs/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "locking.h"
4242
#include "volumes.h"
4343
#include "qgroup.h"
44+
#include "compression.h"
4445

4546
static struct kmem_cache *btrfs_inode_defrag_cachep;
4647
/*

fs/btrfs/ioctl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#include "sysfs.h"
6161
#include "qgroup.h"
6262
#include "tree-log.h"
63+
#include "compression.h"
6364

6465
#ifdef CONFIG_64BIT
6566
/* If we have a 32-bit userspace and 64-bit kernel, then the UAPI

fs/btrfs/ordered-data.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "btrfs_inode.h"
2626
#include "extent_io.h"
2727
#include "disk-io.h"
28+
#include "compression.h"
2829

2930
static struct kmem_cache *btrfs_ordered_extent_cache;
3031

fs/btrfs/props.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "hash.h"
2323
#include "transaction.h"
2424
#include "xattr.h"
25+
#include "compression.h"
2526

2627
#define BTRFS_PROP_HANDLERS_HT_BITS 8
2728
static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS);

fs/btrfs/send.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "disk-io.h"
3535
#include "btrfs_inode.h"
3636
#include "transaction.h"
37+
#include "compression.h"
3738

3839
static int g_verbose = 0;
3940

fs/btrfs/tests/inode-tests.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "../disk-io.h"
2323
#include "../extent_io.h"
2424
#include "../volumes.h"
25+
#include "../compression.h"
2526

2627
static void insert_extent(struct btrfs_root *root, u64 start, u64 len,
2728
u64 ram_bytes, u64 offset, u64 disk_bytenr,

fs/btrfs/tree-log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "print-tree.h"
2727
#include "backref.h"
2828
#include "hash.h"
29+
#include "compression.h"
2930

3031
/* magic values for the inode_only field in btrfs_log_inode:
3132
*

0 commit comments

Comments
 (0)