cleanup: remove trailing whitespace

This patch just removes trailing whitespace.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2013-08-26 17:15:32 -04:00
1 parent 47cff72748
commit 290bb8c378
50 files changed
+319 -319

No files matched your search

+10 -10
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2004 by Hans Reiser, licensing governed by
/*
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -128,10 +128,10 @@ int reiserfs_bitmap_compare(reiserfs_bitmap_t *bm1, reiserfs_bitmap_t *bm2)
return diff;
}
/*
Does X | Y for every bit of the bitmap `to`, where
X - bit of the `to` bitmap,
Y - `from` bitmap.
/*
Does X | Y for every bit of the bitmap `to`, where
X - bit of the `to` bitmap,
Y - `from` bitmap.
Save result in the `to` bitmap.
*/
void reiserfs_bitmap_disjunction(reiserfs_bitmap_t *to,
@@ -152,10 +152,10 @@ void reiserfs_bitmap_disjunction(reiserfs_bitmap_t *to,
}
}
/*
Does X & !Y for every bit of the bitmap `base`, where
X - bit of the `base` bitmap,
Y - `exclude` bitmap.
/*
Does X & !Y for every bit of the bitmap `base`, where
X - bit of the `base` bitmap,
Y - `exclude` bitmap.
Save result in the `base` bitmap.
*/
void reiserfs_bitmap_delta(reiserfs_bitmap_t *base,
+7 -7
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -25,14 +25,14 @@
if lnum is larger than 0 we put items into the left node
if rnum is larger than 0 we put items into the right node
if snum1 is larger than 0 we put items into the new node s1
if snum2 is larger than 0 we put items into the new node s2
if snum2 is larger than 0 we put items into the new node s2
Note that all *num* count new items being created.
It would be easier to read balance_leaf() if each of these summary
lines was a separate procedure rather than being inlined. I think
that there are many passages here and in balance_leaf_when_delete() in
which two calls to one procedure can replace two passages, and it
might save cache space and improve software maintenance costs to do so.
might save cache space and improve software maintenance costs to do so.
Vladimir made the perceptive comment that we should offload most of
the decision making in this function into fix_nodes/check_balance, and
@@ -220,13 +220,13 @@ static int balance_leaf( /*struct reiserfs_transaction_handle *th, */
struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path);
/* struct buffer_head * tbF0 = PATH_H_PPARENT (tb->tb_path, 0);
int S0_b_item_order = PATH_H_B_ITEM_ORDER (tb->tb_path, 0);*/
int item_pos = PATH_LAST_POSITION(tb->tb_path); /* index into the array of item headers in S[0]
int item_pos = PATH_LAST_POSITION(tb->tb_path); /* index into the array of item headers in S[0]
of the affected item */
struct buffer_info bi;
struct buffer_head *S_new[2]; /* new nodes allocated to hold what could not fit into S */
int snum[2]; /* number of items that will be placed into S_new (includes partially shifted items) */
int sbytes[2]; /* if an item is partially shifted into S_new then
if it is a directory item
int sbytes[2]; /* if an item is partially shifted into S_new then
if it is a directory item
it is the number of entries from the item that are shifted into S_new
else
it is the number of bytes from the item that are shifted into S_new
@@ -1281,7 +1281,7 @@ static int balance_leaf( /*struct reiserfs_transaction_handle *th, */
n_rem);
//B_N_PKEY(S_new[i],0)->k_offset += n_rem;
//
//
tb->insert_size[0] = n_rem;
if (!n_rem)
+18 -18
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -32,8 +32,8 @@
** get_direct_parent
** get_neighbors
** fix_nodes
**
**
**
**
**/
#include "includes.h"
@@ -555,11 +555,11 @@ static int get_num_ver(int mode, struct tree_balance *tb, int h,
int needed_nodes;
int start_item, /* position of item we start filling node from */
end_item, /* position of item we finish filling node by */
start_bytes, /* number of first bytes (entries for directory) of start_item-th item
start_bytes, /* number of first bytes (entries for directory) of start_item-th item
we do not include into node that is being filled */
end_bytes; /* number of last bytes (entries for directory) of end_item-th item
end_bytes; /* number of last bytes (entries for directory) of end_item-th item
we do node include into node that is being filled */
int splitted_item_positions[2]; /* these are positions in virtual item of items,
int splitted_item_positions[2]; /* these are positions in virtual item of items,
that are splitted between S[0] and S1new and S1new and S2new */
max_node_size = MAX_CHILD_SIZE(tb->tb_fs->fs_blocksize);
@@ -816,7 +816,7 @@ static int item_length(struct tree_balance *tb, int item_num)
/* Set parameters for balancing.
* Performs write of results of analysis of balancing into structure tb,
* where it will later be used by the functions that actually do the balancing.
* where it will later be used by the functions that actually do the balancing.
* Parameters:
* tb tree_balance structure;
* h current level of the node;
@@ -1542,7 +1542,7 @@ static inline int can_node_be_removed(int mode, int lfree, int sfree, int rfree,
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste;
* Returns: 1 - schedule occured;
* Returns: 1 - schedule occured;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
@@ -1575,7 +1575,7 @@ static int ip_check_balance( /*struct reiserfs_transaction_handle *th, */ struct
/* we perform 8 calls to get_num_ver(). For each call we calculate five
parameters. where 4th parameter is s1bytes and 5th - s2bytes */
short snum012[40] = { 0, }; /* s0num, s1num, s2num for 8 cases
short snum012[40] = { 0, }; /* s0num, s1num, s2num for 8 cases
0,1 - do not shift and do not shift but bottle
2 - shift only whole item to left
3 - shift to left and bottle as much as possible
@@ -1680,7 +1680,7 @@ static int ip_check_balance( /*struct reiserfs_transaction_handle *th, */ struct
{
int lpar, rpar, nset, lset, rset, lrset;
/*
/*
* regular overflowing of the node
*/
@@ -1870,7 +1870,7 @@ static int ip_check_balance( /*struct reiserfs_transaction_handle *th, */ struct
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste;
* Returns: 1 - schedule occured;
* Returns: 1 - schedule occured;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
@@ -2058,7 +2058,7 @@ static int dc_check_balance_internal(struct tree_balance *tb, int h)
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste;
* Returns: 1 - schedule occured;
* Returns: 1 - schedule occured;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
@@ -2135,7 +2135,7 @@ static int dc_check_balance_leaf(struct tree_balance *tb, int h)
* h current level of the node;
* inum item number in S[h];
* mode d - delete, c - cut.
* Returns: 1 - schedule occured;
* Returns: 1 - schedule occured;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
@@ -2161,7 +2161,7 @@ static int dc_check_balance(struct tree_balance *tb, int h)
* h current level of the node;
* inum item number in S[h];
* mode i - insert, p - paste, d - delete, c - cut.
* Returns: 1 - schedule occured;
* Returns: 1 - schedule occured;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
@@ -2322,15 +2322,15 @@ static void free_virtual_node_mem(struct tree_balance *tb)
* analyze what and where should be moved;
* get sufficient number of new nodes;
* Balancing will start only after all resources will be collected at a time.
*
*
* When ported to SMP kernels, only at the last moment after all needed nodes
* are collected in cache, will the resources be locked using the usual
* textbook ordered lock acquisition algorithms. Note that ensuring that
* this code neither write locks what it does not need to write lock nor locks out of order
* will be a pain in the butt that could have been avoided. Grumble grumble. -Hans
*
*
* fix is meant in the sense of render unchanging
*
*
* Latency might be improved by first gathering a list of what buffers are needed
* and then getting as many of them in parallel as possible? -Hans
*
@@ -2342,7 +2342,7 @@ static void free_virtual_node_mem(struct tree_balance *tb)
* ins_ih & ins_sd are used when inserting
* Returns: 1 - schedule occurred while the function worked;
* 0 - schedule didn't occur while the function worked;
* -1 - if no_disk_space
* -1 - if no_disk_space
*/
int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb,
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -11,7 +11,7 @@
* (see Applied Cryptography, 2nd edition, p448).
*
* Jeremy Fitzhardinge <jeremy@zip.com.au> 1998
*
*
* Jeremy has agreed to the contents of reiserfs/README. -Hans
* Yura's function is added (04/07/2000)
*/
+8 -8
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -126,7 +126,7 @@ static void internal_insert_childs(reiserfs_filsys_t *fs,
bh[i]->b_blocknr);
/*
set_dc_child_size (new_dc + i,
MAX_CHILD_SIZE(bh[i]->b_size) -
MAX_CHILD_SIZE(bh[i]->b_size) -
get_blkh_free_space (B_BLK_HEAD (bh[i])));
set_dc_child_blocknr (new_dc + i, bh[i]->b_blocknr); */
}
@@ -227,7 +227,7 @@ static void internal_delete_childs(reiserfs_filsys_t *fs,
/* copy cpy_num node pointers and cpy_num - 1 items from buffer src to buffer dest
* last_first == FIRST_TO_LAST means, that we copy first items from src to tail of dest
* last_first == LAST_TO_FIRST means, that we copy last items from src to head of dest
* last_first == LAST_TO_FIRST means, that we copy last items from src to head of dest
*/
static void internal_copy_pointers_items(reiserfs_filsys_t *fs,
struct buffer_info *dest_bi,
@@ -314,7 +314,7 @@ static void internal_move_pointers_items(reiserfs_filsys_t *fs,
if (last_first == FIRST_TO_LAST) { /* shift_left occurs */
first_pointer = 0;
first_item = 0;
/* delete cpy_num - del_par pointers and keys starting for pointers with first_pointer,
/* delete cpy_num - del_par pointers and keys starting for pointers with first_pointer,
for key - with first_item */
internal_delete_pointers_items(fs, src_bi, first_pointer,
first_item, cpy_num - del_par);
@@ -367,7 +367,7 @@ static void internal_insert_key(reiserfs_filsys_t *fs, struct buffer_info *dest_
}
}
/* Insert d_key'th (delimiting) key from buffer cfl to tail of dest.
/* Insert d_key'th (delimiting) key from buffer cfl to tail of dest.
* Copy pointer_amount node pointers and pointer_amount - 1 items from buffer src to buffer dest.
* Replace d_key'th key in buffer cfl.
* Delete pointer_amount items and node pointers from buffer src.
@@ -432,7 +432,7 @@ static void internal_shift1_left(struct tree_balance *tb,
FIRST_TO_LAST, pointer_amount, 1);
}
/* Insert d_key'th (delimiting) key from buffer cfr to head of dest.
/* Insert d_key'th (delimiting) key from buffer cfr to head of dest.
* Copy n node pointers and n - 1 items from buffer src to buffer dest.
* Replace d_key'th key in buffer cfr.
* Delete n items and node pointers from buffer src.
@@ -610,7 +610,7 @@ int balance_internal(struct tree_balance *tb, /* tree_balance structure
this means that new pointers and items must be inserted AFTER *
child_pos
}
else
else
{
it is the position of the leftmost pointer that must be deleted (together with
its corresponding key to the left of the pointer)
@@ -691,7 +691,7 @@ int balance_internal(struct tree_balance *tb, /* tree_balance structure
set_dc(dc, MAX_CHILD_SIZE(insert_ptr[k]->b_size) -
get_blkh_free_space(B_BLK_HEAD(insert_ptr[k])),
insert_ptr[k]->b_blocknr);
/*
/*
set_dc_child_size (dc, MAX_CHILD_SIZE(insert_ptr[k]->b_size) -
get_blkh_free_space (B_BLK_HEAD(insert_ptr[k])));
set_dc_child_blocknr (dc, insert_ptr[k]->b_blocknr);
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
+4 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2004 by Hans Reiser, licensing governed by
* Copyright 2002-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -546,7 +546,7 @@ int reiserfs_open_journal(reiserfs_filsys_t *fs, char *j_filename, int flags)
return 0;
}
/* initialize super block's journal related fields and journal header fields.
/* initialize super block's journal related fields and journal header fields.
* If len is 0 - make journal of default size */
int reiserfs_create_journal(reiserfs_filsys_t *fs, char *j_device, /* journal device name */
unsigned long offset, /* journal offset on the j_device */
@@ -562,7 +562,7 @@ int reiserfs_create_journal(reiserfs_filsys_t *fs, char *j_device, /* journal de
sb = fs->fs_ondisk_sb;
if (!j_device || !strcmp(j_device, fs->fs_file_name)) {
/* Journal is to be on the host device, check the amount space for the
/* Journal is to be on the host device, check the amount space for the
* journal on it. */
len =
len ? len : journal_default_size(fs->fs_super_bh->b_blocknr,
@@ -847,7 +847,7 @@ int replay_journal(reiserfs_filsys_t *fs)
return 0;
}
/* Smth strange with journal header or journal. We cannot say for sure what was the last
/* Smth strange with journal header or journal. We cannot say for sure what was the last
replaied transaction, but relying on JH data is preferable. */
replayed = 0;
+10 -10
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -125,8 +125,8 @@ static void leaf_copy_dir_entries(reiserfs_filsys_t *fs,
DEH_SIZE * copy_count + copy_records_len);
}
/* Copy the first (if last_first == FIRST_TO_LAST) or last (last_first == LAST_TO_FIRST) item or
part of it or nothing (see the return 0 below) from SOURCE to the end
/* Copy the first (if last_first == FIRST_TO_LAST) or last (last_first == LAST_TO_FIRST) item or
part of it or nothing (see the return 0 below) from SOURCE to the end
(if last_first) or beginning (!last_first) of the DEST */
/* returns 1 if anything was copied, else 0 */
static int leaf_copy_boundary_item(reiserfs_filsys_t *fs,
@@ -345,7 +345,7 @@ static void leaf_item_bottle(reiserfs_filsys_t *fs,
else {
struct item_head n_ih;
/* copy part of the body of the item number 'item_num' of SOURCE to the end of the DEST
/* copy part of the body of the item number 'item_num' of SOURCE to the end of the DEST
part defined by 'cpy_bytes'; create new item header; change old item_header (????);
n_ih = new item_header;
*/
@@ -372,7 +372,7 @@ static void leaf_item_bottle(reiserfs_filsys_t *fs,
else {
struct item_head n_ih;
/* copy part of the body of the item number 'item_num' of SOURCE to the begin of the DEST
/* copy part of the body of the item number 'item_num' of SOURCE to the begin of the DEST
part defined by 'cpy_bytes'; create new item header;
n_ih = new item_header;
*/
@@ -638,7 +638,7 @@ static void leaf_delete_items_entirely(reiserfs_filsys_t *sb,
struct buffer_info *bi,
int first, int del_num);
/* If del_bytes == -1, starting from position 'first' delete del_num items in whole in buffer CUR.
If not.
If not.
If last_first == 0. Starting from position 'first' delete del_num-1 items in whole. Delete part of body of
the first item. Part defined by del_bytes. Don't delete first item header
If last_first == 1. Starting from position 'first+1' delete del_num-1 items in whole. Delete part of body of
@@ -689,7 +689,7 @@ void leaf_delete_items(reiserfs_filsys_t *fs,
/* len = body len of item */
len = get_ih_item_len(ih);
/* delete the part of the last item of the bh
/* delete the part of the last item of the bh
do not delete item header
*/
leaf_cut_from_buffer(fs, cur_bi, B_NR_ITEMS(bh) - 1,
@@ -774,7 +774,7 @@ void leaf_insert_into_buf(reiserfs_filsys_t *s,
bh->b_blocknr, bh);
}
/* paste paste_size bytes to affected_item_num-th item.
/* paste paste_size bytes to affected_item_num-th item.
When item is a directory, this only prepare space for new entries */
void leaf_paste_in_buffer(reiserfs_filsys_t *fs,
struct buffer_info *bi,
@@ -813,7 +813,7 @@ void leaf_paste_in_buffer(reiserfs_filsys_t *fs,
//if (mem_mode == REISERFS_USER_MEM) {
//memset (bh->b_data + unmoved_loc - paste_size, 0, zeros_number);
//copy_from_user (bh->b_data + unmoved_loc - paste_size + zeros_number, body, paste_size - zeros_number);
//} else
//} else
{
if (!pos_in_item) {
/* shift data to right */
@@ -939,7 +939,7 @@ static int leaf_cut_entries(struct buffer_head *bh,
/* when cut item is part of regular file
pos_in_item - first byte that must be cut
cut_size - number of bytes to be cut beginning from pos_in_item
when cut item is part of directory
pos_in_item - number of first deleted entry
cut_size - count of deleted entries
+5 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -248,9 +248,9 @@ int is_any_reiserfs_magic_string(struct reiserfs_super_block *rs)
int get_reiserfs_format(struct reiserfs_super_block *sb)
{
/* after conversion to 3.6 format we change magic correctly,
but do not change sb_format. When we create non-standard journal
field format in sb get adjusted correctly. Thereby, for standard
/* after conversion to 3.6 format we change magic correctly,
but do not change sb_format. When we create non-standard journal
field format in sb get adjusted correctly. Thereby, for standard
journal we should rely on magic and for non-standard - on format */
if (is_reiserfs_3_5_magic_string(sb) ||
(is_reiserfs_jr_magic_string(sb) &&
@@ -1015,7 +1015,7 @@ void set_type(int format, struct reiserfs_key *key, int type)
set_key_type_v2(key, type);
}
//
//
void set_offset(int format, struct reiserfs_key *key, loff_t offset)
{
if (format == KEY_FORMAT_1)
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
@@ -811,7 +811,7 @@ void print_tb(int mode, int item_pos, int pos_in_item, struct tree_balance *tb,
tbSh = PATH_H_PBUFFER(tb->tb_path, h);
tbFh = PATH_H_PPARENT(tb->tb_path, h);
} else {
/* printk ("print_tb: h=%d, PATH_H_PATH_OFFSET=%d, path_length=%d\n",
/* printk ("print_tb: h=%d, PATH_H_PATH_OFFSET=%d, path_length=%d\n",
h, PATH_H_PATH_OFFSET (tb->tb_path, h), tb->tb_path->path_length); */
tbSh = 0;
tbFh = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* Copyright 2000-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* Copyright 1996-2004 by Hans Reiser, licensing governed by
* reiserfsprogs/README
*/