From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [150.166.39.100]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q9UHu6WO061164 for ; Tue, 30 Oct 2012 12:56:17 -0500 Date: Mon, 29 Oct 2012 18:06:42 -0700 From: Phil White Subject: Re: [PATCH 09/25] xfs: verify inode buffers as they are read from disk Message-ID: <20121030010641.GL30227@caliban.engr.sgi.com> References: <1351146854-19343-1-git-send-email-david@fromorbit.com> <1351146854-19343-10-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1351146854-19343-10-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: xfs@oss.sgi.com On Thu, Oct 25, 2012 at 05:33:58PM +1100, Dave Chinner wrote: > From: Dave Chinner > > Add an inode buffer verify callback function and pass it into the > buffer read functions. Inodes are special in that the verbose checks > will be done when reading the inode, but we still need to sanity > check the buffer when that is first read. Always verify the magic > numbers in all inodes in the buffer, rather than jus ton debug > kernels. > > Signed-off-by: Dave Chinner > --- > fs/xfs/xfs_inode.c | 100 +++++++++++++++++++++++++++------------------------- > 1 file changed, 51 insertions(+), 49 deletions(-) Hunky dory as it's essentially just lifting the same code into a function. I wonder a bit if all those checks are strictly necessary vs. simply being belt-and-suspenders safe, but that thought's not related to your patch. Reviewed-by: Phil White _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs