Commit ebb8765b authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: move btrfs_compression_type to compression.h

So that its better organized.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 8ae1af3c
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
#include "locking.h" #include "locking.h"
#include "check-integrity.h" #include "check-integrity.h"
#include "rcu-string.h" #include "rcu-string.h"
#include "compression.h"
#define BTRFSIC_BLOCK_HASHTABLE_SIZE 0x10000 #define BTRFSIC_BLOCK_HASHTABLE_SIZE 0x10000
#define BTRFSIC_BLOCK_LINK_HASHTABLE_SIZE 0x10000 #define BTRFSIC_BLOCK_LINK_HASHTABLE_SIZE 0x10000
......
...@@ -48,6 +48,15 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -48,6 +48,15 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
void btrfs_clear_biovec_end(struct bio_vec *bvec, int vcnt, void btrfs_clear_biovec_end(struct bio_vec *bvec, int vcnt,
unsigned long pg_index, unsigned long pg_index,
unsigned long pg_offset); unsigned long pg_offset);
enum btrfs_compression_type {
BTRFS_COMPRESS_NONE = 0,
BTRFS_COMPRESS_ZLIB = 1,
BTRFS_COMPRESS_LZO = 2,
BTRFS_COMPRESS_TYPES = 2,
BTRFS_COMPRESS_LAST = 3,
};
struct btrfs_compress_op { struct btrfs_compress_op {
struct list_head *(*alloc_workspace)(void); struct list_head *(*alloc_workspace)(void);
......
...@@ -718,14 +718,6 @@ struct btrfs_timespec { ...@@ -718,14 +718,6 @@ struct btrfs_timespec {
__le32 nsec; __le32 nsec;
} __attribute__ ((__packed__)); } __attribute__ ((__packed__));
enum btrfs_compression_type {
BTRFS_COMPRESS_NONE = 0,
BTRFS_COMPRESS_ZLIB = 1,
BTRFS_COMPRESS_LZO = 2,
BTRFS_COMPRESS_TYPES = 2,
BTRFS_COMPRESS_LAST = 3,
};
struct btrfs_inode_item { struct btrfs_inode_item {
/* nfs style generation number */ /* nfs style generation number */
__le64 generation; __le64 generation;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "raid56.h" #include "raid56.h"
#include "sysfs.h" #include "sysfs.h"
#include "qgroup.h" #include "qgroup.h"
#include "compression.h"
#ifdef CONFIG_X86 #ifdef CONFIG_X86
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include "ctree.h" #include "ctree.h"
#include "extent_map.h" #include "extent_map.h"
#include "compression.h"
static struct kmem_cache *extent_map_cache; static struct kmem_cache *extent_map_cache;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "transaction.h" #include "transaction.h"
#include "volumes.h" #include "volumes.h"
#include "print-tree.h" #include "print-tree.h"
#include "compression.h"
#define __MAX_CSUM_ITEMS(r, size) ((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \ #define __MAX_CSUM_ITEMS(r, size) ((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \
sizeof(struct btrfs_item) * 2) / \ sizeof(struct btrfs_item) * 2) / \
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "locking.h" #include "locking.h"
#include "volumes.h" #include "volumes.h"
#include "qgroup.h" #include "qgroup.h"
#include "compression.h"
static struct kmem_cache *btrfs_inode_defrag_cachep; static struct kmem_cache *btrfs_inode_defrag_cachep;
/* /*
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
#include "sysfs.h" #include "sysfs.h"
#include "qgroup.h" #include "qgroup.h"
#include "tree-log.h" #include "tree-log.h"
#include "compression.h"
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
/* If we have a 32-bit userspace and 64-bit kernel, then the UAPI /* If we have a 32-bit userspace and 64-bit kernel, then the UAPI
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "btrfs_inode.h" #include "btrfs_inode.h"
#include "extent_io.h" #include "extent_io.h"
#include "disk-io.h" #include "disk-io.h"
#include "compression.h"
static struct kmem_cache *btrfs_ordered_extent_cache; static struct kmem_cache *btrfs_ordered_extent_cache;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "hash.h" #include "hash.h"
#include "transaction.h" #include "transaction.h"
#include "xattr.h" #include "xattr.h"
#include "compression.h"
#define BTRFS_PROP_HANDLERS_HT_BITS 8 #define BTRFS_PROP_HANDLERS_HT_BITS 8
static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS); static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS);
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "btrfs_inode.h" #include "btrfs_inode.h"
#include "transaction.h" #include "transaction.h"
#include "compression.h"
static int g_verbose = 0; static int g_verbose = 0;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "../disk-io.h" #include "../disk-io.h"
#include "../extent_io.h" #include "../extent_io.h"
#include "../volumes.h" #include "../volumes.h"
#include "../compression.h"
static void insert_extent(struct btrfs_root *root, u64 start, u64 len, static void insert_extent(struct btrfs_root *root, u64 start, u64 len,
u64 ram_bytes, u64 offset, u64 disk_bytenr, u64 ram_bytes, u64 offset, u64 disk_bytenr,
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "print-tree.h" #include "print-tree.h"
#include "backref.h" #include "backref.h"
#include "hash.h" #include "hash.h"
#include "compression.h"
/* magic values for the inode_only field in btrfs_log_inode: /* magic values for the inode_only field in btrfs_log_inode:
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment