1. 28 4月, 2021 2 次提交
  2. 16 2月, 2021 3 次提交
  3. 15 12月, 2020 4 次提交
  4. 05 11月, 2020 1 次提交
    • J
      ceph: check session state after bumping session->s_seq · 62575e27
      Jeff Layton 提交于
      Some messages sent by the MDS entail a session sequence number
      increment, and the MDS will drop certain types of requests on the floor
      when the sequence numbers don't match.
      
      In particular, a REQUEST_CLOSE message can cross with one of the
      sequence morphing messages from the MDS which can cause the client to
      stall, waiting for a response that will never come.
      
      Originally, this meant an up to 5s delay before the recurring workqueue
      job kicked in and resent the request, but a recent change made it so
      that the client would never resend, causing a 60s stall unmounting and
      sometimes a blockisting event.
      
      Add a new helper for incrementing the session sequence and then testing
      to see whether a REQUEST_CLOSE needs to be resent, and move the handling
      of CEPH_MDS_SESSION_CLOSING into that function. Change all of the
      bare sequence counter increments to use the new helper.
      
      Reorganize check_session_state with a switch statement.  It should no
      longer be called when the session is CLOSING, so throw a warning if it
      ever is (but still handle that case sanely).
      
      [ idryomov: whitespace, pr_err() call fixup ]
      
      URL: https://tracker.ceph.com/issues/47563
      Fixes: fa996773 ("ceph: fix potential mdsc use-after-free crash")
      Reported-by: NPatrick Donnelly <pdonnell@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@kernel.org>
      Reviewed-by: NIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: NXiubo Li <xiubli@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      62575e27
  5. 12 10月, 2020 5 次提交
  6. 24 8月, 2020 1 次提交
    • J
      ceph: fix inode number handling on arches with 32-bit ino_t · ebce3eb2
      Jeff Layton 提交于
      Tuan and Ulrich mentioned that they were hitting a problem on s390x,
      which has a 32-bit ino_t value, even though it's a 64-bit arch (for
      historical reasons).
      
      I think the current handling of inode numbers in the ceph driver is
      wrong. It tries to use 32-bit inode numbers on 32-bit arches, but that's
      actually not a problem. 32-bit arches can deal with 64-bit inode numbers
      just fine when userland code is compiled with LFS support (the common
      case these days).
      
      What we really want to do is just use 64-bit numbers everywhere, unless
      someone has mounted with the ino32 mount option. In that case, we want
      to ensure that we hash the inode number down to something that will fit
      in 32 bits before presenting the value to userland.
      
      Add new helper functions that do this, and only do the conversion before
      presenting these values to userland in getattr and readdir.
      
      The inode table hashvalue is changed to just cast the inode number to
      unsigned long, as low-order bits are the most likely to vary anyway.
      
      While it's not strictly required, we do want to put something in
      inode->i_ino. Instead of basing it on BITS_PER_LONG, however, base it on
      the size of the ino_t type.
      
      NOTE: This is a user-visible change on 32-bit arches:
      
      1/ inode numbers will be seen to have changed between kernel versions.
         32-bit arches will see large inode numbers now instead of the hashed
         ones they saw before.
      
      2/ any really old software not built with LFS support may start failing
         stat() calls with -EOVERFLOW on inode numbers >2^32. Nothing much we
         can do about these, but hopefully the intersection of people running
         such code on ceph will be very small.
      
      The workaround for both problems is to mount with "-o ino32".
      
      [ idryomov: changelog tweak ]
      
      URL: https://tracker.ceph.com/issues/46828Reported-by: NUlrich Weigand <Ulrich.Weigand@de.ibm.com>
      Reported-and-Tested-by: NTuan Hoang1 <Tuan.Hoang1@ibm.com>
      Signed-off-by: NJeff Layton <jlayton@kernel.org>
      Reviewed-by: N"Yan, Zheng" <zyan@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      ebce3eb2
  7. 03 8月, 2020 2 次提交
  8. 01 6月, 2020 12 次提交
  9. 27 5月, 2020 1 次提交
  10. 05 5月, 2020 2 次提交
  11. 30 3月, 2020 7 次提交