From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 4/4] xfs: implement freezing by emptying the AIL
Date: Sat, 24 Mar 2012 13:08:48 -0400 [thread overview]
Message-ID: <20120324170848.GA32591@infradead.org> (raw)
In-Reply-To: <20120324170618.GD21708@infradead.org>
On Sat, Mar 24, 2012 at 01:06:18PM -0400, Christoph Hellwig wrote:
> On Thu, Mar 22, 2012 at 10:57:38AM +1100, Dave Chinner wrote:
> > > + * threshold.
> > > + */
> > > + if (atomic_read(&ailp->xa_wait_empty))
> > > + target = xfs_ail_max(ailp)->li_lsn;
> >
> > I don't think this is safe - we may have finished pushing the AIL to
> > empty, but the waiter that decrements xa_wait_empty may not have run
> > yet and we can race with that. In that case, xfs_ail_max() will
> > return NULL as the AIL is empty.
>
> True - I'll add a check for that.
Actually - we do the xfs_trans_ail_cursor_first check just above - if
the AIL is empty we'll already exit after that and never reach this
code, so we should be fine.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2012-03-24 17:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 17:55 [PATCH 0/4] implement filesystem freezing by emptying the AIL Christoph Hellwig
2012-03-16 17:55 ` [PATCH 1/4] xfs: remove log item from AIL in xfs_qm_dqflush after a shutdown Christoph Hellwig
2012-03-21 23:16 ` Dave Chinner
2012-03-16 17:55 ` [PATCH 2/4] xfs: remove log item from AIL in xfs_iflush " Christoph Hellwig
2012-03-21 23:20 ` Dave Chinner
2012-03-24 13:47 ` Christoph Hellwig
2012-03-16 17:55 ` [PATCH 3/4] xfs: allow assigning the tail lsn with the AIL lock held Christoph Hellwig
2012-03-21 17:22 ` Mark Tinguely
2012-03-21 23:29 ` Dave Chinner
2012-03-24 13:48 ` Christoph Hellwig
2012-03-16 17:55 ` [PATCH 4/4] xfs: implement freezing by emptying the AIL Christoph Hellwig
2012-03-21 23:57 ` Dave Chinner
2012-03-24 17:06 ` Christoph Hellwig
2012-03-24 17:08 ` Christoph Hellwig [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=20120324170848.GA32591@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.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.