aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2010-11-24 04:11:14 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-03-10 05:35:15 -0500
commit42ff269d1022a86be4f526cf674998c47b7ab856 (patch)
treed392b05fd0c626093b552232b26b60d21afa4d26 /drivers/block/drbd
parent3e3a7766c2e6995ac98e7855017abc3544d54e08 (diff)
drbd: add packet_type 27 (return_code_only) to netlink api
In case we ever should add an other packet type, we must not reuse 27, as that currently used for "empty" return code only replies. Document it as such. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_nl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 80a389d24cdd..6a6dde6c51c6 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -2195,7 +2195,8 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms
2195 goto fail; 2195 goto fail;
2196 } 2196 }
2197 2197
2198 if (nlp->packet_type >= P_nl_after_last_packet) { 2198 if (nlp->packet_type >= P_nl_after_last_packet ||
2199 nlp->packet_type == P_return_code_only) {
2199 retcode = ERR_PACKET_NR; 2200 retcode = ERR_PACKET_NR;
2200 goto fail; 2201 goto fail;
2201 } 2202 }
@@ -2219,7 +2220,7 @@ static void drbd_connector_callback(struct cn_msg *req, struct netlink_skb_parms
2219 reply = (struct drbd_nl_cfg_reply *) cn_reply->data; 2220 reply = (struct drbd_nl_cfg_reply *) cn_reply->data;
2220 2221
2221 reply->packet_type = 2222 reply->packet_type =
2222 cm->reply_body_size ? nlp->packet_type : P_nl_after_last_packet; 2223 cm->reply_body_size ? nlp->packet_type : P_return_code_only;
2223 reply->minor = nlp->drbd_minor; 2224 reply->minor = nlp->drbd_minor;
2224 reply->ret_code = NO_ERROR; /* Might by modified by cm->function. */ 2225 reply->ret_code = NO_ERROR; /* Might by modified by cm->function. */
2225 /* reply->tag_list; might be modified by cm->function. */ 2226 /* reply->tag_list; might be modified by cm->function. */
@@ -2525,6 +2526,7 @@ void drbd_nl_send_reply(struct cn_msg *req, int ret_code)
2525 cn_reply->len = sizeof(struct drbd_nl_cfg_reply); 2526 cn_reply->len = sizeof(struct drbd_nl_cfg_reply);
2526 cn_reply->flags = 0; 2527 cn_reply->flags = 0;
2527 2528
2529 reply->packet_type = P_return_code_only;
2528 reply->minor = ((struct drbd_nl_cfg_req *)req->data)->drbd_minor; 2530 reply->minor = ((struct drbd_nl_cfg_req *)req->data)->drbd_minor;
2529 reply->ret_code = ret_code; 2531 reply->ret_code = ret_code;
2530 2532