return ERR_PTR(-ENOMEM);
atomic_set(&cl->nref, 0);
- init_waitqueue_head(&cl->mount_wq);
+ init_completion(&cl->mount_completion);
spin_lock_init(&cl->sb_lock);
get_client_counter();
/* wait */
dout(10, "mount waiting\n");
- err = wait_event_interruptible_timeout(client->mount_wq,
- (find_first_zero_bit(&client->mounting, 4) == 3),
- 6*HZ);
+ err = wait_for_completion_timeout(&client->mount_completion, 6*HZ);
if (err == -EINTR)
return err;
if (client->mounting < 7) {
}
/* get handle for mount path */
- dout(10, "mount got all maps; opening root directory\n");
+ dout(10, "mount got all maps; opening root directory '%s'\n", args->path);
err = ceph_mdsc_do(&client->mdsc, CEPH_MDS_OP_OPEN,
CEPH_INO_ROOT, args->path, 0, 0);
if (err < 0)
num, client->mounting, (int)find_first_zero_bit(&client->mounting, 4));
if (find_first_zero_bit(&client->mounting, 4) == 3) {
dout(10, "got_first_map kicking mount\n");
- wake_up(&client->mount_wq);
+ complete(&client->mount_completion);
}
}
atomic_t nref;
unsigned long mounting; /* map bitset; 4=mon, 2=mds, 1=osd map */
- wait_queue_head_t mount_wq;
+ struct completion mount_completion;
struct ceph_messenger *msgr; /* messenger instance */
struct ceph_mon_client monc;