]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/reiserfs/reiserfs.h
Merge remote-tracking branch 'spi/topic/cleanup' into spi-sh-msiof
[karo-tx-linux.git] / fs / reiserfs / reiserfs.h
index 2195e7f2297fea42d2e37d0bcf87cd5f0f5a594f..bf53888c7f59a677081c1e84425b9a236affccbc 100644 (file)
@@ -2471,12 +2471,6 @@ struct tree_balance {
        /* number of items that fall into left most node when S[0] splits */
        int s0num;
 
-       /* number of items that fall into first new node when S[0] splits */
-       int s1num;
-
-       /* number of items that fall into second new node when S[0] splits */
-       int s2num;
-
        /*
         * number of bytes which can flow to the left neighbor from the left
         * most liquid item that cannot be shifted from S[0] entirely
@@ -2491,12 +2485,30 @@ struct tree_balance {
         */
        int rbytes;
 
+
+       /*
+        * index into the array of item headers in
+        * S[0] of the affected item
+        */
+       int item_pos;
+
+       /* new nodes allocated to hold what could not fit into S */
+       struct buffer_head *S_new[2];
+
+       /*
+        * number of items that will be placed into nodes in S_new
+        * when S[0] splits
+        */
+       int snum[2];
+
        /*
-        * number of bytes which flow to the first new node when S[0] splits
+        * number of bytes which flow to nodes in S_new when S[0] splits
         * note: if S[0] splits into 3 nodes, then items do not need to be cut
         */
-       int s1bytes;
-       int s2bytes;
+       int sbytes[2];
+
+       int pos_in_item;
+       int zeroes_num;
 
        /*
         * buffers which are to be freed after do_balance finishes
@@ -2864,7 +2876,7 @@ void reiserfs_free_jh(struct buffer_head *bh);
 int reiserfs_add_tail_list(struct inode *inode, struct buffer_head *bh);
 int reiserfs_add_ordered_list(struct inode *inode, struct buffer_head *bh);
 int journal_mark_dirty(struct reiserfs_transaction_handle *,
-                      struct super_block *, struct buffer_head *bh);
+                      struct buffer_head *bh);
 
 static inline int reiserfs_file_data_log(struct inode *inode)
 {
@@ -2914,10 +2926,8 @@ int journal_init(struct super_block *, const char *j_dev_name, int old_format,
 int journal_release(struct reiserfs_transaction_handle *, struct super_block *);
 int journal_release_error(struct reiserfs_transaction_handle *,
                          struct super_block *);
-int journal_end(struct reiserfs_transaction_handle *, struct super_block *,
-               unsigned long);
-int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *,
-                    unsigned long);
+int journal_end(struct reiserfs_transaction_handle *);
+int journal_end_sync(struct reiserfs_transaction_handle *);
 int journal_mark_freed(struct reiserfs_transaction_handle *,
                       struct super_block *, b_blocknr_t blocknr);
 int journal_transaction_should_end(struct reiserfs_transaction_handle *, int);
@@ -2926,7 +2936,7 @@ int reiserfs_in_journal(struct super_block *sb, unsigned int bmap_nr,
 int journal_begin(struct reiserfs_transaction_handle *,
                  struct super_block *sb, unsigned long);
 int journal_join_abort(struct reiserfs_transaction_handle *,
-                      struct super_block *sb, unsigned long);
+                      struct super_block *sb);
 void reiserfs_abort_journal(struct super_block *sb, int errno);
 void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
 int reiserfs_allocate_list_bitmaps(struct super_block *s,