From: Bill Kendall <wkendall@sgi.com>
To: aelder@sgi.com
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsdump: call mlog_exit in content_stream_restore
Date: Fri, 02 Sep 2011 08:57:40 -0500 [thread overview]
Message-ID: <4E60E0D4.9080601@sgi.com> (raw)
In-Reply-To: <1314375344.2821.47.camel@doink>
On 08/26/2011 11:15 AM, Alex Elder wrote:
> On Mon, 2011-08-15 at 13:59 -0500, Bill Kendall wrote:
>> This patch adds mlog_exit() calls to all the return paths in
>> content_stream_restore(). mlog_exit() is supposed to be called before
>> returning from content_stream_dump() and content_stream_restore(), but
>> many paths in the latter did not do so, allowing for the stream exit
>> status to be incorrect.
...
> The end of this function is a whole bunch of repetitive
> code. It would be cleaner to assign a "ret" variable
> (or whatever name you think fits the existing code)
> and then after this last switch statement call:
>
> return mlog_exit(ret, rv);
>
> (If Media_end() got a flag, you might not need the
> switch statement at all...)
>
> Christoph suggested a goto which would be similar
> but would affect the whole function. And in fact
> I think it might simplify a lot--possibly eliminating
> whole switch statements entirely--so I think that's
> an idea worth considering.
I looked at doing this, but it didn't result in any switch
statements being removed. Each switch statement is different
enough that we can't just have a single switch at the end
of the function that maps the RV_* value to the proper
EXIT_* value.
I made some other minor changes based on suggestions, and
will repost after the "xfsdump: remove unnecessary" patch
is reviewed. (This patch overlaps a bit with that one.)
Thanks,
Bill
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2011-09-02 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 18:59 [PATCH] xfsdump: call mlog_exit in content_stream_restore Bill Kendall
2011-08-25 5:03 ` Christoph Hellwig
2011-08-26 16:15 ` Alex Elder
2011-08-29 15:20 ` Bill Kendall
2011-09-02 13:57 ` Bill Kendall [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E60E0D4.9080601@sgi.com \
--to=wkendall@sgi.com \
--cc=aelder@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox