1. 02 Dec, 2021 17 commits
  2. 01 Dec, 2021 19 commits
  3. 30 Nov, 2021 4 commits
    • Warner Losh's avatar
      Remove DS_BUSY case · cbe9faa5
      Warner Losh authored
      DS_BUSY is no longer a device state. Remove it from here.
      
      Sponsored by:		Netflix
      cbe9faa5
    • Warner Losh's avatar
      Make device_busy/unbusy work w/o Giant held · 1c7d15b0
      Warner Losh authored
      The vast majority of the busy/unbusy users in the tree don't acquire
      Giant before calling device_busy/unbusy. However, if multiple threads
      are opening a file, say, that causes the device to busy/unbusy, then we
      can race to the root marking things busy. Move to using a reference
      count to keep track of how many times a device_t has been made busy. Use
      that count to make the same decisions that we'd make with the old device
      state.
      
      Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a
      known race with closes that will be corrected for all the drivers that
      do this in a future commit.
      
      Sponsored by:		Netflix
      Reviewed by:		hselasky, jhb
      Differential Revision:	https://reviews.freebsd.org/D26284
      1c7d15b0
    • Warner Losh's avatar
      Revert "Make device_busy/unbusy work w/o Giant held" · 25c49c42
      Warner Losh authored
      This reverts commit 08e78191.
      
      Commit message was for a very old version of the patch. Will re-commit
      with the right one since it's so bad. There's no locked versions of
      it...that code was reworked to use refcnt APIs.
      
      Noticed by:	jhb, jtrc27
      Sponsored by:	Netflix
      25c49c42
    • Warner Losh's avatar
      Make device_busy/unbusy work w/o Giant held · 08e78191
      Warner Losh authored
      The vast majority of the busy/unbusy users in the tree don't acquire Giant
      before calling device_busy/unbusy. However, if multiple threads are opening a
      file, say, that causes the device to busy/unbusy, then we can race to the root
      marking things busy. Create a new device_busy_locked and device_unbusy_locked
      that are the current implemntations of device_busy and device_unbusy. Make
      device_busy and unbusy acquire Giant before calling the _locked versrions. Since
      we never sleep in the busy/unbusy path, Giant's single threaded semantics
      suffice to keep this safe.
      
      Sponsored by:		Netflix
      Reviewed by:		hselasky, jhb
      Differential Revision:	https://reviews.freebsd.org/D26284
      08e78191