init_waitqueue_head(&waitq);
while ((atomic_read(&mnt->mnt_count) > 1) && (retries > 0)) {
- LCONSOLE_WARN("Mount still busy with %d refs, waiting for "
- "%d secs...\n",
+ LCONSOLE_WARN("%s: Mount still busy with %d refs, waiting for "
+ "%d secs...\n", mnt->mnt_devname,
atomic_read(&mnt->mnt_count), retries);
/* Wait for a bit */
l_wait_event(waitq, 0, &lwi);
}
if (atomic_read(&mnt->mnt_count) > 1) {
- CERROR("Mount %p is still busy (%d refs), giving up.\n",
- mnt, atomic_read(&mnt->mnt_count));
+ CERROR("%s: Mount still busy (%d refs), giving up.\n",
+ mnt->mnt_devname, atomic_read(&mnt->mnt_count));
}
}
if (!dash)
return(-EINVAL);
+ /* intepret <fsname>-MDTXXXXX-mdc as mdt, the better way is to pass
+ * in the fsname, then determine the server index */
+ if (!strcmp(LUSTRE_MDC_NAME, dash + 1)) {
+ dash--;
+ for (; dash > svname && *dash != '-'; dash--);
+ if (dash == svname)
+ return(-EINVAL);
+ }
+
if (strncmp(dash + 1, "MDT", 3) == 0)
rc = LDD_F_SV_TYPE_MDT;
else if (strncmp(dash + 1, "OST", 3) == 0)