xfs
[Top] [All Lists]

[PATCH 09/15] xfs: Introduce a new mutex lock for shrinkfs

To: xfs@xxxxxxxxxxx
Subject: [PATCH 09/15] xfs: Introduce a new mutex lock for shrinkfs
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Fri, 16 Nov 2012 14:46:08 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2
Introduce a new mutex lock for shrinkfs which is same to growfs.


Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>

---
 fs/xfs/xfs_mount.h |    1 +
 fs/xfs/xfs_super.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 4fe2232..9eaea5a 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -161,6 +161,7 @@ typedef struct xfs_mount {
        struct radix_tree_root  m_perag_tree;   /* per-ag accounting info */
        spinlock_t              m_perag_lock;   /* lock for m_perag_tree */
        struct mutex            m_growlock;     /* growfs mutex */
+       struct mutex            m_shrinklock;   /* shrinkfs mutex */
        int                     m_fixedfsid[2]; /* unchanged for life of FS */
        uint                    m_dmevmask;     /* DMI events for this FS */
        __uint64_t              m_flags;        /* global mount flags */
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index e01f64c..81b6b60 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1330,6 +1330,7 @@ xfs_fs_fill_super(
 
        spin_lock_init(&mp->m_sb_lock);
        mutex_init(&mp->m_growlock);
+       mutex_init(&mp->m_shrinklock);
        atomic_set(&mp->m_active_trans, 0);
 
        mp->m_super = sb;
-- 
1.7.4.1

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 09/15] xfs: Introduce a new mutex lock for shrinkfs, Jeff Liu <=