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 Sep 2014 14:19:36 +0800
From:	Chao Yu <chao2.yu@...sung.com>
To:	'Jaegeuk Kim' <jaegeuk@...nel.org>
Cc:	linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net
Subject: RE: [f2fs-dev] [PATCH 1/4] f2fs: check the use of macros on block
	counts and addresses

Hi Jaegeuk,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@...nel.org]
> Sent: Friday, September 26, 2014 12:55 PM
> To: linux-kernel@...r.kernel.org; linux-fsdevel@...r.kernel.org;
> linux-f2fs-devel@...ts.sourceforge.net
> Cc: Jaegeuk Kim
> Subject: [f2fs-dev] [PATCH 1/4] f2fs: check the use of macros on block counts and addresses
> 
> This patch cleans up the existing and new macros for readability.
> 
> Rule is like this.
> 
>          ,-----------------------------------------> MAX_BLKADDR -,
>          |  ,------------- TOTAL_BLKS ----------------------------,
>          |  |                                                     |
>          |  ,- seg0_blkaddr   ,----- sit/nat/ssa/main blkaddress  |
> block    |  | (SEG0_BLKADDR)  | | | |   (e.g., MAIN_BLKADDR)      |
> address  0..x................ a b c d .............................
>             |                                                     |
> global seg# 0...................... m .............................
>             |                       |                             |
>             |                       `------- MAIN_SEGS -----------'
>             `-------------- TOTAL_SEGS ---------------------------'
>                                     |                             |
>  seg#                               0..........xx..................
> 
> = Note =
>  o GET_SEGNO_FROM_SEG0 : blk address -> global segno
>  o GET_SEGNO           : blk address -> segno
>  o START_BLOCK         : segno -> starting block address
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>

Looks good!

Reviewed-by: Chao Yu <chao2.yu@...sung.com>

I see SM_I(sbi)->segment_count in check_seg_range/check_block_count still
not be instead with TOTAL_SEGS(sbi), how about insteading these together?

Regards,
Yu

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ