xfs
[Top] [All Lists]

[PATCH 1/2] xfs_fsr: extra debugging info

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH 1/2] xfs_fsr: extra debugging info
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Fri, 18 Oct 2013 17:09:07 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5261B11F.1040000@xxxxxxxxxx>
References: <5261B11F.1040000@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
Provide 2 new pieces of information when -d is specified to
xfs_fsr:

* If we needed to grow the forkoffset and couldn't
* If we were unable to match the fork offset

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 7596834..c949f07 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -1022,6 +1022,7 @@ fsr_setup_attr_fork(
 {
        struct stat64   tstatbuf;
        int             i;
+       int             diff = 0;
        int             last_forkoff = 0;
        int             no_change_cnt = 0;
        int             ret;
@@ -1057,7 +1058,6 @@ fsr_setup_attr_fork(
                xfs_bstat_t     tbstat;
                xfs_ino_t       ino;
                char            name[64];
-               int             diff;
 
                /*
                 * bulkstat the temp inode  to see what the forkoff is. Use
@@ -1123,6 +1123,8 @@ fsr_setup_attr_fork(
                         * non-contiguous offsets.
                         */
                        /* XXX: unimplemented! */
+                       if (dflag)
+                               printf(_("data fork growth unimplemented\n"));
                        goto out;
                }
 
@@ -1138,6 +1140,10 @@ fsr_setup_attr_fork(
 out:
        if (dflag)
                fsrprintf(_("set temp attr\n"));
+       /* We failed to resolve the fork difference */
+       if (dflag && diff)
+               fsrprintf(_("failed to match fork offset\n"));;
+
        return 0;
 }
 


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