Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345718
b: refs/heads/master
c: 8554df1
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Aug 29, 2011
1 parent 2a257cc commit 6116d8e
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 114 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: bb3bfe96144a4535d47ccfea444bc1ef8e02f4e3
refs/heads/master: 8554df1c6d3bb7686b39ed775772f507fa857c19
10 changes: 5 additions & 5 deletions trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -2031,21 +2031,21 @@ static inline void drbd_thread_restart_nowait(struct drbd_thread *thi)
* or implicit barrier packets as necessary.
* increased:
* w_send_barrier
* _req_mod(req, queue_for_net_write or queue_for_net_read);
* _req_mod(req, QUEUE_FOR_NET_WRITE or QUEUE_FOR_NET_READ);
* it is much easier and equally valid to count what we queue for the
* worker, even before it actually was queued or send.
* (drbd_make_request_common; recovery path on read io-error)
* decreased:
* got_BarrierAck (respective tl_clear, tl_clear_barrier)
* _req_mod(req, data_received)
* _req_mod(req, DATA_RECEIVED)
* [from receive_DataReply]
* _req_mod(req, write_acked_by_peer or recv_acked_by_peer or neg_acked)
* _req_mod(req, WRITE_ACKED_BY_PEER or RECV_ACKED_BY_PEER or NEG_ACKED)
* [from got_BlockAck (P_WRITE_ACK, P_RECV_ACK)]
* for some reason it is NOT decreased in got_NegAck,
* but in the resulting cleanup code from report_params.
* we should try to remember the reason for that...
* _req_mod(req, send_failed or send_canceled)
* _req_mod(req, connection_lost_while_pending)
* _req_mod(req, SEND_FAILED or SEND_CANCELED)
* _req_mod(req, CONNECTION_LOST_WHILE_PENDING)
* [from tl_clear_barrier]
*/
static inline void inc_ap_pending(struct drbd_conf *mdev)
Expand Down
28 changes: 14 additions & 14 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
/* Clean up list of requests processed during current epoch */
list_for_each_safe(le, tle, &b->requests) {
r = list_entry(le, struct drbd_request, tl_requests);
_req_mod(r, barrier_acked);
_req_mod(r, BARRIER_ACKED);
}
/* There could be requests on the list waiting for completion
of the write to the local disk. To avoid corruptions of
Expand All @@ -300,10 +300,10 @@ void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
the write acks - which would be a bug and violating write ordering.
To not deadlock in case we lose connection while such requests are
still pending, we need some way to find them for the
_req_mode(connection_lost_while_pending).
_req_mode(CONNECTION_LOST_WHILE_PENDING).
These have been list_move'd to the out_of_sequence_requests list in
_req_mod(, barrier_acked) above.
_req_mod(, BARRIER_ACKED) above.
*/
list_del_init(&b->requests);

Expand Down Expand Up @@ -336,8 +336,8 @@ void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
* @mdev: DRBD device.
* @what: The action/event to perform with all request objects
*
* @what might be one of connection_lost_while_pending, resend, fail_frozen_disk_io,
* restart_frozen_disk_io.
* @what might be one of CONNECTION_LOST_WHILE_PENDING, RESEND, FAIL_FROZEN_DISK_IO,
* RESTART_FROZEN_DISK_IO.
*/
static void _tl_restart(struct drbd_conf *mdev, enum drbd_req_event what)
{
Expand All @@ -362,7 +362,7 @@ static void _tl_restart(struct drbd_conf *mdev, enum drbd_req_event what)
tmp = b->next;

if (n_writes) {
if (what == resend) {
if (what == RESEND) {
b->n_writes = n_writes;
if (b->w.cb == NULL) {
b->w.cb = w_send_barrier;
Expand Down Expand Up @@ -423,7 +423,7 @@ void tl_clear(struct drbd_conf *mdev)

spin_lock_irq(&mdev->req_lock);

_tl_restart(mdev, connection_lost_while_pending);
_tl_restart(mdev, CONNECTION_LOST_WHILE_PENDING);

/* we expect this list to be empty. */
D_ASSERT(list_empty(&mdev->out_of_sequence_requests));
Expand All @@ -433,7 +433,7 @@ void tl_clear(struct drbd_conf *mdev)
r = list_entry(le, struct drbd_request, tl_requests);
/* It would be nice to complete outside of spinlock.
* But this is easier for now. */
_req_mod(r, connection_lost_while_pending);
_req_mod(r, CONNECTION_LOST_WHILE_PENDING);
}

/* ensure bit indicating barrier is required is clear */
Expand Down Expand Up @@ -1321,7 +1321,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
union drbd_state ns, enum chg_state_flags flags)
{
enum drbd_fencing_p fp;
enum drbd_req_event what = nothing;
enum drbd_req_event what = NOTHING;
union drbd_state nsm = (union drbd_state){ .i = -1 };

if (os.conn != C_CONNECTED && ns.conn == C_CONNECTED) {
Expand Down Expand Up @@ -1349,12 +1349,12 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
nsm.i = -1;
if (ns.susp_nod) {
if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED)
what = resend;
what = RESEND;

if (os.disk == D_ATTACHING && ns.disk > D_ATTACHING)
what = restart_frozen_disk_io;
what = RESTART_FROZEN_DISK_IO;

if (what != nothing)
if (what != NOTHING)
nsm.susp_nod = 0;
}

Expand All @@ -1373,12 +1373,12 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
/* case2: The connection was established again: */
if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) {
clear_bit(NEW_CUR_UUID, &mdev->flags);
what = resend;
what = RESEND;
nsm.susp_fen = 0;
}
}

if (what != nothing) {
if (what != NOTHING) {
spin_lock_irq(&mdev->req_lock);
_tl_restart(mdev, what);
nsm.i &= mdev->state.i;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ static int drbd_nl_resume_io(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
if (mdev->state.conn < C_CONNECTED)
tl_clear(mdev);
if (mdev->state.disk == D_DISKLESS || mdev->state.disk == D_FAILED)
tl_restart(mdev, fail_frozen_disk_io);
tl_restart(mdev, FAIL_FROZEN_DISK_IO);
}
drbd_resume_io(mdev);

Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ int drbd_release_ee(struct drbd_conf *mdev, struct list_head *list)

/*
* This function is called from _asender only_
* but see also comments in _req_mod(,barrier_acked)
* but see also comments in _req_mod(,BARRIER_ACKED)
* and receive_Barrier.
*
* Move entries from net_ee to done_ee, if ready.
Expand Down Expand Up @@ -1507,7 +1507,7 @@ static int receive_DataReply(struct drbd_conf *mdev, enum drbd_packets cmd, unsi
ok = recv_dless_read(mdev, req, sector, data_size);

if (ok)
req_mod(req, data_received);
req_mod(req, DATA_RECEIVED);
/* else: nothing. handled from drbd_disconnect...
* I don't think we may complete this just yet
* in case we are "on-disconnect: freeze" */
Expand Down Expand Up @@ -3279,7 +3279,7 @@ static int receive_state(struct drbd_conf *mdev, enum drbd_packets cmd, unsigned
cs_flags = CS_VERBOSE + (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED ? 0 : CS_HARD);
if (ns.pdsk == D_CONSISTENT && is_susp(ns) && ns.conn == C_CONNECTED && os.conn < C_CONNECTED &&
test_bit(NEW_CUR_UUID, &mdev->flags)) {
/* Do not allow tl_restart(resend) for a rebooted peer. We can only allow this
/* Do not allow tl_restart(RESEND) for a rebooted peer. We can only allow this
for temporal network outages! */
spin_unlock_irq(&mdev->req_lock);
dev_err(DEV, "Aborting Connect, can not thaw IO with an only Consistent peer\n");
Expand Down Expand Up @@ -4272,19 +4272,19 @@ static int got_BlockAck(struct drbd_conf *mdev, struct p_header80 *h)
switch (be16_to_cpu(h->command)) {
case P_RS_WRITE_ACK:
D_ASSERT(mdev->net_conf->wire_protocol == DRBD_PROT_C);
what = write_acked_by_peer_and_sis;
what = WRITE_ACKED_BY_PEER_AND_SIS;
break;
case P_WRITE_ACK:
D_ASSERT(mdev->net_conf->wire_protocol == DRBD_PROT_C);
what = write_acked_by_peer;
what = WRITE_ACKED_BY_PEER;
break;
case P_RECV_ACK:
D_ASSERT(mdev->net_conf->wire_protocol == DRBD_PROT_B);
what = recv_acked_by_peer;
what = RECV_ACKED_BY_PEER;
break;
case P_DISCARD_ACK:
D_ASSERT(mdev->net_conf->wire_protocol == DRBD_PROT_C);
what = conflict_discarded_by_peer;
what = CONFLICT_DISCARDED_BY_PEER;
break;
default:
D_ASSERT(0);
Expand Down Expand Up @@ -4315,7 +4315,7 @@ static int got_NegAck(struct drbd_conf *mdev, struct p_header80 *h)

found = validate_req_change_req_state(mdev, p->block_id, sector,
&mdev->write_requests, __func__,
neg_acked, missing_ok);
NEG_ACKED, missing_ok);
if (!found) {
/* Protocol A has no P_WRITE_ACKs, but has P_NEG_ACKs.
The master bio might already be completed, therefore the
Expand All @@ -4340,7 +4340,7 @@ static int got_NegDReply(struct drbd_conf *mdev, struct p_header80 *h)

return validate_req_change_req_state(mdev, p->block_id, sector,
&mdev->read_requests, __func__,
neg_acked, false);
NEG_ACKED, false);
}

static int got_NegRSDReply(struct drbd_conf *mdev, struct p_header80 *h)
Expand Down
Loading

0 comments on commit 6116d8e

Please sign in to comment.