From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: lock the rt summary inode when unmapping realtime extents
Date: Mon, 4 Jul 2016 20:36:28 -0700 [thread overview]
Message-ID: <20160705033628.GB16957@birch.djwong.org> (raw)
In-Reply-To: <20160629222142.GQ12670@dastard>
On Thu, Jun 30, 2016 at 08:21:42AM +1000, Dave Chinner wrote:
> On Wed, Jun 29, 2016 at 01:02:34PM -0700, Darrick J. Wong wrote:
> > When we're deleting realtime extents, lock the summary inode
> > in case we need to update the summary info. This prevents an
> > assert on the rsumip inode lock on a debug kernel.
> >
> > (Same idea as "xfs: lock rt summary inode on allocation".)
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> > fs/xfs/libxfs/xfs_bmap.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> > index 97820c1..9c7227b 100644
> > --- a/fs/xfs/libxfs/xfs_bmap.c
> > +++ b/fs/xfs/libxfs/xfs_bmap.c
> > @@ -5524,6 +5524,8 @@ __xfs_bunmapi(
> > */
> > xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
> > xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
> > + xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL);
> > + xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
>
> These need a lockdep annotations, right? i.e.
>
> xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL|XFS_ILOCK_RTBITMAP);
> xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL|XFS_ILOCK_RTSUM);
>
> Because they are nested inside the inode ilock?
Yes, they do, as does the other _ilock(rbmip) in xfs_bmap_util.c.
Will send updated patch.
--D
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2016-07-05 3:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 20:02 [PATCH] xfs: lock the rt summary inode when unmapping realtime extents Darrick J. Wong
2016-06-29 20:20 ` Eric Sandeen
2016-06-29 22:21 ` Dave Chinner
2016-07-05 3:36 ` Darrick J. Wong [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=20160705033628.GB16957@birch.djwong.org \
--to=darrick.wong@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).