Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242841
b: refs/heads/master
c: 2561b9c
h: refs/heads/master
i:
  242839: 637bcd3
v: v3
  • Loading branch information
Philipp Reisner committed Mar 10, 2011
1 parent 4e357be commit fa4c576
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 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: 42ff269d1022a86be4f526cf674998c47b7ab856
refs/heads/master: 2561b9c1f1d63077c41903fc6ad58dc9ec47248b
15 changes: 15 additions & 0 deletions trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,21 @@ static int drbd_nl_disconnect(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nl
struct drbd_nl_cfg_reply *reply)
{
int retcode;
struct disconnect dc;

memset(&dc, 0, sizeof(struct disconnect));
if (!disconnect_from_tags(mdev, nlp->tag_list, &dc)) {
retcode = ERR_MANDATORY_TAG;
goto fail;
}

if (dc.force) {
spin_lock_irq(&mdev->req_lock);
if (mdev->state.conn >= C_WF_CONNECTION)
_drbd_set_state(_NS(mdev, conn, C_DISCONNECTING), CS_HARD, NULL);
spin_unlock_irq(&mdev->req_lock);
goto done;
}

retcode = _drbd_request_state(mdev, NS(conn, C_DISCONNECTING), CS_ORDERED);

Expand Down
4 changes: 3 additions & 1 deletion trunk/include/linux/drbd_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ NL_PACKET(net_conf, 5,
NL_BIT( 70, T_MANDATORY, dry_run)
)

NL_PACKET(disconnect, 6, )
NL_PACKET(disconnect, 6,
NL_BIT( 84, T_MAY_IGNORE, force)
)

NL_PACKET(resize, 7,
NL_INT64( 29, T_MAY_IGNORE, resize_size)
Expand Down

0 comments on commit fa4c576

Please sign in to comment.