Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MSza4-0002u3-5r for mharc-grub-devel@gnu.org; Mon, 20 Jul 2009 16:35:28 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSza2-0002ty-I5 for grub-devel@gnu.org; Mon, 20 Jul 2009 16:35:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSzZx-0002tl-B4 for grub-devel@gnu.org; Mon, 20 Jul 2009 16:35:25 -0400 Received: from [199.232.76.173] (port=56496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSzZx-0002ti-6M for grub-devel@gnu.org; Mon, 20 Jul 2009 16:35:21 -0400 Received: from c60.cesmail.net ([216.154.195.49]:9881) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MSzZw-0004EP-Iv for grub-devel@gnu.org; Mon, 20 Jul 2009 16:35:20 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 20 Jul 2009 16:35:16 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 3D0ED34C6A for ; Mon, 20 Jul 2009 16:45:33 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <20090719000602.k42q2e5k5wo4o8oo-cebfxv@webmail.spamcop.net> <20090719004027.1xid5g640sww8wkg-cebfxv@webmail.spamcop.net> Content-Type: text/plain Date: Mon, 20 Jul 2009 16:35:14 -0400 Message-Id: <1248122114.2907.55.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] xfs bug fix X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2009 20:35:26 -0000 On Sun, 2009-07-19 at 17:04 +0800, Bean wrote: > Oh nice catch, it's indeed a serious problem, this patch should fix it. Please don't add any trailing whitespace. Also please avoid formatting changes in the patches posted for review. If you find formatting in xfs.c too bad, you can indent the original file and commit it without review (just make sure it didn't get even worse), and then make a patch to the indented file. I think using "struct grub_xfs_inode inode[0]" in "struct grub_fshelp_node" is unwarranted. This notation assumes that there is a variable amount of inodes there. In fact, there is always one inode, but of variable size. Instead, I would replace raw[156] with raw[0] and extents[XFS_INODE_EXTENTS] with extents[0]. Conversion of diropen to a pointer also seems unneeded. It's better to allocate memory in one piece. It simplifies error handling and keeps the code short. If a bigger chunk of memory needs to be allocated, use grub_realloc(). Please avoid non-descriptive labels like "fail_2". -- Regards, Pavel Roskin