Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. May 23, 2024
  2. Apr 11, 2024
  3. Feb 13, 2024
  4. Feb 07, 2024
  5. Jan 15, 2024
  6. Nov 25, 2023
  7. Nov 03, 2023
  8. Oct 27, 2023
  9. Oct 18, 2023
  10. Aug 31, 2023
  11. Aug 24, 2023
  12. Aug 22, 2023
    • Jeff Layton's avatar
      ceph: fscrypt_auth handling for ceph · 2d332d5b
      Jeff Layton authored
      
      Most fscrypt-enabled filesystems store the crypto context in an xattr,
      but that's problematic for ceph as xatts are governed by the XATTR cap,
      but we really want the crypto context as part of the AUTH cap.
      
      Because of this, the MDS has added two new inode metadata fields:
      fscrypt_auth and fscrypt_file. The former is used to hold the crypto
      context, and the latter is used to track the real file size.
      
      Parse new fscrypt_auth and fscrypt_file fields in inode traces. For now,
      we don't use fscrypt_file, but fscrypt_auth is used to hold the fscrypt
      context.
      
      Allow the client to use a setattr request for setting the fscrypt_auth
      field. Since this is not a standard setattr request from the VFS, we add
      a new field to __ceph_setattr that carries ceph-specific inode attrs.
      
      Have the set_context op do a setattr that sets the fscrypt_auth value,
      and get_context just return the contents of that field (since it should
      always be available).
      
      Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
      Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
      Reviewed-and-tested-by: default avatarLuís Henriques <lhenriques@suse.de>
      Reviewed-by: default avatarMilind Changire <mchangir@redhat.com>
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      2d332d5b
    • Jeff Layton's avatar
      ceph: make ceph_msdc_build_path use ref-walk · 4c793d4c
      Jeff Layton authored
      
      Encryption potentially requires allocation, at which point we'll need to
      be in a non-atomic context. Convert ceph_msdc_build_path to take dentry
      spinlocks and references instead of using rcu_read_lock to walk the
      path.
      
      This is slightly less efficient, and we may want to eventually allow
      using RCU when the leaf dentry isn't encrypted.
      
      Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
      Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
      Reviewed-and-tested-by: default avatarLuís Henriques <lhenriques@suse.de>
      Reviewed-by: default avatarMilind Changire <mchangir@redhat.com>
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      4c793d4c
    • Jeff Layton's avatar
      ceph: preallocate inode for ops that may create one · ec9595c0
      Jeff Layton authored
      
      When creating a new inode, we need to determine the crypto context
      before we can transmit the RPC. The fscrypt API has a routine for getting
      a crypto context before a create occurs, but it requires an inode.
      
      Change the ceph code to preallocate an inode in advance of a create of
      any sort (open(), mknod(), symlink(), etc). Move the existing code that
      generates the ACL and SELinux blobs into this routine since that's
      mostly common across all the different codepaths.
      
      In most cases, we just want to allow ceph_fill_trace to use that inode
      after the reply comes in, so add a new field to the MDS request for it
      (r_new_inode).
      
      The async create codepath is a bit different though. In that case, we
      want to hash the inode in advance of the RPC so that it can be used
      before the reply comes in. If the call subsequently fails with
      -EJUKEBOX, then just put the references and clean up the as_ctx. Note
      that with this change, we now need to regenerate the as_ctx when this
      occurs, but it's quite rare for it to happen.
      
      Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
      Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
      Reviewed-and-tested-by: default avatarLuís Henriques <lhenriques@suse.de>
      Reviewed-by: default avatarMilind Changire <mchangir@redhat.com>
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      ec9595c0
  13. Aug 01, 2023
  14. Jun 30, 2023
  15. May 18, 2023
  16. Apr 30, 2023
  17. Feb 07, 2023
  18. Feb 02, 2023
  19. Oct 04, 2022
  20. Aug 02, 2022