• Alex Elder's avatar
    rbd: issue stat request before layered write · c5b5ef6c
    Alex Elder authored
    This is a step toward fully implementing layered writes.
    
    Add checks before request submission for the object(s) associated
    with an image request.  For write requests, if we don't know that
    the target object exists, issue a STAT request to find out.  When
    that request completes, mark the known and exists flags for the
    original object request accordingly and re-submit the object
    request.  (Note that this still does the existence check only; the
    copyup operation is not yet done.)
    
    A new object request is created to perform the existence check.  A
    pointer to the original request is added to that object request to
    allow the stat request to re-issue the original request after
    updating its flags.  If there is a failure with the stat request
    the error code is stored with the original request, which is then
    completed.
    
    This resolves:
        http://tracker.ceph.com/issues/3418Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    c5b5ef6c
rbd.c 117 KB