• Christian Brauner's avatar
    ceph: stash idmapping in mdsc request · 9c2df227
    Christian Brauner authored
    When sending a mds request cephfs will send relevant data for the
    requested operation. For creation requests the caller's fs{g,u}id is
    used to set the ownership of the newly created filesystem object. For
    setattr requests the caller can pass in arbitrary {g,u}id values to
    which the relevant filesystem object is supposed to be changed.
    
    If the caller is performing the relevant operation via an idmapped mount
    cephfs simply needs to take the idmapping into account when it sends the
    relevant mds request.
    
    In order to support idmapped mounts for cephfs we stash the idmapping
    whenever they are relevant for the operation for the duration of the
    request. Since mds requests can be queued and performed asynchronously
    we make sure to keep the idmapping around and release it once the
    request has finished.
    
    In follow-up patches we will use this to send correct ownership
    information over the wire. This patch just adds the basic infrastructure
    to keep the idmapping around. The actual conversion patches are all
    fairly minimal.
    Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
    Signed-off-by: default avatarAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
    Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    9c2df227
mds_client.c 157 KB