lkml.org 
[lkml]   [2006]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [UPDATE][1/24]ext3 block allocation/reservation fixes to support 2^32 blocks

See my comments in the lines.

Regards,
lmwang

* sho@tnes.nec.co.jp <sho@tnes.nec.co.jp> [2006-05-25 21:40:11 +0900]:

> Summary of this patch:
> [1/24] modify around the block allocation code(ext3)
> - Modify around the ext3 block allocation code to replace
> "int" type filesystem block number with "unsigned long".
>
> Signed-off-by: Takashi Sato sho@tnes.nec.co.jp
> ---
> diff -upNr -X linux-2.6.17-rc4/Documentation/dontdiff linux-2.6.17-rc4/fs/ext3/balloc.c linux-2.6.17-rc4.tmp/fs/ext3/balloc.c
> --- linux-2.6.17-rc4/fs/ext3/balloc.c 2006-05-25 16:18:35.848388909 +0900
> +++ linux-2.6.17-rc4.tmp/fs/ext3/balloc.c 2006-05-25 16:27:50.071038370 +0900
> @@ -223,7 +223,7 @@ void ext3_rsv_window_add(struct super_bl
> {
> struct rb_root *root = &EXT3_SB(sb)->s_rsv_window_root;
> struct rb_node *node = &rsv->rsv_node;
> - unsigned int start = rsv->rsv_start;
> + unsigned long start = rsv->rsv_start;
>
> struct rb_node ** p = &root->rb_node;
> struct rb_node * parent = NULL;
> @@ -656,7 +656,8 @@ ext3_try_to_allocate(struct super_block
> struct buffer_head *bitmap_bh, int goal,
> unsigned long *count, struct ext3_reserve_window *my_rsv)
> {
> - int group_first_block, start, end;
> + unsigned long group_first_block;
> + int start, end;
unsigned long start, end;

start and end will get data from my_rcv, so it need use u32 also.

> unsigned long num = 0;
>
> /* we do allocation within the reservation window if we have a window */
> @@ -766,12 +767,13 @@ fail_access:
> static int find_next_reservable_window(
> struct ext3_reserve_window_node *search_head,
> struct ext3_reserve_window_node *my_rsv,
> - struct super_block * sb, int start_block,
> - int last_block)
> + struct super_block * sb,
> + unsigned long start_block,
> + unsigned long last_block)
> {
> struct rb_node *next;
> struct ext3_reserve_window_node *rsv, *prev;
> - int cur;
> + unsigned long cur;
> int size = my_rsv->rsv_goal_size;
unsigned long size = my_rsv->rsv_goal_size;


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2006-05-25 15:31    [W:2.212 / U:1.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site