1. 21 10月, 2021 1 次提交
  2. 23 8月, 2021 1 次提交
    • J
      fs: remove mandatory file locking support · f7e33bdb
      Jeff Layton 提交于
      We added CONFIG_MANDATORY_FILE_LOCKING in 2015, and soon after turned it
      off in Fedora and RHEL8. Several other distros have followed suit.
      
      I've heard of one problem in all that time: Someone migrated from an
      older distro that supported "-o mand" to one that didn't, and the host
      had a fstab entry with "mand" in it which broke on reboot. They didn't
      actually _use_ mandatory locking so they just removed the mount option
      and moved on.
      
      This patch rips out mandatory locking support wholesale from the kernel,
      along with the Kconfig option and the Documentation file. It also
      changes the mount code to ignore the "mand" mount option instead of
      erroring out, and to throw a big, ugly warning.
      Signed-off-by: NJeff Layton <jlayton@kernel.org>
      f7e33bdb
  3. 29 6月, 2021 3 次提交
  4. 28 6月, 2021 2 次提交
  5. 02 6月, 2021 1 次提交
  6. 21 5月, 2021 1 次提交
  7. 20 5月, 2021 1 次提交
  8. 12 4月, 2021 1 次提交
  9. 10 4月, 2021 1 次提交
  10. 04 4月, 2021 1 次提交
  11. 18 2月, 2021 2 次提交
    • A
      gfs2: Add per-reservation reserved block accounting · 725d0e9d
      Andreas Gruenbacher 提交于
      Add a rs_reserved field to struct gfs2_blkreserv to keep track of the number of
      blocks reserved by this particular reservation, and a rd_reserved field to
      struct gfs2_rgrpd to keep track of the total number of reserved blocks in the
      resource group.  Those blocks are exclusively reserved, as opposed to the
      rs_requested / rd_requested blocks which are tracked in the reservation tree
      (rd_rstree) and which can be stolen if necessary.
      
      When making a reservation with gfs2_inplace_reserve, rs_reserved is set to
      somewhere between ap->min_target and ap->target depending on the number of free
      blocks in the resource group.  When allocating blocks with gfs2_alloc_blocks,
      rs_reserved is decremented accordingly.  Eventually, any reserved but not
      consumed blocks are returned to the resource group by gfs2_inplace_release.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      725d0e9d
    • A
      gfs2: Check for active reservation in gfs2_release · 0ec9b9ea
      Andreas Gruenbacher 提交于
      In gfs2_release, check if the inode has an active reservation to avoid
      unnecessary lock taking.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      0ec9b9ea
  12. 24 1月, 2021 3 次提交
  13. 14 1月, 2021 1 次提交
  14. 06 8月, 2020 1 次提交
  15. 03 8月, 2020 1 次提交
  16. 08 7月, 2020 1 次提交
    • A
      gfs2: Rework read and page fault locking · 20f82999
      Andreas Gruenbacher 提交于
      So far, gfs2 has taken the inode glocks inside the ->readpage and
      ->readahead address space operations.  Since commit d4388340 ("fs:
      convert mpage_readpages to mpage_readahead"), gfs2_readahead is passed
      the pages to read ahead locked.  With that, the current holder of the
      inode glock may be trying to lock one of those pages while
      gfs2_readahead is trying to take the inode glock, resulting in a
      deadlock.
      
      Fix that by moving the lock taking to the higher-level ->read_iter file
      and ->fault vm operations.  This also gets rid of an ugly lock inversion
      workaround in gfs2_readpage.
      
      The cache consistency model of filesystems like gfs2 is such that if
      data is found in the page cache, the data is up to date and can be used
      without taking any filesystem locks.  If a page is not cached,
      filesystem locks must be taken before populating the page cache.
      
      To avoid taking the inode glock when the data is already cached,
      gfs2_file_read_iter first tries to read the data with the IOCB_NOIO flag
      set.  If that fails, the inode glock is taken and the operation is
      retried with the IOCB_NOIO flag cleared.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      20f82999
  17. 28 3月, 2020 4 次提交
  18. 07 2月, 2020 2 次提交
  19. 15 11月, 2019 1 次提交
  20. 08 11月, 2019 2 次提交
    • A
      gfs2: Fix end-of-file handling in gfs2_page_mkwrite · 184b4e60
      Andreas Gruenbacher 提交于
      When the filesystem block size is smaller than the page size, the last
      page may contain blocks that lie entirely beyond the end of the file.
      Make sure to only allocate blocks that lie at least partially in the
      file.  Allocating blocks beyond that isn't useful, and what's more, they
      will not be zeroed out and may end up containing random data.
      
      With that change in place, make sure we'll still always unstuff stuffed
      inodes: iomap_writepage and iomap_writepages currently can't handle
      stuffed files.
      
      In addition, simplify and move the end-of-file check further to the top
      in gfs2_page_mkwrite to avoid weird side effects like unstuffing when
      we're not.
      
      Fixes xfstest generic/263.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      184b4e60
    • A
      gfs2: Multi-block allocations in gfs2_page_mkwrite · f53056c4
      Andreas Gruenbacher 提交于
      In gfs2_page_mkwrite's gfs2_allocate_page_backing helper, try to
      allocate as many blocks at once as we need.  Pass in the size of the
      requested allocation.
      
      Fixes: 35af80ae ("gfs2: don't use buffer_heads in gfs2_allocate_page_backing")
      Cc: stable@vger.kernel.org # v5.3+
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      f53056c4
  21. 30 10月, 2019 1 次提交
  22. 23 10月, 2019 1 次提交
  23. 15 10月, 2019 1 次提交
  24. 05 9月, 2019 1 次提交
  25. 03 9月, 2019 1 次提交
    • A
      gfs2: Always mark inode dirty in fallocate · 0a6a4abc
      Andreas Gruenbacher 提交于
      When allocating space with fallocate, always update the file timestamps
      and mark the inode dirty, no matter if the FALLOC_FL_KEEP_SIZE flag is
      set or not.  The inode needs to be marked dirty so that a subsequent
      fsync will pick it up and any new allocations will make it to disk.
      Filesystems like xfs and ext4 always update the timestamps, so make
      gfs2 behave the same way.
      
      Fixes xfstest generic/483.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      0a6a4abc
  26. 03 7月, 2019 2 次提交
  27. 01 7月, 2019 1 次提交
  28. 28 6月, 2019 1 次提交