| 134 | |
| 135 | filepath n1; |
| 136 | const char *get_random_subdir() { |
| 137 | ceph_assert(!subdirs.empty()); |
| 138 | int r = ((rand() % subdirs.size()) + (rand() % subdirs.size())) / 2; // non-uniform distn |
| 139 | std::set<std::string>::iterator it = subdirs.begin(); |
| 140 | while (r--) ++it; |
| 141 | |
| 142 | n1 = cwd; |
| 143 | n1.push_dentry( *it ); |
| 144 | return n1.get_path().c_str(); |
| 145 | } |
| 146 | filepath n2; |
| 147 | const char *get_random_sub() { |
| 148 | ceph_assert(!contents.empty()); |