Skip to content

Commit

Permalink
reiserfs: strip trailing whitespace
Browse files Browse the repository at this point in the history
This patch strips trailing whitespace from the reiserfs code.

Signed-off-by: Jeff Mahoney <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jeffmahoney authored and torvalds committed Mar 30, 2009
1 parent 3cd6dbe commit 0222e65
Show file tree
Hide file tree
Showing 19 changed files with 184 additions and 184 deletions.
4 changes: 2 additions & 2 deletions fs/reiserfs/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[LICENSING]
[LICENSING]

ReiserFS is hereby licensed under the GNU General
Public License version 2.
Expand Down Expand Up @@ -31,7 +31,7 @@ the GPL as not allowing those additional licensing options, you read
it wrongly, and Richard Stallman agrees with me, when carefully read
you can see that those restrictions on additional terms do not apply
to the owner of the copyright, and my interpretation of this shall
govern for this license.
govern for this license.

Finally, nothing in this license shall be interpreted to allow you to
fail to fairly credit me, or to remove my credits, without my
Expand Down
14 changes: 7 additions & 7 deletions fs/reiserfs/do_balan.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@ inline void do_balance_mark_leaf_dirty(struct tree_balance *tb,
#define do_balance_mark_internal_dirty do_balance_mark_leaf_dirty
#define do_balance_mark_sb_dirty do_balance_mark_leaf_dirty

/* summary:
/* summary:
if deleting something ( tb->insert_size[0] < 0 )
return(balance_leaf_when_delete()); (flag d handled here)
else
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
Expand Down Expand Up @@ -288,15 +288,15 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h
)
{
struct buffer_head *tbS0 = PATH_PLAST_BUFFER(tb->tb_path);
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
Expand Down Expand Up @@ -1983,7 +1983,7 @@ static inline void do_balance_starts(struct tree_balance *tb)
/* store_print_tb (tb); */

/* do not delete, just comment it out */
/* print_tb(flag, PATH_LAST_POSITION(tb->tb_path), tb->tb_path->pos_in_item, tb,
/* print_tb(flag, PATH_LAST_POSITION(tb->tb_path), tb->tb_path->pos_in_item, tb,
"check");*/
RFALSE(check_before_balancing(tb), "PAP-12340: locked buffers in TB");
#ifdef CONFIG_REISERFS_CHECK
Expand Down
8 changes: 4 additions & 4 deletions fs/reiserfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
** insertion/balancing, for files that are written in one write.
** It avoids unnecessary tail packings (balances) for files that are written in
** multiple writes and are small enough to have tails.
**
**
** file_release is called by the VFS layer when the file is closed. If
** this is the last open file descriptor, and the file
** small enough to have a tail, and the tail is currently in an
** unformatted node, the tail is converted back into a direct item.
**
**
** We use reiserfs_truncate_file to pack the tail, since it already has
** all the conditions coded.
** all the conditions coded.
*/
static int reiserfs_file_release(struct inode *inode, struct file *filp)
{
Expand Down Expand Up @@ -223,7 +223,7 @@ int reiserfs_commit_page(struct inode *inode, struct page *page,
}

/* Write @count bytes at position @ppos in a file indicated by @file
from the buffer @buf.
from the buffer @buf.
generic_file_write() is only appropriate for filesystems that are not seeking to optimize performance and want
something simple that works. It is not for serious use by general purpose filesystems, excepting the one that it was
Expand Down
38 changes: 19 additions & 19 deletions fs/reiserfs/fix_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
** get_direct_parent
** get_neighbors
** fix_nodes
**
**
**
**
**/

#include <linux/time.h>
Expand Down Expand Up @@ -377,9 +377,9 @@ 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 split_item_positions[2]; /* these are positions in virtual item of
items, that are split between S[0] and
Expand Down Expand Up @@ -569,7 +569,7 @@ extern struct tree_balance *cur_tb;

/* 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;
Expand Down Expand Up @@ -1204,7 +1204,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 occurred;
* Returns: 1 - schedule occurred;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
Expand Down Expand Up @@ -1239,7 +1239,7 @@ static int ip_check_balance(struct tree_balance *tb, int h)
/* 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
Expand Down Expand Up @@ -1288,7 +1288,7 @@ static int ip_check_balance(struct tree_balance *tb, int h)

create_virtual_node(tb, h);

/*
/*
determine maximal number of items we can shift to the left neighbor (in tb structure)
and the maximal number of bytes that can flow to the left neighbor
from the left most liquid item that cannot be shifted from S[0] entirely (returned value)
Expand Down Expand Up @@ -1349,13 +1349,13 @@ static int ip_check_balance(struct tree_balance *tb, int h)

{
int lpar, rpar, nset, lset, rset, lrset;
/*
/*
* regular overflowing of the node
*/

/* get_num_ver works in 2 modes (FLOW & NO_FLOW)
/* get_num_ver works in 2 modes (FLOW & NO_FLOW)
lpar, rpar - number of items we can shift to left/right neighbor (including splitting item)
nset, lset, rset, lrset - shows, whether flowing items give better packing
nset, lset, rset, lrset - shows, whether flowing items give better packing
*/
#define FLOW 1
#define NO_FLOW 0 /* do not any splitting */
Expand Down Expand Up @@ -1545,7 +1545,7 @@ static int ip_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;
* Returns: 1 - schedule occurred;
* Returns: 1 - schedule occurred;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
Expand Down Expand Up @@ -1728,7 +1728,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 occurred;
* Returns: 1 - schedule occurred;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
Expand Down Expand Up @@ -1822,7 +1822,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 occurred;
* Returns: 1 - schedule occurred;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
Expand Down Expand Up @@ -1851,7 +1851,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 occurred;
* Returns: 1 - schedule occurred;
* 0 - balancing for higher levels needed;
* -1 - no balancing for higher levels needed;
* -2 - no disk space.
Expand Down Expand Up @@ -2296,15 +2296,15 @@ static int wait_tb_buffers_until_unlocked(struct tree_balance *p_s_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
*
Expand All @@ -2316,7 +2316,7 @@ static int wait_tb_buffers_until_unlocked(struct tree_balance *p_s_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, struct item_head *p_s_ins_ih, // item head of item being inserted
Expand Down
2 changes: 1 addition & 1 deletion fs/reiserfs/hashes.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* (see Applied Cryptography, 2nd edition, p448).
*
* Jeremy Fitzhardinge <[email protected]> 1998
*
*
* Jeremy has agreed to the contents of reiserfs/README. -Hans
* Yura's function is added (04/07/2000)
*/
Expand Down
10 changes: 5 additions & 5 deletions fs/reiserfs/ibalance.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static void internal_delete_childs(struct buffer_info *cur_bi, int from, int n)

/* 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(struct buffer_info *dest_bi,
struct buffer_head *src,
Expand Down Expand Up @@ -385,7 +385,7 @@ static void internal_move_pointers_items(struct buffer_info *dest_bi,
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(src_bi, first_pointer,
first_item, cpy_num - del_par);
Expand Down Expand Up @@ -453,7 +453,7 @@ static void internal_insert_key(struct buffer_info *dest_bi, int dest_position_b
}
}

/* 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.
Expand Down Expand Up @@ -518,7 +518,7 @@ static void internal_shift1_left(struct tree_balance *tb,
/* internal_move_pointers_items (tb->L[h], tb->S[h], 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.
Expand Down Expand Up @@ -749,7 +749,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)
Expand Down
Loading

0 comments on commit 0222e65

Please sign in to comment.