1. 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
  2. 20 Dec, 2020 2 commits
  3. 19 Dec, 2020 32 commits
  4. 18 Dec, 2020 4 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
    • Linus Torvalds's avatar
      Merge tag 'ktest-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · 4862c741
      Linus Torvalds authored
      Pull ktest updates from Steven Rostedt:
       "No new features. Just a couple of fixes that I had in my local
        repository that fixed issues with sending the result emails"
      
      * tag 'ktest-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
        ktest.pl: Fix the logic for truncating the size of the log file for email
        ktest.pl: If size of log is too big to email, email error message
      4862c741
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2020-12-18' of git://anongit.freedesktop.org/drm/drm · c59c7588
      Linus Torvalds authored
      Pull more drm updates from Daniel Vetter:
       "UAPI Changes:
      
         - Only enable char/agp uapi when CONFIG_DRM_LEGACY is set
      
        Cross-subsystem Changes:
      
         - vma_set_file helper to make vma->vm_file changing less brittle,
           acked by Andrew
      
        Core Changes:
      
         - dma-buf heaps improvements
      
         - pass full atomic modeset state to driver callbacks
      
         - shmem helpers: cached bo by default
      
         - cleanups for fbdev, fb-helpers
      
         - better docs for drm modes and SCALING_FITLER uapi
      
         - ttm: fix dma32 page pool regression
      
        Driver Changes:
      
         - multi-hop regression fixes for amdgpu, radeon, nouveau
      
         - lots of small amdgpu hw enabling fixes (display, pm, ...)
      
         - fixes for imx, mcde, meson, some panels, virtio, qxl, i915, all
           fairly minor
      
         - some cleanups for legacy drm/fbdev drivers"
      
      * tag 'drm-next-2020-12-18' of git://anongit.freedesktop.org/drm/drm: (117 commits)
        drm/qxl: don't allocate a dma_address array
        drm/nouveau: fix multihop when move doesn't work.
        drm/i915/tgl: Fix REVID macros for TGL to fetch correct stepping
        drm/i915: Fix mismatch between misplaced vma check and vma insert
        drm/i915/perf: also include Gen11 in OATAILPTR workaround
        Revert "drm/i915: re-order if/else ladder for hpd_irq_setup"
        drm/amdgpu/disply: fix documentation warnings in display manager
        drm/amdgpu: print mmhub client name for dimgrey_cavefish
        drm/amdgpu: set mode1 reset as default for dimgrey_cavefish
        drm/amd/display: Add get_dig_frontend implementation for DCEx
        drm/radeon: remove h from printk format specifier
        drm/amdgpu: remove h from printk format specifier
        drm/amdgpu: Fix spelling mistake "Heterogenous" -> "Heterogeneous"
        drm/amdgpu: fix regression in vbios reservation handling on headless
        drm/amdgpu/SRIOV: Extend VF reset request wait period
        drm/amdkfd: correct amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu log.
        drm/amd/display: Adding prototype for dccg21_update_dpp_dto()
        drm/amdgpu: print what method we are using for runtime pm
        drm/amdgpu: simplify logic in atpx resume handling
        drm/amdgpu: no need to call pci_ignore_hotplug for _PR3
        ...
      c59c7588