From: Chao Yu <chao2.yu@samsung.com>
To: 'Jaegeuk Kim' <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: RE: [f2fs-dev] [PATCH 1/4] f2fs: check the use of macros on block counts and addresses
Date: Tue, 30 Sep 2014 14:19:36 +0800 [thread overview]
Message-ID: <006201cfdc76$9a361140$cea233c0$@samsung.com> (raw)
In-Reply-To: <1411707287-21760-1-git-send-email-jaegeuk@kernel.org>
Hi Jaegeuk,
> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Friday, September 26, 2014 12:55 PM
> To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> linux-f2fs-devel@lists.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@kernel.org>
Looks good!
Reviewed-by: Chao Yu <chao2.yu@samsung.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
prev parent reply other threads:[~2014-09-30 6:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 4:54 [PATCH 1/4] f2fs: check the use of macros on block counts and addresses Jaegeuk Kim
2014-09-26 4:54 ` [PATCH 2/4] f2fs: support atomic_write feature for database Jaegeuk Kim
2014-09-30 6:19 ` [PATCH 2/4 v2] " Jaegeuk Kim
2014-10-04 7:04 ` [f2fs-dev] " Jaegeuk Kim
2014-09-26 4:54 ` [PATCH 3/4] f2fs: clean up f2fs_ioctl functions Jaegeuk Kim
2014-09-26 4:54 ` [PATCH 4/4] f2fs: call f2fs_unlock_op after error was handled Jaegeuk Kim
2014-09-30 6:19 ` Chao Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='006201cfdc76$9a361140$cea233c0$@samsung.com' \
--to=chao2.yu@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).