]> Pileus Git - ~andy/linux/commit
rbd: issue stat request before layered write
authorAlex Elder <elder@inktank.com>
Mon, 11 Feb 2013 18:33:24 +0000 (12:33 -0600)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:04 +0000 (21:19 -0700)
commitc5b5ef6c51124e61829632251098f8b5efecae8a
tree344901c39c537f0dd6fe709a6054d48f519da56e
parent5679c59f608f2fedff313e59b374257f1c945234
rbd: issue stat request before layered write

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/3418

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c