From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: Ming Lin <mlin@kernel.org>, Christoph Hellwig <hch@lst.de>,
linux-xfs@vger.kernel.org,
Ceph Development <ceph-devel@vger.kernel.org>,
"LIU, Fei" <james.liu@alibaba-inc.com>,
xiongwei.jiang@alibaba-inc.com, boqian.zy@alibaba-inc.com,
sheng.qiu@alibaba-inc.com, Sage Weil <sweil@redhat.com>
Subject: Re: xlog_write: reservation ran out
Date: Fri, 5 May 2017 13:16:29 +1000 [thread overview]
Message-ID: <20170505031629.GE17542@dastard> (raw)
In-Reply-To: <20170504115102.GA3248@bfoster.bfoster>
On Thu, May 04, 2017 at 07:51:02AM -0400, Brian Foster wrote:
> Seems reasonable. I suppose if we do the check at this level rather than
> in the caller, we could move the CIL insert code to the last step before
> we drop ->xc_cil_lock and have an accurate account of the reservation
> pulled off the transaction. E.g.:
>
> {
> ...
> tp->t_ticket->t_curr_res -= len;
> ctx->space_used += len;
>
> /* dump tp on overrun prior to item removal */
> if (tp->t_ticket->t_curr_res < 0)
> xlog_print_tic(tp)
>
> /* reposition to CIL ... */
> list_for_each_entry(lidp, &tp->t_items, lid_trans) {
> ...
> list_move_tail(...);
> }
> spin_unlock(&cil->xc_cil_lock);
> }
>
> ... where xlog_print_tic() can call xlog_print_tic_res() and then dump
> the t_items list as above.
We shouldn't call xlog_print_tic_res() while holding a spinlock
because it calls xfs_force_shutdown(). So I think all the overrun
checks and prints need to be outside the xc_cil_lock.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2017-05-05 3:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 20:15 xlog_write: reservation ran out Ming Lin
2017-04-28 20:24 ` Ming Lin
2017-04-28 20:56 ` Ming Lin
2017-05-01 6:10 ` Ming Lin
2017-05-01 13:12 ` Brian Foster
2017-05-01 17:41 ` Ming Lin
2017-05-01 18:48 ` Brian Foster
2017-05-01 20:18 ` Ming Lin
2017-05-02 23:51 ` Dave Chinner
2017-05-03 14:10 ` Brian Foster
2017-05-03 15:53 ` Darrick J. Wong
2017-05-03 16:15 ` Brian Foster
2017-05-04 0:37 ` Dave Chinner
2017-05-04 0:34 ` Dave Chinner
2017-05-04 11:51 ` Brian Foster
2017-05-05 3:16 ` Dave Chinner [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=20170505031629.GE17542@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=boqian.zy@alibaba-inc.com \
--cc=ceph-devel@vger.kernel.org \
--cc=hch@lst.de \
--cc=james.liu@alibaba-inc.com \
--cc=linux-xfs@vger.kernel.org \
--cc=mlin@kernel.org \
--cc=sheng.qiu@alibaba-inc.com \
--cc=sweil@redhat.com \
--cc=xiongwei.jiang@alibaba-inc.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.