Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345841
b: refs/heads/master
c: 3f9cbe9
h: refs/heads/master
i:
  345839: 1144472
v: v3
  • Loading branch information
Philipp Reisner committed Oct 14, 2011
1 parent 03ac815 commit 1a3610b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e29d163f7ec8369b3f1fb70900d29b1c4a1dc8b
refs/heads/master: 3f9cbe937ec41fca8842594e0529537f3019c775
38 changes: 19 additions & 19 deletions trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ static char *drbd_m_holder = "Hands off! this is DRBD's meta data device.";

/* 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; \
Expand All @@ -64,7 +64,7 @@ static int name ## _from_tags(struct drbd_conf *mdev, \
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; \
} \
} \
Expand All @@ -87,7 +87,7 @@ static int name ## _from_tags(struct drbd_conf *mdev, \
#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; \
} \
Expand All @@ -99,10 +99,10 @@ static int name ## _from_tags(struct drbd_conf *mdev, \
/* 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 \
Expand Down Expand Up @@ -483,7 +483,7 @@ static int drbd_nl_primary(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp,
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;
}
Expand Down Expand Up @@ -956,7 +956,7 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
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;
}
Expand Down Expand Up @@ -1376,7 +1376,7 @@ static int drbd_nl_net_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp,
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;
}
Expand Down Expand Up @@ -1553,7 +1553,7 @@ static int drbd_nl_disconnect(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nl
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;
}
Expand Down Expand Up @@ -1630,7 +1630,7 @@ static int drbd_nl_resize(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp,
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;
}
Expand Down Expand Up @@ -1715,7 +1715,7 @@ static int drbd_nl_syncer_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n
} 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;
}
Expand Down Expand Up @@ -2020,15 +2020,15 @@ static int drbd_nl_get_config(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nl
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 */

Expand All @@ -2043,7 +2043,7 @@ static int drbd_nl_get_state(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
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) {
Expand Down Expand Up @@ -2105,7 +2105,7 @@ static int drbd_nl_start_ov(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp,
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;
}
Expand All @@ -2131,7 +2131,7 @@ static int drbd_nl_new_c_uuid(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nl
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;
}
Expand Down Expand Up @@ -2365,7 +2365,7 @@ void drbd_bcast_state(struct drbd_conf *mdev, union drbd_state state)

/* 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 */

Expand Down

0 comments on commit 1a3610b

Please sign in to comment.