From ffae826a600e6389b703460b2abe6c4c42d74e80 Mon Sep 17 00:00:00 2001 From: Amogh Akshintala Date: Thu, 7 Sep 2017 15:58:39 -0500 Subject: [PATCH] Add file variables to all BetrFS files. Some erroneous spacing may have got cleaned up as well --- filesystem/ftfs_profile.c | 9 ++++++--- filesystem/ftfs_profile.h | 2 ++ filesystem/toku_checkpoint.c | 3 +++ filesystem/toku_checkpoint.h | 3 +++ filesystem/toku_engine_status.c | 3 +++ filesystem/toku_engine_status.h | 3 +++ filesystem/toku_flusher.c | 3 +++ filesystem/toku_flusher.h | 3 +++ filesystem/toku_memleak_detect.c | 3 +++ filesystem/toku_memleak_detect.h | 3 +++ ftfs/ftfs_dir.c | 2 ++ ftfs/ftfs_dir.h | 2 ++ ftfs/ftfs_error.c | 2 ++ ftfs/ftfs_error.h | 2 ++ ftfs/ftfs_frwlock.c | 4 +++- ftfs/ftfs_frwlock.h | 4 +++- ftfs/ftfs_fs.h | 2 ++ ftfs/ftfs_rwsem.c | 2 ++ ftfs/ftfs_rwsem.h | 8 +++++--- ftfs/ftfs_southbound.c | 4 +++- ftfs/ftfs_southbound.h | 4 +++- ftfs/ftfs_stat.c | 2 ++ ftfs/ftfs_stat.h | 2 ++ ftfs/ftfs_toku_lock.c | 2 ++ ftfs/ftfs_toku_lock.h | 2 ++ ftfs/toku_linkage.c | 2 ++ ftfs/toku_zlib.c | 4 +++- ftfs_fs/faked_std.h | 2 ++ ftfs_fs/ftfs.h | 4 +++- ftfs_fs/ftfs_bstore.c | 4 +++- ftfs_fs/ftfs_fs.h | 2 ++ ftfs_fs/ftfs_metadata.c | 2 ++ ftfs_fs/ftfs_module.c | 2 ++ ftfs_fs/ftfs_southbound.h | 4 +++- ftfs_fs/ftfs_super.c | 6 ++++-- ftfs_fs/rbtreekv.c | 6 ++++-- 36 files changed, 99 insertions(+), 18 deletions(-) diff --git a/filesystem/ftfs_profile.c b/filesystem/ftfs_profile.c index ec3769dca..3b933c3be 100644 --- a/filesystem/ftfs_profile.c +++ b/filesystem/ftfs_profile.c @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #include #include #include @@ -9,11 +12,11 @@ static struct proc_dir_entry * ftfs_profile_entry; static void ftfs_print_unlink_profile(void) { - printk("===== unlink =====\n"); + printk("===== unlink =====\n"); printk("time of if branch:%lld\n", unlink_stat.stage1_if.tv64); printk("time of else branch:%lld\n", unlink_stat.stage1_else.tv64); printk("time of stage2:%lld\n", unlink_stat.stage2.tv64); - printk("time of ftfs_unlink:%lld\n", unlink_stat.stage2.tv64 + + printk("time of ftfs_unlink:%lld\n", unlink_stat.stage2.tv64 + unlink_stat.stage1_else.tv64 + unlink_stat.stage1_if.tv64); printk("time of ftfs_rmdir:%lld\n", unlink_stat.rmdir.tv64); @@ -24,7 +27,7 @@ static void ftfs_print_unlink_profile(void) printk("count of ftfs_rmdir:%u\n", unlink_stat.count_rmdir); printk("count of ftfs_destroy_inode:%u\n", unlink_stat.count_destroy); printk("count of ftfs_evict_inode:%u\n", unlink_stat.count_evict); - printk("===== end ======\n"); + printk("===== end ======\n"); memset(&unlink_stat, 0, sizeof(unlink_stat)); } diff --git a/filesystem/ftfs_profile.h b/filesystem/ftfs_profile.h index c524b7311..8d6b5aaa1 100644 --- a/filesystem/ftfs_profile.h +++ b/filesystem/ftfs_profile.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef FTFS_PROFILE_H #define FTFS_PROFILE_H diff --git a/filesystem/toku_checkpoint.c b/filesystem/toku_checkpoint.c index ccbda05f7..bccad9a88 100644 --- a/filesystem/toku_checkpoint.c +++ b/filesystem/toku_checkpoint.c @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #include #include #include diff --git a/filesystem/toku_checkpoint.h b/filesystem/toku_checkpoint.h index 2d3743d85..fc5688d9b 100644 --- a/filesystem/toku_checkpoint.h +++ b/filesystem/toku_checkpoint.h @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #ifndef TOKU_CHECKPOINT_H #define TOKU_CHECKPOINT_H diff --git a/filesystem/toku_engine_status.c b/filesystem/toku_engine_status.c index 3e7f63063..65d7e802c 100644 --- a/filesystem/toku_engine_status.c +++ b/filesystem/toku_engine_status.c @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #include #include #include diff --git a/filesystem/toku_engine_status.h b/filesystem/toku_engine_status.h index b2630900a..3a7fb975b 100644 --- a/filesystem/toku_engine_status.h +++ b/filesystem/toku_engine_status.h @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #ifndef TOKU_ENGINE_STATUS_H #define TOKU_ENGINE_STATUS_H diff --git a/filesystem/toku_flusher.c b/filesystem/toku_flusher.c index 7e6064d0c..4f656c3df 100644 --- a/filesystem/toku_flusher.c +++ b/filesystem/toku_flusher.c @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #include #include #include diff --git a/filesystem/toku_flusher.h b/filesystem/toku_flusher.h index 146582f7b..c189298d2 100644 --- a/filesystem/toku_flusher.h +++ b/filesystem/toku_flusher.h @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #ifndef TOKU_FLUSHER_H #define TOKU_FLUSHER_H diff --git a/filesystem/toku_memleak_detect.c b/filesystem/toku_memleak_detect.c index 79ded233c..facad70ea 100644 --- a/filesystem/toku_memleak_detect.c +++ b/filesystem/toku_memleak_detect.c @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #ifdef TOKU_MEMLEAK_DETECT #include #include diff --git a/filesystem/toku_memleak_detect.h b/filesystem/toku_memleak_detect.h index 1bd37994e..c998a35ef 100644 --- a/filesystem/toku_memleak_detect.h +++ b/filesystem/toku_memleak_detect.h @@ -1,3 +1,6 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: + #ifndef TOKU_MEMLEAK_DETECT_H #define TOKU_MEMLEAK_DETECT_H diff --git a/ftfs/ftfs_dir.c b/ftfs/ftfs_dir.c index e837f7616..cdcb520f4 100644 --- a/ftfs/ftfs_dir.c +++ b/ftfs/ftfs_dir.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include diff --git a/ftfs/ftfs_dir.h b/ftfs/ftfs_dir.h index e76505bb5..18c90137a 100644 --- a/ftfs/ftfs_dir.h +++ b/ftfs/ftfs_dir.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_DIR_H #define _FTFS_DIR_H diff --git a/ftfs/ftfs_error.c b/ftfs/ftfs_error.c index 9a14371fd..e5da09d75 100644 --- a/ftfs/ftfs_error.c +++ b/ftfs/ftfs_error.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include diff --git a/ftfs/ftfs_error.h b/ftfs/ftfs_error.h index 1d7237aab..d8ec03738 100644 --- a/ftfs/ftfs_error.h +++ b/ftfs/ftfs_error.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_ERROR_H #define _FTFS_ERROR_H diff --git a/ftfs/ftfs_frwlock.c b/ftfs/ftfs_frwlock.c index 7ffbe102d..84fbbd1af 100644 --- a/ftfs/ftfs_frwlock.c +++ b/ftfs/ftfs_frwlock.c @@ -1,9 +1,11 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include "ftfs_frwlock.h" #include #include #include #include -#include +#include #include void __sched ftfs_down_read(struct rw_semaphore *sem) diff --git a/ftfs/ftfs_frwlock.h b/ftfs/ftfs_frwlock.h index 843de3a12..21fb3b367 100644 --- a/ftfs/ftfs_frwlock.h +++ b/ftfs/ftfs_frwlock.h @@ -1,7 +1,9 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef FTFS_FRWLOCK_H #define FTFS_FRWLOCK_H #include "ftfs_rwsem.h" -#include +#include #include #include #include diff --git a/ftfs/ftfs_fs.h b/ftfs/ftfs_fs.h index 8de24a8db..3a99a0a50 100644 --- a/ftfs/ftfs_fs.h +++ b/ftfs/ftfs_fs.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_FS_H #define _FTFS_FS_H #define FTFS_SUPER_MAGIC 0 diff --git a/ftfs/ftfs_rwsem.c b/ftfs/ftfs_rwsem.c index 7b7b6e768..62864a0bd 100644 --- a/ftfs/ftfs_rwsem.c +++ b/ftfs/ftfs_rwsem.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: //copied from 3.8 kernel /* rwsem.c: R/W semaphores: contention handling functions diff --git a/ftfs/ftfs_rwsem.h b/ftfs/ftfs_rwsem.h index 54225ede6..4e6b5676c 100644 --- a/ftfs/ftfs_rwsem.h +++ b/ftfs/ftfs_rwsem.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: /*as values and the counter type limits the number of * potential readers/writers to 32767 for 32 bits and 2147483647 * for 64 bits. @@ -39,7 +41,7 @@ static inline int __ftfs_down_read_trylock(struct rw_semaphore *sem) return 1; } } - return 0; + return 0; } @@ -50,7 +52,7 @@ static inline void __ftfs_down_write_nested(struct rw_semaphore *sem, int subcla { - long tmp; + long tmp; tmp = atomic_long_add_return(FTFS_RWSEM_ACTIVE_WRITE_BIAS, (atomic_long_t *)&sem->count); if (unlikely(tmp != FTFS_RWSEM_ACTIVE_WRITE_BIAS)) @@ -82,7 +84,7 @@ static inline void __ftfs_up_read(struct rw_semaphore *sem) long tmp; tmp = atomic_long_dec_return((atomic_long_t *)&sem->count); if (unlikely(tmp < -1 && (tmp & FTFS_RWSEM_ACTIVE_MASK) == 0)) - ftfs_rwsem_wake(sem); + ftfs_rwsem_wake(sem); } /* diff --git a/ftfs/ftfs_southbound.c b/ftfs/ftfs_southbound.c index d786299dd..9ce106d8c 100644 --- a/ftfs/ftfs_southbound.c +++ b/ftfs/ftfs_southbound.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include @@ -261,7 +263,7 @@ void detach_ftfs_southbound(struct task_struct *tsk) ftfs_exit_fs(tsk); } -void save_task_southbound(struct task_struct *tsk, +void save_task_southbound(struct task_struct *tsk, struct ftfs_southbound *save) { struct fs_struct *fs; diff --git a/ftfs/ftfs_southbound.h b/ftfs/ftfs_southbound.h index 41badcaaa..40c1da79d 100644 --- a/ftfs/ftfs_southbound.h +++ b/ftfs/ftfs_southbound.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_SOUTHBOUND_H #define _FTFS_SOUTHBOUND_H @@ -95,7 +97,7 @@ int ftfs_private_umount(void); int in_southbound_context(struct task_struct *tsk); -void save_task_southbound(struct task_struct *tsk, +void save_task_southbound(struct task_struct *tsk, struct ftfs_southbound *save); void restore_task_southbound(struct task_struct *tsk, struct ftfs_southbound *saved); diff --git a/ftfs/ftfs_stat.c b/ftfs/ftfs_stat.c index 3b6bd7a50..4d7d767c2 100644 --- a/ftfs/ftfs_stat.c +++ b/ftfs/ftfs_stat.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include diff --git a/ftfs/ftfs_stat.h b/ftfs/ftfs_stat.h index 63ad54c00..ecb9b2d71 100644 --- a/ftfs/ftfs_stat.h +++ b/ftfs/ftfs_stat.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_STAT_H #define _FTFS_STAT_H #include diff --git a/ftfs/ftfs_toku_lock.c b/ftfs/ftfs_toku_lock.c index dae432a32..273bf0cfc 100644 --- a/ftfs/ftfs_toku_lock.c +++ b/ftfs/ftfs_toku_lock.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include "ftfs_toku_lock.h" diff --git a/ftfs/ftfs_toku_lock.h b/ftfs/ftfs_toku_lock.h index d4e826790..98b745eab 100644 --- a/ftfs/ftfs_toku_lock.h +++ b/ftfs/ftfs_toku_lock.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_ERROR_H #define _FTFS_ERROR_H diff --git a/ftfs/toku_linkage.c b/ftfs/toku_linkage.c index 6df79d735..2fa588723 100644 --- a/ftfs/toku_linkage.c +++ b/ftfs/toku_linkage.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include diff --git a/ftfs/toku_zlib.c b/ftfs/toku_zlib.c index 5be18ea93..149f55bcd 100644 --- a/ftfs/toku_zlib.c +++ b/ftfs/toku_zlib.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include "ftfs.h" @@ -17,7 +19,7 @@ int deflateInit2_(z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy) { vfree(strm->workspace); init_stream_workspace(strm); - return zlib_deflateInit2(strm, level, method, + return zlib_deflateInit2(strm, level, method, windowBits, memLevel, strategy); } diff --git a/ftfs_fs/faked_std.h b/ftfs_fs/faked_std.h index 548afe2cd..2c1636f26 100644 --- a/ftfs_fs/faked_std.h +++ b/ftfs_fs/faked_std.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef FAKED_STD_LIB #define FAKED_STD_LIB diff --git a/ftfs_fs/ftfs.h b/ftfs_fs/ftfs.h index 71b762a44..d900aa117 100644 --- a/ftfs_fs/ftfs.h +++ b/ftfs_fs/ftfs.h @@ -1,7 +1,9 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_H #define _FTFS_H -# define FTFS_DEBUG_ON(err) +# define FTFS_DEBUG_ON(err) static inline void ftfs_error (const char * function, const char * fmt, ...) {} static inline void ftfs_log (const char * function, const char * fmt, ...) {} diff --git a/ftfs_fs/ftfs_bstore.c b/ftfs_fs/ftfs_bstore.c index cc2f9b5ce..affc29d45 100644 --- a/ftfs_fs/ftfs_bstore.c +++ b/ftfs_fs/ftfs_bstore.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include @@ -189,7 +191,7 @@ int ftfs_bstore_update_ino(struct ftfs_sb_info *sbi, ino_t ino) dbt_init(&next_ino_value_dbt, &curr_ino, sizeof(curr_ino)); - TXN_GOTO_LABEL(retry); + TXN_GOTO_LABEL(retry); { ftfs_bstore_txn_begin(sbi->db_env, NULL, &txn, TXN_MAY_WRITE); diff --git a/ftfs_fs/ftfs_fs.h b/ftfs_fs/ftfs_fs.h index 6d3603948..5716f6e1a 100644 --- a/ftfs_fs/ftfs_fs.h +++ b/ftfs_fs/ftfs_fs.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef FTFS_FS_H #define FTFS_FS_H diff --git a/ftfs_fs/ftfs_metadata.c b/ftfs_fs/ftfs_metadata.c index b07210212..2b9a3c6ea 100644 --- a/ftfs_fs/ftfs_metadata.c +++ b/ftfs_fs/ftfs_metadata.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include diff --git a/ftfs_fs/ftfs_module.c b/ftfs_fs/ftfs_module.c index 3fdad5eb1..6b5f6c853 100644 --- a/ftfs_fs/ftfs_module.c +++ b/ftfs_fs/ftfs_module.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include "ftfs_fs.h" diff --git a/ftfs_fs/ftfs_southbound.h b/ftfs_fs/ftfs_southbound.h index 698d5f429..dcddc2995 100644 --- a/ftfs_fs/ftfs_southbound.h +++ b/ftfs_fs/ftfs_southbound.h @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef _FTFS_SOUTHBOUND_H #define _FTFS_SOUTHBOUND_H @@ -16,7 +18,7 @@ extern size_t db_cachesize; static inline int ftfs_super_statfs(struct dentry * d, struct kstatfs * buf) { return 0; } static inline int attach_ftfs_southbound(struct task_struct *tsk) { return 0; } -static inline void save_task_southbound(struct task_struct *tsk, +static inline void save_task_southbound(struct task_struct *tsk, struct ftfs_southbound *save) { } static inline void restore_task_southbound(struct task_struct *tsk, struct ftfs_southbound *saved) { } diff --git a/ftfs_fs/ftfs_super.c b/ftfs_fs/ftfs_super.c index 153a9c566..58f2ab590 100644 --- a/ftfs_fs/ftfs_super.c +++ b/ftfs_fs/ftfs_super.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #include #include #include @@ -147,7 +149,7 @@ ftfs_setup_inode(struct super_block *sb, struct ftfs_meta_key *meta_key, struct ftfs_metadata *meta); static inline void -ftfs_setup_metadata(struct ftfs_metadata *meta, umode_t mode, +ftfs_setup_metadata(struct ftfs_metadata *meta, umode_t mode, loff_t size, dev_t rdev, ino_t ino) { struct timespec now_tspec; @@ -334,7 +336,7 @@ ftfs_do_unlink(struct ftfs_meta_key *meta_key, DB_TXN *txn, * we lock the whole subtree before rename for exclusive access. for * either success or fail, you have to call unlock or else you are * hosed - * + * * only the children are locked not the parent */ static int prelock_children_for_rename(struct dentry *object, struct list_head *locked) diff --git a/ftfs_fs/rbtreekv.c b/ftfs_fs/rbtreekv.c index b4712dfa3..74280a08b 100644 --- a/ftfs_fs/rbtreekv.c +++ b/ftfs_fs/rbtreekv.c @@ -1,3 +1,5 @@ +/* -*- mode: C++; c-basic-offset: 8; indent-tabs-mode: t -*- */ +// vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: #ifndef RBTREE_KV_H #define RBTREE_KV_H @@ -191,7 +193,7 @@ static int rb_kv_insert(DB *db, struct rb_kv_node *node) new = &((*new)->rb_left); else if (result > 0) new = &((*new)->rb_right); - else + else return -1; } @@ -363,7 +365,7 @@ static int dbc_c_set_bounds(DBC *dbc, const DBT *left_key, const DBT *right_key, ret = dbt_alloc_and_copy(&wrap->right, right_key); BUG_ON(ret != 0); - return 0; + return 0; } static int dbc_c_getf_current(DBC *c, uint32_t flag, YDB_CALLBACK_FUNCTION f, void *extra)