From: Christoph Hellwig <hch@infradead.org>
To: Ben Myers <bpm@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 0/7] extent list locking fixes V2
Date: Fri, 6 Dec 2013 09:59:24 -0800 [thread overview]
Message-ID: <20131206175924.GA31131@infradead.org> (raw)
In-Reply-To: <20131206175726.GT10553@sgi.com>
On Fri, Dec 06, 2013 at 11:57:26AM -0600, Ben Myers wrote:
> > uint
> > xfs_ilock_map_shared(
> > xfs_inode_t *ip)
> > {
> > uint lock_mode;
> >
> > if ((ip->i_d.di_format == XFS_DINODE_FMT_BTREE) &&
> > ((ip->i_df.if_flags & XFS_IFEXTENTS) == 0)) {
> > lock_mode = XFS_ILOCK_EXCL;
> > } else {
> > lock_mode = XFS_ILOCK_SHARED;
> > }
> >
> > xfs_ilock(ip, lock_mode);
> > return lock_mode;
> > }
> >
> > This only looks at the data fork, while we'd need to use it for the
> > fork we plan to operate on. Looks like we'll need some bigger surgery
> > this area.
>
> Ah, that makes sense. Maybe just add a flags arg?
My plan was to replace the helper with two different ones that just
return the flag value, and the use ilock on the return value. I'll
have to see if there's enough places where we could lock for either
for that adding a variant that takes an "int whichfork" argument would
make sense.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2013-12-06 17:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 16:48 [PATCH 0/7] extent list locking fixes V2 Christoph Hellwig
2013-12-06 16:48 ` [PATCH 1/7] xfs: reinstate the ilock in xfs_readdir Christoph Hellwig
2013-12-06 16:53 ` Christoph Hellwig
2013-12-06 17:37 ` Ben Myers
2013-12-06 16:48 ` [PATCH 2/7] xfs: take the ilock around xfs_bmapi_read in xfs_zero_remaining_bytes Christoph Hellwig
2013-12-06 16:48 ` [PATCH 3/7] xfs: use xfs_ilock_map_shared in xfs_qm_dqtobp Christoph Hellwig
2013-12-06 16:48 ` [PATCH 4/7] xfs: use xfs_ilock_map_shared in xfs_qm_dqiterate Christoph Hellwig
2013-12-06 16:48 ` [PATCH 5/7] xfs: use xfs_ilock_map_shared in xfs_attr_get Christoph Hellwig
2013-12-06 16:48 ` [PATCH 6/7] xfs: use xfs_ilock_map_shared in xfs_attr_list_int Christoph Hellwig
2013-12-06 16:48 ` [PATCH 7/7] xfs: assert that we hold the ilock for extent map access Christoph Hellwig
2013-12-06 17:37 ` [PATCH 0/7] extent list locking fixes V2 Ben Myers
2013-12-06 17:54 ` Christoph Hellwig
2013-12-06 17:57 ` Ben Myers
2013-12-06 17:59 ` 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=20131206175924.GA31131@infradead.org \
--to=hch@infradead.org \
--cc=bpm@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