summaryrefslogtreecommitdiff
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-01-25 11:33:08 -0800
committerSage Weil <sage@newdream.net>2010-01-25 11:49:51 -0800
commit5b1daecd59f95eb24dc629407ed80369c9929520 (patch)
tree19b5d4e11427350f48947df8dca453069ed0a0d5 /fs/ceph/mds_client.h
parent3ea25f9441fc0951ada649105f2c57a59536b539 (diff)
downloadlwn-5b1daecd59f95eb24dc629407ed80369c9929520.tar.gz
lwn-5b1daecd59f95eb24dc629407ed80369c9929520.zip
ceph: properly handle aborted mds requests
Previously, if the MDS request was interrupted, we would unregister the request and ignore any reply. This could cause the caps or other cache state to become out of sync. (For instance, aborting dbench and doing rm -r on clients would complain about a non-empty directory because the client didn't realize it's aborted file create request completed.) Even we don't unregister, we still can't process the reply normally because we are no longer holding the caller's locks (like the dir i_mutex). So, mark aborted operations with r_aborted, and in the reply handler, be sure to process all the caps. Do not process the namespace changes, though, since we no longer will hold the dir i_mutex. The dentry lease state can also be ignored as it's more forgiving. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index b1c2025227c5..ee71495e27c4 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -188,6 +188,7 @@ struct ceph_mds_request {
struct ceph_msg *r_reply;
struct ceph_mds_reply_info_parsed r_reply_info;
int r_err;
+ bool r_aborted;
unsigned long r_timeout; /* optional. jiffies */
unsigned long r_started; /* start time to measure timeout against */