An error occurred fetching the project authors.
  1. 14 Feb, 2023 6 commits
  2. 03 Oct, 2022 1 commit
  3. 07 Sep, 2022 1 commit
    • Peter Zijlstra's avatar
      freezer,sched: Rewrite core freezer logic · f5d39b02
      Peter Zijlstra authored
      Rewrite the core freezer to behave better wrt thawing and be simpler
      in general.
      
      By replacing PF_FROZEN with TASK_FROZEN, a special block state, it is
      ensured frozen tasks stay frozen until thawed and don't randomly wake
      up early, as is currently possible.
      
      As such, it does away with PF_FROZEN and PF_FREEZER_SKIP, freeing up
      two PF_flags (yay!).
      
      Specifically; the current scheme works a little like:
      
      	freezer_do_not_count();
      	schedule();
      	freezer_count();
      
      And either the task is blocked, or it lands in try_to_freezer()
      through freezer_count(). Now, when it is blocked, the freezer
      considers it frozen and continues.
      
      However, on thawing, once pm_freezing is cleared, freezer_count()
      stops working, and any random/spurious wakeup will let a task run
      before its time.
      
      That is, thawing tries to thaw things in explicit order; kernel
      threads and workqueues before doing bringing SMP back before userspace
      etc.. However due to the above mentioned races it is entirely possible
      for userspace tasks to thaw (by accident) before SMP is back.
      
      This can be a fatal problem in asymmetric ISA architectures (eg ARMv9)
      where the userspace task requires a special CPU to run.
      
      As said; replace this with a special task state TASK_FROZEN and add
      the following state transitions:
      
      	TASK_FREEZABLE	-> TASK_FROZEN
      	__TASK_STOPPED	-> TASK_FROZEN
      	__TASK_TRACED	-> TASK_FROZEN
      
      The new TASK_FREEZABLE can be set on any state part of TASK_NORMAL
      (IOW. TASK_INTERRUPTIBLE and TASK_UNINTERRUPTIBLE) -- any such state
      is already required to deal with spurious wakeups and the freezer
      causes one such when thawing the task (since the original state is
      lost).
      
      The special __TASK_{STOPPED,TRACED} states *can* be restored since
      their canonical state is in ->jobctl.
      
      With this, frozen tasks need an explicit TASK_FROZEN wakeup and are
      free of undue (early / spurious) wakeups.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Link: https://lore.kernel.org/r/20220822114649.055452969@infradead.org
      f5d39b02
  4. 13 Aug, 2022 1 commit
    • Trond Myklebust's avatar
      NFS: Fix another fsync() issue after a server reboot · 67f4b5dc
      Trond Myklebust authored
      Currently, when the writeback code detects a server reboot, it redirties
      any pages that were not committed to disk, and it sets the flag
      NFS_CONTEXT_RESEND_WRITES in the nfs_open_context of the file descriptor
      that dirtied the file. While this allows the file descriptor in question
      to redrive its own writes, it violates the fsync() requirement that we
      should be synchronising all writes to disk.
      While the problem is infrequent, we do see corner cases where an
      untimely server reboot causes the fsync() call to abandon its attempt to
      sync data to disk and causing data corruption issues due to missed error
      conditions or similar.
      
      In order to tighted up the client's ability to deal with this situation
      without introducing livelocks, add a counter that records the number of
      times pages are redirtied due to a server reboot-like condition, and use
      that in fsync() to redrive the sync to disk.
      
      Fixes: 2197e9b0 ("NFS: Fix up fsync() when the server rebooted")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      67f4b5dc
  5. 02 Aug, 2022 1 commit
  6. 12 Jul, 2022 1 commit
  7. 17 May, 2022 3 commits
  8. 10 May, 2022 5 commits
  9. 09 May, 2022 1 commit
  10. 08 May, 2022 3 commits
  11. 01 Apr, 2022 1 commit
  12. 15 Mar, 2022 3 commits
  13. 13 Mar, 2022 3 commits
  14. 25 Feb, 2022 1 commit
  15. 10 Jan, 2022 1 commit
  16. 10 Sep, 2021 1 commit
    • Jeff Layton's avatar
      locks: remove LOCK_MAND flock lock support · 90f7d7a0
      Jeff Layton authored
      As best I can tell, the logic for these has been broken for a long time
      (at least before the move to git), such that they never conflict with
      anything. Also, nothing checks for these flags and prevented opens or
      read/write behavior on the files. They don't seem to do anything.
      
      Given that, we can rip these symbols out of the kernel, and just make
      flock(2) return 0 when LOCK_MAND is set in order to preserve existing
      behavior.
      
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
      90f7d7a0
  17. 26 Aug, 2021 1 commit
    • J. Bruce Fields's avatar
      nfs: don't allow reexport reclaims · bb0a55bb
      J. Bruce Fields authored
      In the reexport case, nfsd is currently passing along locks with the
      reclaim bit set.  The client sends a new lock request, which is granted
      if there's currently no conflict--even if it's possible a conflicting
      lock could have been briefly held in the interim.
      
      We don't currently have any way to safely grant reclaim, so for now
      let's just deny them all.
      
      I'm doing this by passing the reclaim bit to nfs and letting it fail the
      call, with the idea that eventually the client might be able to do
      something more forgiving here.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      Acked-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      bb0a55bb
  18. 23 Aug, 2021 1 commit
    • Jeff Layton's avatar
      fs: remove mandatory file locking support · f7e33bdb
      Jeff Layton authored
      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: default avatarJeff Layton <jlayton@kernel.org>
      f7e33bdb
  19. 13 Apr, 2021 1 commit
  20. 16 Feb, 2021 1 commit
  21. 08 Feb, 2021 3 commits