aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-05-05 06:44:41 -0400
committerDavid Sterba <dsterba@suse.cz>2011-05-06 06:34:03 -0400
commitf2a97a9dbd86eb1ef956bdf20e05c507b32beb96 (patch)
tree756c2db8fee9c02df0e3217ea208a82b5f1d5e78 /fs/btrfs/ctree.h
parent621496f4fd56195b7b273521f467c2945165481f (diff)
btrfs: remove all unused functions
Remove static and global declarations and/or definitions. Reduces size of btrfs.ko by ~3.4kB. text data bss dec hex filename 402081 7464 200 409745 64091 btrfs.ko.base 398620 7144 200 405964 631cc btrfs.ko.remove-all Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h78
1 files changed, 0 insertions, 78 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b66216e636c2..e37d441617d2 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1440,26 +1440,12 @@ static inline u64 btrfs_stripe_offset_nr(struct extent_buffer *eb,
1440 return btrfs_stripe_offset(eb, btrfs_stripe_nr(c, nr)); 1440 return btrfs_stripe_offset(eb, btrfs_stripe_nr(c, nr));
1441} 1441}
1442 1442
1443static inline void btrfs_set_stripe_offset_nr(struct extent_buffer *eb,
1444 struct btrfs_chunk *c, int nr,
1445 u64 val)
1446{
1447 btrfs_set_stripe_offset(eb, btrfs_stripe_nr(c, nr), val);
1448}
1449
1450static inline u64 btrfs_stripe_devid_nr(struct extent_buffer *eb, 1443static inline u64 btrfs_stripe_devid_nr(struct extent_buffer *eb,
1451 struct btrfs_chunk *c, int nr) 1444 struct btrfs_chunk *c, int nr)
1452{ 1445{
1453 return btrfs_stripe_devid(eb, btrfs_stripe_nr(c, nr)); 1446 return btrfs_stripe_devid(eb, btrfs_stripe_nr(c, nr));
1454} 1447}
1455 1448
1456static inline void btrfs_set_stripe_devid_nr(struct extent_buffer *eb,
1457 struct btrfs_chunk *c, int nr,
1458 u64 val)
1459{
1460 btrfs_set_stripe_devid(eb, btrfs_stripe_nr(c, nr), val);
1461}
1462
1463/* struct btrfs_block_group_item */ 1449/* struct btrfs_block_group_item */
1464BTRFS_SETGET_STACK_FUNCS(block_group_used, struct btrfs_block_group_item, 1450BTRFS_SETGET_STACK_FUNCS(block_group_used, struct btrfs_block_group_item,
1465 used, 64); 1451 used, 64);
@@ -1517,14 +1503,6 @@ btrfs_inode_ctime(struct btrfs_inode_item *inode_item)
1517 return (struct btrfs_timespec *)ptr; 1503 return (struct btrfs_timespec *)ptr;
1518} 1504}
1519 1505
1520static inline struct btrfs_timespec *
1521btrfs_inode_otime(struct btrfs_inode_item *inode_item)
1522{
1523 unsigned long ptr = (unsigned long)inode_item;
1524 ptr += offsetof(struct btrfs_inode_item, otime);
1525 return (struct btrfs_timespec *)ptr;
1526}
1527
1528BTRFS_SETGET_FUNCS(timespec_sec, struct btrfs_timespec, sec, 64); 1506BTRFS_SETGET_FUNCS(timespec_sec, struct btrfs_timespec, sec, 64);
1529BTRFS_SETGET_FUNCS(timespec_nsec, struct btrfs_timespec, nsec, 32); 1507BTRFS_SETGET_FUNCS(timespec_nsec, struct btrfs_timespec, nsec, 32);
1530 1508
@@ -1875,33 +1853,6 @@ static inline u8 *btrfs_header_chunk_tree_uuid(struct extent_buffer *eb)
1875 return (u8 *)ptr; 1853 return (u8 *)ptr;
1876} 1854}
1877 1855
1878static inline u8 *btrfs_super_fsid(struct extent_buffer *eb)
1879{
1880 unsigned long ptr = offsetof(struct btrfs_super_block, fsid);
1881 return (u8 *)ptr;
1882}
1883
1884static inline u8 *btrfs_header_csum(struct extent_buffer *eb)
1885{
1886 unsigned long ptr = offsetof(struct btrfs_header, csum);
1887 return (u8 *)ptr;
1888}
1889
1890static inline struct btrfs_node *btrfs_buffer_node(struct extent_buffer *eb)
1891{
1892 return NULL;
1893}
1894
1895static inline struct btrfs_leaf *btrfs_buffer_leaf(struct extent_buffer *eb)
1896{
1897 return NULL;
1898}
1899
1900static inline struct btrfs_header *btrfs_buffer_header(struct extent_buffer *eb)
1901{
1902 return NULL;
1903}
1904
1905static inline int btrfs_is_leaf(struct extent_buffer *eb) 1856static inline int btrfs_is_leaf(struct extent_buffer *eb)
1906{ 1857{
1907 return btrfs_header_level(eb) == 0; 1858 return btrfs_header_level(eb) == 0;
@@ -2055,22 +2006,6 @@ static inline struct btrfs_root *btrfs_sb(struct super_block *sb)
2055 return sb->s_fs_info; 2006 return sb->s_fs_info;
2056} 2007}
2057 2008
2058static inline int btrfs_set_root_name(struct btrfs_root *root,
2059 const char *name, int len)
2060{
2061 /* if we already have a name just free it */
2062 kfree(root->name);
2063
2064 root->name = kmalloc(len+1, GFP_KERNEL);
2065 if (!root->name)
2066 return -ENOMEM;
2067
2068 memcpy(root->name, name, len);
2069 root->name[len] = '\0';
2070
2071 return 0;
2072}
2073
2074static inline u32 btrfs_level_size(struct btrfs_root *root, int level) 2009static inline u32 btrfs_level_size(struct btrfs_root *root, int level)
2075{ 2010{
2076 if (level == 0) 2011 if (level == 0)
@@ -2304,11 +2239,6 @@ static inline int btrfs_del_item(struct btrfs_trans_handle *trans,
2304 2239
2305int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root 2240int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root
2306 *root, struct btrfs_key *key, void *data, u32 data_size); 2241 *root, struct btrfs_key *key, void *data, u32 data_size);
2307int btrfs_insert_some_items(struct btrfs_trans_handle *trans,
2308 struct btrfs_root *root,
2309 struct btrfs_path *path,
2310 struct btrfs_key *cpu_key, u32 *data_size,
2311 int nr);
2312int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, 2242int btrfs_insert_empty_items(struct btrfs_trans_handle *trans,
2313 struct btrfs_root *root, 2243 struct btrfs_root *root,
2314 struct btrfs_path *path, 2244 struct btrfs_path *path,
@@ -2354,8 +2284,6 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
2354 *item); 2284 *item);
2355int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct 2285int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct
2356 btrfs_root_item *item, struct btrfs_key *key); 2286 btrfs_root_item *item, struct btrfs_key *key);
2357int btrfs_search_root(struct btrfs_root *root, u64 search_start,
2358 u64 *found_objectid);
2359int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid); 2287int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid);
2360int btrfs_find_orphan_roots(struct btrfs_root *tree_root); 2288int btrfs_find_orphan_roots(struct btrfs_root *tree_root);
2361int btrfs_set_root_node(struct btrfs_root_item *item, 2289int btrfs_set_root_node(struct btrfs_root_item *item,
@@ -2494,8 +2422,6 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
2494 u32 min_type); 2422 u32 min_type);
2495 2423
2496int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput); 2424int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput);
2497int btrfs_start_one_delalloc_inode(struct btrfs_root *root, int delay_iput,
2498 int sync);
2499int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end, 2425int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
2500 struct extent_state **cached_state); 2426 struct extent_state **cached_state);
2501int btrfs_writepages(struct address_space *mapping, 2427int btrfs_writepages(struct address_space *mapping,
@@ -2579,10 +2505,6 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
2579/* sysfs.c */ 2505/* sysfs.c */
2580int btrfs_init_sysfs(void); 2506int btrfs_init_sysfs(void);
2581void btrfs_exit_sysfs(void); 2507void btrfs_exit_sysfs(void);
2582int btrfs_sysfs_add_super(struct btrfs_fs_info *fs);
2583int btrfs_sysfs_add_root(struct btrfs_root *root);
2584void btrfs_sysfs_del_root(struct btrfs_root *root);
2585void btrfs_sysfs_del_super(struct btrfs_fs_info *root);
2586 2508
2587/* xattr.c */ 2509/* xattr.c */
2588ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size); 2510ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size);