[Top] [All Lists]

Re: [PATCH 02/18] xfs: pass shutdown method into xfs_trans_ail_delete_bu

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 02/18] xfs: pass shutdown method into xfs_trans_ail_delete_bulk
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Fri, 13 Apr 2012 12:40:46 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1334319061-12968-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1334319061-12968-1-git-send-email-david@xxxxxxxxxxxxx> <1334319061-12968-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 04/13/12 07:10, Dave Chinner wrote:
From: Dave Chinner<dchinner@xxxxxxxxxx>

xfs_trans_ail_delete_bulk() can be called from different contexts so
if the item is not in the AIL we need different shutdown for each
context.  Pass in the shutdown method needed so the correct action
can be taken.

Signed-off-by: Dave Chinner<dchinner@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig<hch@xxxxxx>
Reviewed-by: Mark Tinguely<tinguely@xxxxxxx>

These items in my copy of Christoph's xfsbufd series are not resolved in this patch:

In "[01/10] xfs: remove log item from AIL in xfs_qm_dqflush after a shutdown" a xfs_trans_ail_delete() has been added:

Index: xfs/fs/xfs/xfs_dquot.c
--- xfs.orig/fs/xfs/xfs_dquot.c 2012-02-23 17:52:53.916002428 -0800
+++ xfs/fs/xfs/xfs_dquot.c      2012-02-23 17:53:01.829335739 -0800
@@ -904,10 +904,21 @@ xfs_qm_dqflush(
         * This may have been unpinned because the filesystem is shutting
         * down forcibly. If that's the case we must not write this dquot
-        * to disk, because the log record didn't make it to disk!
+        * to disk, because the log record didn't make it to disk.
+        *
+        * We also have to remove the log item from the AIL in this case,
+        * as we wait for an emptry AIL as part of the unmount process.
        if (XFS_FORCED_SHUTDOWN(mp)) {
+               struct xfs_log_item     *lip = &dqp->q_logitem.qli_item;
                dqp->dq_flags &= ~XFS_DQ_DIRTY;
+               spin_lock(&mp->m_ail->xa_lock);
+               if (lip->li_flags & XFS_LI_IN_AIL)
+                       xfs_trans_ail_delete(mp->m_ail, lip);
+               else
+                       spin_unlock(&mp->m_ail->xa_lock);

In "[02/10] xfs: remove log item from AIL in xfs_iflush after a shutdown", he added another xfs_iflush_abort(). That is not converted with a boolean in this series:

Index: xfs/fs/xfs/xfs_sync.c
--- xfs.orig/fs/xfs/xfs_sync.c  2012-03-16 12:44:57.707030619 +0100
+++ xfs/fs/xfs/xfs_sync.c       2012-03-16 12:47:03.697032954 +0100
@@ -783,6 +783,7 @@ restart:
                goto reclaim;
        if (XFS_FORCED_SHUTDOWN(ip->i_mount)) {
+               xfs_iflush_abort(ip);


--Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>