[Top] [All Lists]

Re: [PATCH 2/2] xfs_logprint: Handle continued inode transactions

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs_logprint: Handle continued inode transactions
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 02 Nov 2012 09:35:11 -0500
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20121102130425.GB12578@xxxxxxxxxxxxx>
References: <5092A1DE.10609@xxxxxxxxxx> <5092A430.8080109@xxxxxxxxxx> <20121102130425.GB12578@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
On 11/2/12 8:04 AM, Christoph Hellwig wrote:
> On Thu, Nov 01, 2012 at 11:32:48AM -0500, Eric Sandeen wrote:
>> Tested by running xfs_logprint of TEST_DEV in xfsprogs
>> after sequential tests; without this change it gets off
>> in the weeds eventually; with this fix, it lasts longer,
>> until it hits some other yet-unfixed logprint bug...
> Add this testcase to xfstests, please.

well, "this" isn't really a testcase; it's just running logprint
after every test.  And in some cases, esp. if the log has wrapped,
that just fails outright due to unrelated problems.

TBH I'm not sure how to generate a testcase for just this issue.
Any ideas?

>>  int
>> -xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
>> +xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops, int 
>> continued)
> Shouldn't this be a bool?


>>      xlog_print_op_header(op_head, i, &ptr);
>> +    continued = (XLOG_SET(op_head->oh_flags, XLOG_WAS_CONT_TRANS) ||
>> +                 XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS));
> I'd also really love to see another cleanup patch to kill the
> XLOG_SET macro.  The XLOG_ flags are true flags so they can be replaced
> by a simple op_head->oh_flags & XLOG_FLAG.

hm, yeah, that is odd.

                if (*last_was_partial_copy)
                        ophdr->oh_flags |= (XLOG_END_TRANS|XLOG_WAS_CONT_TRANS);

whereas XLOG_SET tests for one and only one.


> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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