1. 13 May, 2022 7 commits
    • Andreas Gruenbacher's avatar
      gfs2: Stop using glock holder auto-demotion for now · e1fa9ea8
      Andreas Gruenbacher authored
      We're having unresolved issues with the glock holder auto-demotion mechanism
      introduced in commit dc732906.  This mechanism was assumed to be essential
      for avoiding frequent short reads and writes until commit 296abc0d
      ("gfs2: No short reads or writes upon glock contention").  Since then,
      when the inode glock is lost, it is simply re-acquired and the operation
      is resumed.  This means that apart from the performance penalty, we
      might as well drop the inode glock before faulting in pages, and
      re-acquire it afterwards.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      e1fa9ea8
    • Andreas Gruenbacher's avatar
      gfs2: buffered write prefaulting · fa5dfa64
      Andreas Gruenbacher authored
      In gfs2_file_buffered_write, to increase the likelihood that all the
      user memory we're trying to write will be resident in memory, carry out
      the write in chunks and fault in each chunk of user memory before trying
      to write it.  Otherwise, some workloads will trigger frequent short
      "internal" writes, causing filesystem blocks to be allocated and then
      partially deallocated again when writing into holes, which is wasteful
      and breaks reservations.
      
      Neither the chunked writes nor any of the short "internal" writes are
      user visible.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      fa5dfa64
    • Andreas Gruenbacher's avatar
      gfs2: Align read and write chunks to the page cache · 324d116c
      Andreas Gruenbacher authored
      Align the chunks that reads and writes are carried out in to the page
      cache rather than the user buffers.  This will be more efficient in
      general, especially for allocating writes.  Optimizing the case that the
      user buffer is gfs2 backed isn't very useful; we only need to make sure
      we won't deadlock.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      324d116c
    • Andreas Gruenbacher's avatar
      gfs2: Pull return value test out of should_fault_in_pages · 72382264
      Andreas Gruenbacher authored
      Pull the return value test of the previous read or write operation out
      of should_fault_in_pages().  In a following patch, we'll fault in pages
      before the I/O and there will be no return value to check.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      72382264
    • Andreas Gruenbacher's avatar
      gfs2: Clean up use of fault_in_iov_iter_{read,write}able · 6d22ff47
      Andreas Gruenbacher authored
      No need to store the return value of the fault_in functions in separate
      variables.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      6d22ff47
    • Andreas Gruenbacher's avatar
      gfs2: Variable rename · 42e4c3bd
      Andreas Gruenbacher authored
      Instead of counting the number of bytes read from the filesystem,
      functions gfs2_file_direct_read and gfs2_file_read_iter count the number
      of bytes written into the user buffer.  Conversely, functions
      gfs2_file_direct_write and gfs2_file_buffered_write count the number of
      bytes read from the user buffer.  This is nothing but confusing, so
      change the read functions to count how many bytes they have read, and
      the write functions to count how many bytes they have written.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      42e4c3bd
    • Andreas Gruenbacher's avatar
      gfs2: Fix filesystem block deallocation for short writes · d031a886
      Andreas Gruenbacher authored
      When a write cannot be carried out in full, gfs2_iomap_end() releases
      blocks that have been allocated for this write but haven't been used.
      
      To compute the end of the allocation, gfs2_iomap_end() incorrectly
      rounded the end of the attempted write down to the next block boundary
      to arrive at the end of the allocation.  It would have to round up, but
      the end of the allocation is also available as iomap->offset +
      iomap->length, so just use that instead.
      
      In addition, use round_up() for computing the start of the unused range.
      
      Fixes: 64bc06bb ("gfs2: iomap buffered write support")
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      d031a886
  2. 28 Apr, 2022 3 commits
  3. 27 Apr, 2022 8 commits
  4. 26 Apr, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 46cf2c61
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
      
       - Fix some register offsets on Intel Alderlake
      
       - Fix the order the UFS and SDC pins on Qualcomm SM6350
      
       - Fix a build error in Mediatek Moore.
      
       - Fix a pin function table in the Sunplus SP7021.
      
       - Fix some Kconfig and static keywords on the Samsung Tesla FSD SoC.
      
       - Fix up the EOI function for edge triggered IRQs and keep the block
         clock enabled for level IRQs in the STM32 driver.
      
       - Fix some bits and order in the Rockchip RK3308 driver.
      
       - Handle the errorpath in the Pistachio driver probe() properly.
      
      * tag 'pinctrl-v5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: pistachio: fix use of irq_of_parse_and_map()
        pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested
        pinctrl: rockchip: sort the rk3308_mux_recalced_data entries
        pinctrl: rockchip: fix RK3308 pinmux bits
        pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI
        pinctrl: Fix an error in pin-function table of SP7021
        pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
        pinctrl: mediatek: moore: Fix build error
        pinctrl: qcom: sm6350: fix order of UFS & SDC pins
        pinctrl: alderlake: Fix register offsets for ADL-N variant
        pinctrl: samsung: staticize fsd_pin_ctrl
      46cf2c61
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev · cf424ef0
      Linus Torvalds authored
      Pull fbdev fixes and updates from Helge Deller:
       "A bunch of outstanding fbdev patches - all trivial and small"
      
      * tag 'for-5.18/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
        video: fbdev: clps711x-fb: Use syscon_regmap_lookup_by_phandle
        video: fbdev: mmp: replace usage of found with dedicated list iterator variable
        video: fbdev: sh_mobile_lcdcfb: Remove sh_mobile_lcdc_check_var() declaration
        video: fbdev: i740fb: Error out if 'pixclock' equals zero
        video: fbdev: i740fb: use memset_io() to clear screen
        video: fbdev: s3fb: Error out if 'pixclock' equals zero
        video: fbdev: arkfb: Error out if 'pixclock' equals zero
        video: fbdev: tridentfb: Error out if 'pixclock' equals zero
        video: fbdev: vt8623fb: Error out if 'pixclock' equals zero
        video: fbdev: kyro: Error out if 'lineclock' equals zero
        video: fbdev: neofb: Fix the check of 'var->pixclock'
        video: fbdev: imxfb: Fix missing of_node_put in imxfb_probe
        video: fbdev: omap: Make it CCF clk API compatible
        video: fbdev: aty/matrox/...: Prepare cleanup of powerpc's asm/prom.h
        video: fbdev: pm2fb: Fix a kernel-doc formatting issue
        linux/fb.h: Spelling s/palette/palette/
        video: fbdev: sis: fix potential NULL dereference in sisfb_post_sis300()
        video: fbdev: pxafb: use if else instead
        video: fbdev: udlfb: properly check endpoint type
        video: fbdev: of: display_timing: Remove a redundant zeroing of memory
      cf424ef0
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.18-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 4fad37d5
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
      
       - Only re-check for direct I/O writes past the end of the file after
         re-acquiring the inode glock.
      
      * tag 'gfs2-v5.18-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Don't re-check for write past EOF unnecessarily
      4fad37d5
    • Linus Torvalds's avatar
      Merge tag 'for-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · fd574a2f
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - direct IO fixes:
      
            - restore passing file offset to correctly calculate checksums
              when repairing on read and bio split happens
      
            - use correct bio when sumitting IO on zoned filesystem
      
       - zoned mode fixes:
      
            - fix selection of device to correctly calculate device
              capabilities when allocating a new bio
      
            - use a dedicated lock for exclusion during relocation
      
            - fix leaked plug after failure syncing log
      
       - fix assertion during scrub and relocation
      
      * tag 'for-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: zoned: use dedicated lock for data relocation
        btrfs: fix assertion failure during scrub due to block group reallocation
        btrfs: fix direct I/O writes for split bios on zoned devices
        btrfs: fix direct I/O read repair for split bios
        btrfs: fix and document the zoned device choice in alloc_new_bio
        btrfs: fix leaked plug after failure syncing log on zoned filesystems
      fd574a2f
    • Andreas Gruenbacher's avatar
      gfs2: Don't re-check for write past EOF unnecessarily · e57f9af7
      Andreas Gruenbacher authored
      Only re-check for direct I/O writes past the end of the file after
      re-acquiring the inode glock.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      e57f9af7
  5. 25 Apr, 2022 3 commits
  6. 24 Apr, 2022 9 commits
  7. 23 Apr, 2022 5 commits