Page MenuHomeFreeBSD

chenguang.wang_terapines.com (chenguang.wang)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 10 2022, 8:35 AM (178 w, 6 d)

Recent Activity

Jun 24 2022

chenguang.wang_terapines.com added inline comments to rG3899c8a38fd1: Be consistent about functions being static..
Jun 24 2022, 2:40 AM

Feb 23 2022

chenguang.wang_terapines.com added a comment to rGcd3acfe7f372: Add BE architectures support..
git diff fs/ext2fs/ext2_alloc.c
diff --git a/fs/ext2fs/ext2_alloc.c b/fs/ext2fs/ext2_alloc.c
index 4c265a1a8..9e05d02de 100644
--- a/fs/ext2fs/ext2_alloc.c
+++ b/fs/ext2fs/ext2_alloc.c
@@ -1067,7 +1067,7 @@ ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, int size)
                start = dtogd(fs, bpref) / NBBY;
        else
                start = 0;
-       end = howmany(fs->e2fs_fpg, NBBY) - start;
+       end = howmany(fs->e2fs_fpg, NBBY);
 retry:
        runlen = 0;
        runstart = 0;
The variable "start" is the starting position where we traverse the block bitmap of a cylinder group , and the variable "end" is the ending position. Therefore, we shouldn't subtract "start" in the process of calculating "end".
Feb 23 2022, 8:36 AM