From: Jeff Liu <jeff.liu@oracle.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH 1/4] xfs: wake up cil->xc_commit_wait while removing ctx from cil->xc_committing
Date: Wed, 01 Jan 2014 22:38:36 +0800 [thread overview]
Message-ID: <52C4286C.5040007@oracle.com> (raw)
In-Reply-To: <52C18F56.70709@sgi.com>
On 12/30 2013 23:20 PM, Mark Tinguely wrote:
> On 12/24/13 06:48, Jeff Liu wrote:
>> From: Jie Liu<jeff.liu@oracle.com>
>>
>> I can easily to hit a hang up while running fsstress and shutting down
>> XFS on SSD via the tests below:
<snip>
>>
>> Task1 Task2
>>
>> list_add(&ctx->committing,&cil->xc_committing);
>>
>> xlog_wait(&cil->xc_commit_wait..)
>> schedule()...
>>
>> Aborting!! list_del(&ctx->committing);
>> wake_up_all(&cil->xc_commit_wait);<-- MISSING!
>>
>> As a result, we should handle this situation in xlog_cil_committed().
>>
>> Signed-off-by: Jie Liu<jeff.liu@oracle.com>
>> ---
>> fs/xfs/xfs_log_cil.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
>> index 5eb51fc..8c7e9c7 100644
>> --- a/fs/xfs/xfs_log_cil.c
>> +++ b/fs/xfs/xfs_log_cil.c
>> @@ -406,6 +406,8 @@ xlog_cil_committed(
>>
>> spin_lock(&ctx->cil->xc_push_lock);
>> list_del(&ctx->committing);
>> + if (abort)
>> + wake_up_all(&ctx->cil->xc_commit_wait);
>> spin_unlock(&ctx->cil->xc_push_lock);
>>
>> xlog_cil_free_logvec(ctx->lv_chain);
>
> Hi Jeff, I hope you had a good break,
Thanks :)
>
> So you are saying the wakeup in the CIL push error path missing?
Yes.
> I agree with that. But I don't like adding a new wake up to
> xlog_cil_committed(), which is after the log buffer is written.
IMO this callback would be called if any problem is happened before
the log buffer is written as well, e.g,
xlog_cil_push()->xfs_log_notify() <-- failed
|
|->xlog_cil_committed()
Besides, the CTX will be removed from the committing list here but
there might still have waiters sleeping on it.
Thanks,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-01-01 14:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-24 12:48 [PATCH 1/4] xfs: wake up cil->xc_commit_wait while removing ctx from cil->xc_committing Jeff Liu
2013-12-30 15:20 ` Mark Tinguely
2014-01-01 14:38 ` Jeff Liu [this message]
2014-01-02 0:45 ` Dave Chinner
2014-01-03 10:25 ` Jeff Liu
2014-01-03 13:17 ` Jeff Liu
2014-01-03 15:30 ` Mark Tinguely
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=52C4286C.5040007@oracle.com \
--to=jeff.liu@oracle.com \
--cc=tinguely@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.