diff mbox

btrfs: move btrfs_compression_type to compression.h

Message ID 1457585397-6499-1-git-send-email-anand.jain@oracle.com (mailing list archive)
State Superseded
Headers show

Commit Message

Anand Jain March 10, 2016, 4:49 a.m. UTC
So that its better organized.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/compression.h  | 9 +++++++++
 fs/btrfs/ctree.h        | 8 --------
 fs/btrfs/disk-io.c      | 1 +
 fs/btrfs/extent_map.c   | 1 +
 fs/btrfs/file-item.c    | 1 +
 fs/btrfs/file.c         | 1 +
 fs/btrfs/ioctl.c        | 1 +
 fs/btrfs/ordered-data.c | 1 +
 fs/btrfs/props.c        | 1 +
 fs/btrfs/send.c         | 1 +
 fs/btrfs/tree-log.c     | 1 +
 11 files changed, 18 insertions(+), 8 deletions(-)

Comments

kernel test robot March 10, 2016, 7:51 a.m. UTC | #1
Hi Anand,

[auto build test ERROR on v4.5-rc7]
[cannot apply to btrfs/next next-20160309]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Anand-Jain/btrfs-move-btrfs_compression_type-to-compression-h/20160310-125205
config: x86_64-randconfig-s3-03101522 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/btrfs/check-integrity.c: In function 'btrfsic_handle_extent_data':
>> fs/btrfs/check-integrity.c:1449:6: error: 'BTRFS_COMPRESS_NONE' undeclared (first use in this function)
         BTRFS_COMPRESS_NONE) {
         ^
   fs/btrfs/check-integrity.c:1449:6: note: each undeclared identifier is reported only once for each function it appears in

vim +/BTRFS_COMPRESS_NONE +1449 fs/btrfs/check-integrity.c

e06baab4 Stefan Behrens 2012-04-12  1443  	}
e06baab4 Stefan Behrens 2012-04-12  1444  	btrfsic_read_from_block_data(block_ctx, &file_extent_item,
e06baab4 Stefan Behrens 2012-04-12  1445  				     file_extent_item_offset,
e06baab4 Stefan Behrens 2012-04-12  1446  				     sizeof(struct btrfs_file_extent_item));
e20d6c5b Josef Bacik    2013-11-13  1447  	next_bytenr = btrfs_stack_file_extent_disk_bytenr(&file_extent_item);
e20d6c5b Josef Bacik    2013-11-13  1448  	if (btrfs_stack_file_extent_compression(&file_extent_item) ==
e20d6c5b Josef Bacik    2013-11-13 @1449  	    BTRFS_COMPRESS_NONE) {
e20d6c5b Josef Bacik    2013-11-13  1450  		next_bytenr += btrfs_stack_file_extent_offset(&file_extent_item);
3cae210f Qu Wenruo      2013-07-16  1451  		num_bytes = btrfs_stack_file_extent_num_bytes(&file_extent_item);
e20d6c5b Josef Bacik    2013-11-13  1452  	} else {

:::::: The code at line 1449 was first introduced by commit
:::::: e20d6c5ba38d066c7dc0f7d3b68da14b9ae7fe37 Btrfs: fix check-integrity to look at the referenced data properly

:::::: TO: Josef Bacik <jbacik@fusionio.com>
:::::: CC: Chris Mason <clm@fb.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot March 10, 2016, 7:53 a.m. UTC | #2
Hi Anand,

[auto build test ERROR on v4.5-rc7]
[cannot apply to btrfs/next next-20160309]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Anand-Jain/btrfs-move-btrfs_compression_type-to-compression-h/20160310-125205
config: i386-randconfig-h0-03101518 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/btrfs/tests/inode-tests.c: In function 'setup_file_extents':
>> fs/btrfs/tests/inode-tests.c:187:32: error: 'BTRFS_COMPRESS_ZLIB' undeclared (first use in this function)
            BTRFS_FILE_EXTENT_REG, BTRFS_COMPRESS_ZLIB, slot);
                                   ^
   fs/btrfs/tests/inode-tests.c:187:32: note: each undeclared identifier is reported only once for each function it appears in
   fs/btrfs/tests/inode-tests.c: In function 'test_btrfs_get_extent':
   fs/btrfs/tests/inode-tests.c:624:27: error: 'BTRFS_COMPRESS_ZLIB' undeclared (first use in this function)
     if (em->compress_type != BTRFS_COMPRESS_ZLIB) {
                              ^

vim +/BTRFS_COMPRESS_ZLIB +187 fs/btrfs/tests/inode-tests.c

aaedb55b Josef Bacik 2013-10-11  181  	slot++;
aaedb55b Josef Bacik 2013-10-11  182  	offset += 8192;
aaedb55b Josef Bacik 2013-10-11  183  	disk_bytenr += 16384;
aaedb55b Josef Bacik 2013-10-11  184  
aaedb55b Josef Bacik 2013-10-11  185  	/* Now a normal compressed extent */
aaedb55b Josef Bacik 2013-10-11  186  	insert_extent(root, offset, 8192, 8192, 0, disk_bytenr, 4096,
aaedb55b Josef Bacik 2013-10-11 @187  		      BTRFS_FILE_EXTENT_REG, BTRFS_COMPRESS_ZLIB, slot);
aaedb55b Josef Bacik 2013-10-11  188  	slot++;
aaedb55b Josef Bacik 2013-10-11  189  	offset += 8192;
aaedb55b Josef Bacik 2013-10-11  190  	/* No merges */

:::::: The code at line 187 was first introduced by commit
:::::: aaedb55bc08f384b7f57dbb3222a511baed4decf Btrfs: add tests for btrfs_get_extent

:::::: TO: Josef Bacik <jbacik@fusionio.com>
:::::: CC: Chris Mason <chris.mason@fusionio.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot March 10, 2016, 8:06 a.m. UTC | #3
Hi Anand,

[auto build test WARNING on v4.5-rc7]
[cannot apply to btrfs/next next-20160309]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Anand-Jain/btrfs-move-btrfs_compression_type-to-compression-h/20160310-125205
config: x86_64-randconfig-s5-03101542 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from fs/btrfs/check-integrity.c:91:
   fs/btrfs/check-integrity.c: In function 'btrfsic_handle_extent_data':
   fs/btrfs/check-integrity.c:1449:6: error: 'BTRFS_COMPRESS_NONE' undeclared (first use in this function)
         BTRFS_COMPRESS_NONE) {
         ^
   include/linux/compiler.h:147:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
>> fs/btrfs/check-integrity.c:1448:2: note: in expansion of macro 'if'
     if (btrfs_stack_file_extent_compression(&file_extent_item) ==
     ^
   fs/btrfs/check-integrity.c:1449:6: note: each undeclared identifier is reported only once for each function it appears in
         BTRFS_COMPRESS_NONE) {
         ^
   include/linux/compiler.h:147:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
>> fs/btrfs/check-integrity.c:1448:2: note: in expansion of macro 'if'
     if (btrfs_stack_file_extent_compression(&file_extent_item) ==
     ^

vim +/if +1448 fs/btrfs/check-integrity.c

3cae210f Qu Wenruo      2013-07-16  1432  			       btrfs_stack_file_extent_disk_bytenr(
3cae210f Qu Wenruo      2013-07-16  1433  			       &file_extent_item));
86ff7ffc Stefan Behrens 2012-04-24  1434  		return 0;
86ff7ffc Stefan Behrens 2012-04-24  1435  	}
86ff7ffc Stefan Behrens 2012-04-24  1436  
e06baab4 Stefan Behrens 2012-04-12  1437  	if (file_extent_item_offset + sizeof(struct btrfs_file_extent_item) >
e06baab4 Stefan Behrens 2012-04-12  1438  	    block_ctx->len) {
e06baab4 Stefan Behrens 2012-04-12  1439  		printk(KERN_INFO
e06baab4 Stefan Behrens 2012-04-12  1440  		       "btrfsic: file item out of bounce at logical %llu, dev %s\n",
e06baab4 Stefan Behrens 2012-04-12  1441  		       block_ctx->start, block_ctx->dev->name);
e06baab4 Stefan Behrens 2012-04-12  1442  		return -1;
e06baab4 Stefan Behrens 2012-04-12  1443  	}
e06baab4 Stefan Behrens 2012-04-12  1444  	btrfsic_read_from_block_data(block_ctx, &file_extent_item,
e06baab4 Stefan Behrens 2012-04-12  1445  				     file_extent_item_offset,
e06baab4 Stefan Behrens 2012-04-12  1446  				     sizeof(struct btrfs_file_extent_item));
e20d6c5b Josef Bacik    2013-11-13  1447  	next_bytenr = btrfs_stack_file_extent_disk_bytenr(&file_extent_item);
e20d6c5b Josef Bacik    2013-11-13 @1448  	if (btrfs_stack_file_extent_compression(&file_extent_item) ==
e20d6c5b Josef Bacik    2013-11-13  1449  	    BTRFS_COMPRESS_NONE) {
e20d6c5b Josef Bacik    2013-11-13  1450  		next_bytenr += btrfs_stack_file_extent_offset(&file_extent_item);
3cae210f Qu Wenruo      2013-07-16  1451  		num_bytes = btrfs_stack_file_extent_num_bytes(&file_extent_item);
e20d6c5b Josef Bacik    2013-11-13  1452  	} else {
e20d6c5b Josef Bacik    2013-11-13  1453  		num_bytes = btrfs_stack_file_extent_disk_num_bytes(&file_extent_item);
e20d6c5b Josef Bacik    2013-11-13  1454  	}
3cae210f Qu Wenruo      2013-07-16  1455  	generation = btrfs_stack_file_extent_generation(&file_extent_item);
e06baab4 Stefan Behrens 2012-04-12  1456  

:::::: The code at line 1448 was first introduced by commit
:::::: e20d6c5ba38d066c7dc0f7d3b68da14b9ae7fe37 Btrfs: fix check-integrity to look at the referenced data properly

:::::: TO: Josef Bacik <jbacik@fusionio.com>
:::::: CC: Chris Mason <clm@fb.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h
index 13a4dc0..f49d8b8 100644
--- a/fs/btrfs/compression.h
+++ b/fs/btrfs/compression.h
@@ -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,
 				   unsigned long pg_index,
 				   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 list_head *(*alloc_workspace)(void);
 
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 3e706ff..f46d520 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -707,14 +707,6 @@  struct btrfs_timespec {
 	__le32 nsec;
 } __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 {
 	/* nfs style generation number */
 	__le64 generation;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index de4c514..e95b02b 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -49,6 +49,7 @@ 
 #include "raid56.h"
 #include "sysfs.h"
 #include "qgroup.h"
+#include "compression.h"
 
 #ifdef CONFIG_X86
 #include <asm/cpufeature.h>
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 6a98bdd..234cdab 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -4,6 +4,7 @@ 
 #include <linux/hardirq.h>
 #include "ctree.h"
 #include "extent_map.h"
+#include "compression.h"
 
 
 static struct kmem_cache *extent_map_cache;
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 58ece65..c49d0c1 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -25,6 +25,7 @@ 
 #include "transaction.h"
 #include "volumes.h"
 #include "print-tree.h"
+#include "compression.h"
 
 #define __MAX_CSUM_ITEMS(r, size) ((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \
 				   sizeof(struct btrfs_item) * 2) / \
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index b823fac..052b361 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -41,6 +41,7 @@ 
 #include "locking.h"
 #include "volumes.h"
 #include "qgroup.h"
+#include "compression.h"
 
 static struct kmem_cache *btrfs_inode_defrag_cachep;
 /*
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index f3aa37c..07cda56 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -59,6 +59,7 @@ 
 #include "props.h"
 #include "sysfs.h"
 #include "qgroup.h"
+#include "compression.h"
 
 #ifdef CONFIG_64BIT
 /* If we have a 32-bit userspace and 64-bit kernel, then the UAPI
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 52170cf..82759bd 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -25,6 +25,7 @@ 
 #include "btrfs_inode.h"
 #include "extent_io.h"
 #include "disk-io.h"
+#include "compression.h"
 
 static struct kmem_cache *btrfs_ordered_extent_cache;
 
diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index dca137b..bcef516 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -22,6 +22,7 @@ 
 #include "hash.h"
 #include "transaction.h"
 #include "xattr.h"
+#include "compression.h"
 
 #define BTRFS_PROP_HANDLERS_HT_BITS 8
 static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS);
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index aa72bfd..47940b3 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -34,6 +34,7 @@ 
 #include "disk-io.h"
 #include "btrfs_inode.h"
 #include "transaction.h"
+#include "compression.h"
 
 static int g_verbose = 0;
 
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index c3f9a9c..6bfc138 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -26,6 +26,7 @@ 
 #include "print-tree.h"
 #include "backref.h"
 #include "hash.h"
+#include "compression.h"
 
 /* magic values for the inode_only field in btrfs_log_inode:
  *