Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2022 02:10:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 261850] Ext2 FileSystem: There is a bug in disk data block allocation
Message-ID:  <bug-261850-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261850

            Bug ID: 261850
           Summary: Ext2 FileSystem: There is a bug in disk data block
                    allocation
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: chenguang.wang@terapines.com

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 =3D dtogd(fs, bpref) / NBBY;
        else
                start =3D 0;
-       end =3D howmany(fs->e2fs_fpg, NBBY) - start;
+       end =3D howmany(fs->e2fs_fpg, NBBY);
 retry:
        runlen =3D 0;
        runstart =3D 0;

    In this function, the variable "start" is the starting position where we
traverse the block bitmap of a cylinder group , and the variable "end" is t=
he
ending position. Therefore, I don't think we should subtract "start" in the
process of calculating "end".
    In fact, I'm not sure if there's something wrong with my understanding.=
 I
would be very grateful if someone could help me=EF=BC=81

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261850-227>