Skip to content
Snippets Groups Projects
  1. Mar 25, 2021
    • Bob Peterson's avatar
      gfs2: report "already frozen/thawed" errors · ff132c5f
      Bob Peterson authored
      
      Before this patch, gfs2's freeze function failed to report an error
      when the target file system was already frozen as it should (and as
      generic vfs function freeze_super does. Similarly, gfs2's thaw function
      failed to report an error when trying to thaw a file system that is not
      frozen, as vfs function thaw_super does. The errors were checked, but
      it always returned a 0 return code.
      
      This patch adds the missing error return codes to gfs2 freeze and thaw.
      
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      ff132c5f
  2. Mar 15, 2021
    • Andrew Price's avatar
      gfs2: Flag a withdraw if init_threads() fails · 62dd0f98
      Andrew Price authored
      Interrupting mount with ^C quickly enough can cause the kthread_run()
      calls in gfs2's init_threads() to fail and the error path leads to a
      deadlock on the s_umount rwsem. The abridged chain of events is:
      
        [mount path]
        get_tree_bdev()
          sget_fc()
            alloc_super()
              down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING); [acquired]
          gfs2_fill_super()
            gfs2_make_fs_rw()
              init_threads()
                kthread_run()
                  ( Interrupted )
            [Error path]
            gfs2_gl_hash_clear()
              flush_workqueue(glock_workqueue)
                wait_for_completion()
      
        [workqueue context]
        glock_work_func()
          run_queue()
            do_xmote()
              freeze_go_sync()
                freeze_super()
                  down_write(&sb->s_umount) [deadlock]
      
      In freeze_go_sync() there is a gfs2_withdrawn() check that we can use to
      make sure freeze_super() is not called in the error path, so add a
      gfs2_withdraw_delayed() call when init_threads() fails.
      
      Ref: https://bugzilla.kernel.org/show_bug.cgi?id=212231
      
      
      
      Reported-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarAndrew Price <anprice@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      62dd0f98
  3. Mar 12, 2021
  4. Mar 11, 2021
  5. Mar 10, 2021
Loading