From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 8CB9D7F3F for ; Tue, 17 Feb 2015 03:24:53 -0600 (CST) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay1.corp.sgi.com (Postfix) with ESMTP id 5D64C8F8059 for ; Tue, 17 Feb 2015 01:24:50 -0800 (PST) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by cuda.sgi.com with ESMTP id Cacg2vRT3nx9XVR3 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 17 Feb 2015 01:24:47 -0800 (PST) Message-ID: <54E3092D.9060604@oracle.com> Date: Tue, 17 Feb 2015 12:26:05 +0300 From: Alexander Tsvetkov MIME-Version: 1.0 Subject: Re: xfs_logprint segfault with external log References: <54DB5E70.80607@oracle.com> <20150211205406.GT4251@dastard> <54DC940D.4030009@oracle.com> <20150212230940.GD12722@dastard> <54E1F6C2.4060105@oracle.com> <20150217013849.GI4251@dastard> In-Reply-To: <20150217013849.GI4251@dastard> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: Eric Sandee , xfs@oss.sgi.com On 02/17/2015 04:38 AM, Dave Chinner wrote: > On Mon, Feb 16, 2015 at 04:55:14PM +0300, Alexander Tsvetkov wrote: >> On 02/13/2015 02:09 AM, Dave Chinner wrote: >>> On Thu, Feb 12, 2015 at 02:52:45PM +0300, Alexander Tsvetkov wrote: >>>> On 02/11/2015 11:54 PM, Dave Chinner wrote: >>>>> On Wed, Feb 11, 2015 at 04:51:44PM +0300, Alexander Tsvetkov wrote: >>>>>> Hello, >>>>>> >>>>>> I've obtained corrupted xfs log after some sanity xfs testing: >>>>>> >>>>>> "log=logfile >>>>>> log_size=855 >>>>>> >>>>>> dd if=/dev/zero "of=$log" bs=4096 count=$log_size >>>>>> loopdev=$(losetup -f) >>>>>> losetup $loopdev $log >>>>>> >>>>>> mkfs.xfs -f -m crc=1 -llogdev=$loopdev,size=${log_size}b $SCRATCH_DEV >>>>>> mount -t xfs -ologdev=$loopdev $SCRATCH_DEV $SCRATCH_MNT >>>>>> ./fdtree.sh -l 4 -d 4 -C -o $SCRATCH_MNT >>>>>> sync >>>>>> umount $SCRATCH_MNT >>>>>> >>>>>> xfs_logprint -l $loopdev $SCRATCH_DEV" >>>>>> >>>>>> Test makes crc enabled xfs filesystem with the external log of >>>>>> minimal allowed size and then creates on this fs the small directory >>>>>> tree >>>>>> with sub directories and files of fixed depth and size with help of >>>>>> fdtree utility: >>>>>> https://computing.llnl.gov/?set=code&page=sio_downloads >>>>> Just take metadump image and put it somewhere we can down load it. >>>>> >>>>>> After that xfs_logprint stably reports bad data in log: >>> Please try the patch below, it fixes the problem on the image you >>> provided. >> I've restored provided image to filesystem with the same log file, >> applied patch to latest xfsprogs and have stable pass runs >> of xfs_logprint on that filesystem and running with xfsprogs without >> this patch results to xfs_logprint segfaults reported that means >> patch is working. > Good. > >> The problem that it is not working for repeated test runs where >> xfs_logprint still continue to report bad log data. It seems it is > xfs_logprint is not a tool that is intended for validation of the > log contents. It's a triage tool that was written in a hurry, and as > such it's neither reliable or maintainable. Indeed, there's a > comment in the code saying it really needs to be rewritten. ;) > > I'll have a look the image, but really spending lots of time on > fixing minor issues with logprint really isn't the best use of my > time right now... Thank you, really xfs_logprint was not a subject here. It's used by me to understand xfs log data format to verify some cases related to xfs log recovery functionality, just tried to simulate some cases with log corruptions and have no expected specific xfs alert from the kernel source that I would like to see for that test case. xfs journaling para is marked as TODO in documentation currently, so I thought xfs_logprint would put more clarity how xfs journal data organized. > > Cheers, > > Dave. Thanks, Alexander Tsvetkov _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs