xfs
[Top] [All Lists]

Re: [PATCH 1/5] metadump: sanitise write_buf/index return values

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/5] metadump: sanitise write_buf/index return values
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Thu, 13 Feb 2014 13:30:00 -0600
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1390472635-17225-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1390472635-17225-1-git-send-email-david@xxxxxxxxxxxxx> <1390472635-17225-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 01/23/14 04:23, Dave Chinner wrote:
From: Dave Chinner<dchinner@xxxxxxxxxx>

Write_buf/write_index use confusing boolean values for return,
meaning that it's hard to tell what the correct error return is
supposed to be.  Convert them to return zero on success or a
negative errno otherwise so that it's clear what the error case is.

Signed-off-by: Dave Chinner<dchinner@xxxxxxxxxx>
---

Looks like this patch broke metadumps on some corrupted filesystems. This is a legacy filesystem that has zeroes overwriting the SB/AGF/AGI on AG 1/2/3:


# xfs_metadump -wgo /dev/sda8 myfile.metadata
xfs_agf_read_verify: XFS_CORRUPTION_ERROR
xfs_metadump: cannot init perag data (117). Continuing anyway.
Copied 64 of 64 inodes (0 of 4 AGs) xfs_agf_write_verify: XF
S_CORRUPTION_ERROR
write_buf: write verifer failed on bno 0x1100919/0x200
(no output)

commit dd9093de944cd802427bd42953ad5ccc1d5fb875 before it:

# xfs_metadump -wgo /dev/sda8 myfile.metadata
xfs_agf_read_verify: XFS_CORRUPTION_ERROR
xfs_metadump: cannot init perag data (117). Continuing anyway.
Copied 64 of 64 inodes (0 of 4 AGs) xfs_agf_write_verify: XF
S_CORRUPTION_ERROR
write_buf: write verifer failed on bno 0x1100919/0x200
Copying free space trees of AG 1
xfs_metadump: invalid block number (0) in bnobt root in agf 1
xfs_metadump: invalid block number (0) in cntbt root in agf 1
xfs_metadump: invalid block number (0) in inobt root in agi 1
Copying free space trees of AG 2
xfs_metadump: invalid block number (0) in bnobt root in agf 2
xfs_metadump: invalid block number (0) in cntbt root in agf 2
xfs_metadump: invalid block number (0) in inobt root in agi 2
Copying free space trees of AG 3
xfs_metadump: invalid block number (4294967295) in bnobt root in agf 3
xfs_metadump: invalid block number (4294967295) in cntbt root in agf 3
xfs_metadump: invalid block number (0) in inobt root in agi 3
Copying log

<Prev in Thread] Current Thread [Next in Thread>