1. 22 Jan, 2021 1 commit
  2. 31 Dec, 2020 1 commit
  3. 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
  4. 20 Dec, 2020 2 commits
  5. 19 Dec, 2020 32 commits
  6. 18 Dec, 2020 2 commits
    • Kent Overstreet's avatar
      mm/filemap: fix infinite loop in generic_file_buffered_read() · 3644e2d2
      Kent Overstreet authored
      If iter->count is 0 and iocb->ki_pos is page aligned, this causes
      nr_pages to be 0.
      
      Then in generic_file_buffered_read_get_pages() find_get_pages_contig()
      returns 0 - because we asked for 0 pages, so we call
      generic_file_buffered_read_no_cached_page() which attempts to add a page
      to the page cache, which fails with -EEXIST, and then we loop. Oops...
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Reported-by: default avatarJens Axboe <axboe@kernel.dk>
      Reviewed-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3644e2d2
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.11-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · a0b96314
      Linus Torvalds authored
      Pull xfs updates from Darrick Wong:
       "In this release we add the ability to set a 'needsrepair' flag
        indicating that we /know/ the filesystem requires xfs_repair, but
        other than that, it's the usual strengthening of metadata validation
        and miscellaneous cleanups.
      
        Summary:
      
         - Introduce a "needsrepair" "feature" to flag a filesystem as needing
           a pass through xfs_repair. This is key to enabling filesystem
           upgrades (in xfs_db) that require xfs_repair to make minor
           adjustments to metadata.
      
         - Refactor parameter checking of recovered log intent items so that
           we actually use the same validation code as them that generate the
           intent items.
      
         - Various fixes to online scrub not reacting correctly to directory
           entries pointing to inodes that cannot be igetted.
      
         - Refactor validation helpers for data and rt volume extents.
      
         - Refactor XFS_TRANS_DQ_DIRTY out of existence.
      
         - Fix a longstanding bug where mounting with "uqnoenforce" would
           start user quotas in non-enforcing mode but /proc/mounts would
           display "usrquota", implying that they are being enforced.
      
         - Don't flag dax+reflink inodes as corruption since that is a valid
           (but not fully functional) combination right now.
      
         - Clean up raid stripe validation functions.
      
         - Refactor the inode allocation code to be more straightforward.
      
         - Small prep cleanup for idmapping support.
      
         - Get rid of the xfs_buf_t typedef"
      
      * tag 'xfs-5.11-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (40 commits)
        xfs: remove xfs_buf_t typedef
        fs/xfs: convert comma to semicolon
        xfs: open code updating i_mode in xfs_set_acl
        xfs: remove xfs_vn_setattr_nonsize
        xfs: kill ialloced in xfs_dialloc()
        xfs: spilt xfs_dialloc() into 2 functions
        xfs: move xfs_dialloc_roll() into xfs_dialloc()
        xfs: move on-disk inode allocation out of xfs_ialloc()
        xfs: introduce xfs_dialloc_roll()
        xfs: convert noroom, okalloc in xfs_dialloc() to bool
        xfs: don't catch dax+reflink inodes as corruption in verifier
        xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks
        xfs: remove unneeded return value check for *init_cursor()
        xfs: introduce xfs_validate_stripe_geometry()
        xfs: show the proper user quota options
        xfs: remove the unused XFS_B_FSB_OFFSET macro
        xfs: remove unnecessary null check in xfs_generic_create
        xfs: directly return if the delta equal to zero
        xfs: check tp->t_dqinfo value instead of the XFS_TRANS_DQ_DIRTY flag
        xfs: delete duplicated tp->t_dqinfo null check and allocation
        ...
      a0b96314