class_export_cb_put(exp);
OBD_FREE_PTR(ccb);
}
+
+ if ((exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ /* report failure to force synchronous operation */
+ return -EPERM;
+
return rc;
}
EXPORT_SYMBOL(lut_last_commit_cb_add);
if (!strcmp(ted->ted_lcd->lcd_uuid, tg->lut_obd->obd_uuid.uuid))
RETURN(0);
+ cfs_mutex_init(&ted->ted_lcd_lock);
+
+ if ((exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
+ RETURN(0);
+
/* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
* there's no need for extra complication here
*/
ted->ted_lr_off = tg->lut_lsd.lsd_client_start +
idx * tg->lut_lsd.lsd_client_size;
- cfs_mutex_init(&ted->ted_lcd_lock);
-
LASSERTF(ted->ted_lr_off > 0, "ted_lr_off = %llu\n", ted->ted_lr_off);
CDEBUG(D_INFO, "%s: new client at index %d (%llu) with UUID '%s'\n",
LASSERT(tg->lut_client_bitmap != NULL);
LASSERTF(idx >= 0, "%d\n", idx);
- if (!strcmp(ted->ted_lcd->lcd_uuid, tg->lut_obd->obd_uuid.uuid))
+ if (!strcmp(ted->ted_lcd->lcd_uuid, tg->lut_obd->obd_uuid.uuid) ||
+ (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
RETURN(0);
if (cfs_test_and_set_bit(idx, tg->lut_client_bitmap)) {
/* XXX if lcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
if (!strcmp((char *)ted->ted_lcd->lcd_uuid,
- (char *)tg->lut_obd->obd_uuid.uuid))
+ (char *)tg->lut_obd->obd_uuid.uuid) ||
+ (exp->exp_connect_flags & OBD_CONNECT_LIGHTWEIGHT) != 0)
RETURN(0);
CDEBUG(D_INFO, "%s: del client at idx %u, off %lld, UUID '%s'\n",