/* Generate the tag_list to struct functions */
#define NL_PACKET(name, number, fields) \
-static int name ## _from_tags(struct drbd_conf *mdev, \
+static int name ## _from_tags( \
unsigned short *tags, struct name *arg) __attribute__ ((unused)); \
-static int name ## _from_tags(struct drbd_conf *mdev, \
+static int name ## _from_tags( \
unsigned short *tags, struct name *arg) \
{ \
int tag; \
fields \
default: \
if (tag & T_MANDATORY) { \
- dev_err(DEV, "Unknown tag: %d\n", tag_number(tag)); \
+ printk(KERN_ERR "drbd: Unknown tag: %d\n", tag_number(tag)); \
return 0; \
} \
} \
#define NL_STRING(pn, pr, member, len) \
case pn: /* D_ASSERT( tag_type(tag) == TT_STRING ); */ \
if (dlen > len) { \
- dev_err(DEV, "arg too long: %s (%u wanted, max len: %u bytes)\n", \
+ printk(KERN_ERR "drbd: arg too long: %s (%u wanted, max len: %u bytes)\n", \
#member, dlen, (unsigned int)len); \
return 0; \
} \
/* Generate the struct to tag_list functions */
#define NL_PACKET(name, number, fields) \
static unsigned short* \
-name ## _to_tags(struct drbd_conf *mdev, \
+name ## _to_tags( \
struct name *arg, unsigned short *tags) __attribute__ ((unused)); \
static unsigned short* \
-name ## _to_tags(struct drbd_conf *mdev, \
+name ## _to_tags( \
struct name *arg, unsigned short *tags) \
{ \
fields \
struct primary primary_args;
memset(&primary_args, 0, sizeof(struct primary));
- if (!primary_from_tags(mdev, nlp->tag_list, &primary_args)) {
+ if (!primary_from_tags(nlp->tag_list, &primary_args)) {
reply->ret_code = ERR_MANDATORY_TAG;
return 0;
}
nbc->dc.fencing = DRBD_FENCING_DEF;
nbc->dc.max_bio_bvecs = DRBD_MAX_BIO_BVECS_DEF;
- if (!disk_conf_from_tags(mdev, nlp->tag_list, &nbc->dc)) {
+ if (!disk_conf_from_tags(nlp->tag_list, &nbc->dc)) {
retcode = ERR_MANDATORY_TAG;
goto fail;
}
new_conf->on_congestion = DRBD_ON_CONGESTION_DEF;
new_conf->cong_extents = DRBD_CONG_EXTENTS_DEF;
- if (!net_conf_from_tags(mdev, nlp->tag_list, new_conf)) {
+ if (!net_conf_from_tags(nlp->tag_list, new_conf)) {
retcode = ERR_MANDATORY_TAG;
goto fail;
}
struct disconnect dc;
memset(&dc, 0, sizeof(struct disconnect));
- if (!disconnect_from_tags(mdev, nlp->tag_list, &dc)) {
+ if (!disconnect_from_tags(nlp->tag_list, &dc)) {
retcode = ERR_MANDATORY_TAG;
goto fail;
}
enum dds_flags ddsf;
memset(&rs, 0, sizeof(struct resize));
- if (!resize_from_tags(mdev, nlp->tag_list, &rs)) {
+ if (!resize_from_tags(nlp->tag_list, &rs)) {
retcode = ERR_MANDATORY_TAG;
goto fail;
}
} else
memcpy(&sc, &mdev->sync_conf, sizeof(struct syncer_conf));
- if (!syncer_conf_from_tags(mdev, nlp->tag_list, &sc)) {
+ if (!syncer_conf_from_tags(nlp->tag_list, &sc)) {
retcode = ERR_MANDATORY_TAG;
goto fail;
}
tl = reply->tag_list;
if (get_ldev(mdev)) {
- tl = disk_conf_to_tags(mdev, &mdev->ldev->dc, tl);
+ tl = disk_conf_to_tags(&mdev->ldev->dc, tl);
put_ldev(mdev);
}
if (get_net_conf(mdev->tconn)) {
- tl = net_conf_to_tags(mdev, mdev->tconn->net_conf, tl);
+ tl = net_conf_to_tags(mdev->tconn->net_conf, tl);
put_net_conf(mdev->tconn);
}
- tl = syncer_conf_to_tags(mdev, &mdev->sync_conf, tl);
+ tl = syncer_conf_to_tags(&mdev->sync_conf, tl);
put_unaligned(TT_END, tl++); /* Close the tag list */
unsigned long rs_left;
unsigned int res;
- tl = get_state_to_tags(mdev, (struct get_state *)&s, tl);
+ tl = get_state_to_tags((struct get_state *)&s, tl);
/* no local ref, no bitmap, no syncer progress. */
if (s.conn >= C_SYNC_SOURCE && s.conn <= C_PAUSED_SYNC_T) {
struct start_ov args =
{ .start_sector = mdev->ov_start_sector };
- if (!start_ov_from_tags(mdev, nlp->tag_list, &args)) {
+ if (!start_ov_from_tags(nlp->tag_list, &args)) {
reply->ret_code = ERR_MANDATORY_TAG;
return 0;
}
struct new_c_uuid args;
memset(&args, 0, sizeof(struct new_c_uuid));
- if (!new_c_uuid_from_tags(mdev, nlp->tag_list, &args)) {
+ if (!new_c_uuid_from_tags(nlp->tag_list, &args)) {
reply->ret_code = ERR_MANDATORY_TAG;
return 0;
}
/* dev_warn(DEV, "drbd_bcast_state() got called\n"); */
- tl = get_state_to_tags(mdev, (struct get_state *)&state, tl);
+ tl = get_state_to_tags((struct get_state *)&state, tl);
put_unaligned(TT_END, tl++); /* Close the tag list */