| 436 | } |
| 437 | |
| 438 | bool MDRequestImpl::can_batch() |
| 439 | { |
| 440 | if (num_auth_pins || num_remote_auth_pins || lock_cache || !locks.empty()) |
| 441 | return false; |
| 442 | |
| 443 | auto op = client_request->get_op(); |
| 444 | auto& path = client_request->get_filepath(); |
| 445 | if (op == CEPH_MDS_OP_GETATTR) { |
| 446 | if (path.depth() == 0) |
| 447 | return true; |
| 448 | } else if (op == CEPH_MDS_OP_LOOKUP) { |
| 449 | if (path.depth() == 1 && !path.is_last_snap()) |
| 450 | return true; |
| 451 | } |
| 452 | |
| 453 | return false; |
| 454 | } |
| 455 | |
| 456 | std::unique_ptr<BatchOp> MDRequestImpl::release_batch_op() |
| 457 | { |
no test coverage detected