From 78699e29fd784a4613d254a22627f336c55c4a76 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 11 Feb 2016 23:07:19 -0500 Subject: orangefs: delay freeing slot until cancel completes Make cancels reuse the aborted read/write op, to make sure they do not fail on lack of memory. Don't issue a cancel unless the daemon has seen our read/write, has not replied and isn't being shut down. If cancel *is* issued, don't wait for it to complete; stash the slot in there and just have it freed when cancel is finally replied to or purged (and delay dropping the reference until then, obviously). Signed-off-by: Al Viro Signed-off-by: Mike Marshall --- fs/orangefs/orangefs-utils.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'fs/orangefs/orangefs-utils.c') diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c index fa3ed8ad35be..08f9c2dab0fe 100644 --- a/fs/orangefs/orangefs-utils.c +++ b/fs/orangefs/orangefs-utils.c @@ -688,38 +688,6 @@ int orangefs_unmount_sb(struct super_block *sb) return ret; } -/* - * NOTE: on successful cancellation, be sure to return -EINTR, as - * that's the return value the caller expects - */ -int orangefs_cancel_op_in_progress(__u64 tag) -{ - int ret = -EINVAL; - struct orangefs_kernel_op_s *new_op = NULL; - - gossip_debug(GOSSIP_UTILS_DEBUG, - "orangefs_cancel_op_in_progress called on tag %llu\n", - llu(tag)); - - new_op = op_alloc(ORANGEFS_VFS_OP_CANCEL); - if (!new_op) - return -ENOMEM; - new_op->upcall.req.cancel.op_tag = tag; - - gossip_debug(GOSSIP_UTILS_DEBUG, - "Attempting ORANGEFS operation cancellation of tag %llu\n", - llu(new_op->upcall.req.cancel.op_tag)); - - ret = service_operation(new_op, "orangefs_cancel", ORANGEFS_OP_CANCELLATION); - - gossip_debug(GOSSIP_UTILS_DEBUG, - "orangefs_cancel_op_in_progress: got return value of %d\n", - ret); - - op_release(new_op); - return ret; -} - void orangefs_make_bad_inode(struct inode *inode) { if (is_root_handle(inode)) { -- cgit v1.2.1