From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v3 1/4] xfs: push down inactive transaction mgmt for remote symlinks
Date: Mon, 30 Sep 2013 10:29:25 +1000 [thread overview]
Message-ID: <20130930002925.GI26872@dastard> (raw)
In-Reply-To: <1379689572-5543-2-git-send-email-bfoster@redhat.com>
On Fri, Sep 20, 2013 at 11:06:09AM -0400, Brian Foster wrote:
> Push down the transaction management for remote symlinks from
> xfs_inactive() down to xfs_inactive_symlink_rmt(). The latter is
> cleaned up to avoid transaction management intended for the
> calling context (i.e., trans duplication, reservation, item
> attachment).
>
> Signed-off-by: Brian Foster <bfoster@redhat.com>
Looks good. One minor quibble if you need to respin the patches
again, but otherwise:
Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
> @@ -563,41 +552,46 @@ xfs_inactive_symlink_rmt(
> */
> int
> xfs_inactive_symlink(
> - struct xfs_inode *ip,
> - struct xfs_trans **tp)
> + struct xfs_inode *ip)
> {
> struct xfs_mount *mp = ip->i_mount;
> int pathlen;
>
> trace_xfs_inactive_symlink(ip);
>
> - ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
> -
> if (XFS_FORCED_SHUTDOWN(mp))
> return XFS_ERROR(EIO);
>
> + xfs_ilock(ip, XFS_ILOCK_EXCL);
> +
> /*
> * Zero length symlinks _can_ exist.
> */
> pathlen = (int)ip->i_d.di_size;
> - if (!pathlen)
> + if (!pathlen) {
> + xfs_iunlock(ip, XFS_ILOCK_EXCL);
> return 0;
> + }
Minor quibble: this repeated "unlock, return error" pattern could
be done with:
....
if (!pathlen)
goto out_unlock;
....
/* remove the remote symlink */
return xfs_inactive_symlink_rmt(ip);
out_unlock:
xfs_iunlock(ip, XFS_ILOCK_EXCL);
return error;
}
But, like I said, there's no need to do this unless I find other
things in the rest of the series that require a respin...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-09-30 0:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 15:06 [PATCH v3 0/4] xfs: rework xfs_inactive() Brian Foster
2013-09-20 15:06 ` [PATCH v3 1/4] xfs: push down inactive transaction mgmt for remote symlinks Brian Foster
2013-09-30 0:29 ` Dave Chinner [this message]
2013-09-20 15:06 ` [PATCH v3 2/4] xfs: push down inactive transaction mgmt for truncate Brian Foster
2013-09-30 0:32 ` Dave Chinner
2013-09-20 15:06 ` [PATCH v3 3/4] xfs: push down inactive transaction mgmt for ifree Brian Foster
2013-09-30 0:34 ` Dave Chinner
2013-09-20 15:06 ` [PATCH v3 4/4] xfs: clean up xfs_inactive() error handling, kill VN_INACTIVE_[NO]CACHE Brian Foster
2013-10-09 0:25 ` [PATCH v3 0/4] xfs: rework xfs_inactive() Ben Myers
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=20130930002925.GI26872@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.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.