Re: [UPDATE][1/24]ext3 block allocation/reservation fixes to support 2^32 blocks

Limin Wang <[email protected]>
Newsgroups gmane.linux.kernel,gmane.comp.file-systems.ext2.devel
Organization Exavio.Inc
Message-ID <[email protected]>
See my comments in the lines.

Regards,
lmwang

* [email protected] <[email protected]> [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 [email protected]
> ---
> 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;
signature.asc (application/pgp-signature, 481 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQEVAwUBRHWxKjS5KN/wlg3IAQLX+Qf+IHbg+QfhOXRIucmkMc7BLZLA2j1MxYVU
U9dAJ+UxLo2FbsXmvvffC/ahDQeHdsLQVMyj5kcrejcD0pUYXK93h2opuPbod52m
ShK/NNQbqfSApUET+z5cgFkl38soySfGeVseRqw0FVWfwaLFSeiQlLu5OC6hTpTW
gHiNfCz2gJevz/5+1yexkiRikowhIa4BTtpH2OBXzz0fjklnQPQpei+j2QlLQB7S
1qV+ywfq8U2l93QnyyDf7DpFDGeKSg1+r1h73FQuwnFGxc4F1sY+miIVJDfGr04h
3M7WF+1P98yBKaf6XCxoF/pyP3DBC2WqJg9JGneOEzX2UCLLYgYBgw==
=v+OH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.