lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Nov 2010 13:33:37 +0100 (CET)
From:	Lukas Czerner <lczerner@...hat.com>
To:	Namhyung Kim <namhyung@...il.com>
cc:	Theodore Tso <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 11/15] mke2fs: fix determination of size_type

On Mon, 29 Nov 2010, Namhyung Kim wrote:

> In original code, 'huge' type could not be selected because it
> always be caught for 'big' type. Change the ordering.
> 
> Signed-off-by: Namhyung Kim <namhyung@...il.com>
> ---
>  misc/mke2fs.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/misc/mke2fs.c b/misc/mke2fs.c
> index 90cc206..b88decf 100644
> --- a/misc/mke2fs.c
> +++ b/misc/mke2fs.c
> @@ -947,10 +947,10 @@ static char **parse_fs_type(const char *fs_type,
>  		size_type = "floppy";
>  	else if (fs_blocks_count < 512 * meg)
>  		size_type = "small";
> -	else if (fs_blocks_count >= 4 * 1024 * 1024 * meg)
> -		size_type = "big";
>  	else if (fs_blocks_count >= 16 * 1024 * 1024 * meg)
>  		size_type = "huge";
> +	else if (fs_blocks_count >= 4 * 1024 * 1024 * meg)
> +		size_type = "big";
>  	else
>  		size_type = "default";
>  
> 

Personally, I do not like it very much. Either sort this in ascending order
and use "<" or sort it in descending order and use ">=". But since it
was originally sorted in ascending order I would do that this way.

-Lukas
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ