1. 25 Jan, 2021 1 commit
  2. 22 Jan, 2021 1 commit
  3. 31 Dec, 2020 1 commit
  4. 22 Dec, 2020 2 commits
    • Bob Peterson's avatar
      gfs2: move freeze glock outside the make_fs_rw and _ro functions · 96b1454f
      Bob Peterson authored
      Before this patch, sister functions gfs2_make_fs_rw and gfs2_make_fs_ro locked
      (held) the freeze glock by calling gfs2_freeze_lock and gfs2_freeze_unlock.
      The problem is, not all the callers of gfs2_make_fs_ro should be doing this.
      The three callers of gfs2_make_fs_ro are: remount (gfs2_reconfigure),
      signal_our_withdraw, and unmount (gfs2_put_super). But when unmounting the
      file system we can get into the following circular lock dependency:
      
      deactivate_super
         down_write(&s->s_umount); <-------------------------------------- s_umount
         deactivate_locked_super
            gfs2_kill_sb
               kill_block_super
                  generic_shutdown_super
                     gfs2_put_super
                        gfs2_make_fs_ro
                           gfs2_glock_nq_init sd_freeze_gl
                              freeze_go_sync
                                 if (freeze glock in SH)
                                    freeze_super (vfs)
                                       down_write(&sb->s_umount); <------- s_umount
      
      This patch moves the hold of the freeze glock outside the two sister rw/ro
      functions to their callers, but it doesn't request the glock from
      gfs2_put_super, thus eliminating the circular dependency.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      96b1454f
    • Bob Peterson's avatar
      gfs2: Add common helper for holding and releasing the freeze glock · c77b52c0
      Bob Peterson authored
      Many places in the gfs2 code queued and dequeued the freeze glock.
      Almost all of them acquire it in SHARED mode, and need to specify the
      same LM_FLAG_NOEXP and GL_EXACT flags.
      
      This patch adds common helper functions gfs2_freeze_lock and gfs2_freeze_unlock
      to make the code more readable, and to prepare for the next patch.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      c77b52c0
  5. 20 Dec, 2020 2 commits
  6. 19 Dec, 2020 32 commits
  7. 18 Dec, 2020 1 commit