| To: | Ben Myers <bpm@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 0/7] extent list locking fixes V2 |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 6 Dec 2013 09:59:24 -0800 |
| Cc: | Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20131206175726.GT10553@xxxxxxx> |
| References: | <20131206164819.371654241@xxxxxxxxxxxxxxxxxxxxxx> <20131206173729.GR1935@xxxxxxx> <20131206175444.GA25669@xxxxxxxxxxxxx> <20131206175726.GT10553@xxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 0/7] extent list locking fixes V2, Ben Myers |
|---|---|
| Next by Date: | Re: nfs vs xfstests 193, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 0/7] extent list locking fixes V2, Ben Myers |
| Next by Thread: | Re: [OOPS, 3.13-rc2] null ptr in dio_complete(), Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |