"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drbd/drbd_sender.c" between
drbd-9.1.8.tar.gz and drbd-9.1.9.tar.gz

About: DRBD (9.x) is a block device which is designed to build high availability clusters. This is done by mirroring a whole block device via (a dedicated) network. You could see it as a "network RAID-1". The driver code got integrated into the vanilla Linux kernel.

drbd_sender.c  (drbd-9.1.8):drbd_sender.c  (drbd-9.1.9)
skipping to change at line 1283 skipping to change at line 1283
if (drbd_rs_del_all(peer_device)) { if (drbd_rs_del_all(peer_device)) {
/* In case this is not possible now, most probably because /* In case this is not possible now, most probably because
* there are P_RS_DATA_REPLY Packets lingering on the sender's * there are P_RS_DATA_REPLY Packets lingering on the sender's
* queue (or even the read operations for those packets * queue (or even the read operations for those packets
* is not finished by now). Retry in 100ms. */ * is not finished by now). Retry in 100ms. */
schedule_timeout_interruptible(HZ / 10); schedule_timeout_interruptible(HZ / 10);
queue_resync_finished(peer_device, new_peer_disk_state); queue_resync_finished(peer_device, new_peer_disk_state);
return; return;
} }
if (!down_write_trylock(&device->uuid_sem)) {
if (current == device->resource->worker.task) {
queue_resync_finished(peer_device, new_peer_disk_state);
return;
} else {
down_write(&device->uuid_sem);
}
}
dt = (jiffies - peer_device->rs_start - peer_device->rs_paused) / HZ; dt = (jiffies - peer_device->rs_start - peer_device->rs_paused) / HZ;
if (dt <= 0) if (dt <= 0)
dt = 1; dt = 1;
db = peer_device->rs_total; db = peer_device->rs_total;
/* adjust for verify start and stop sectors, respective reached position */ /* adjust for verify start and stop sectors, respective reached position */
if (repl_state[NOW] == L_VERIFY_S || repl_state[NOW] == L_VERIFY_T) if (repl_state[NOW] == L_VERIFY_S || repl_state[NOW] == L_VERIFY_T)
db -= atomic64_read(&peer_device->ov_left); db -= atomic64_read(&peer_device->ov_left);
dbdt = Bit2KB(db/dt); dbdt = Bit2KB(db/dt);
peer_device->rs_paused /= HZ; peer_device->rs_paused /= HZ;
if (!get_ldev(device)) if (!get_ldev(device)) {
up_write(&device->uuid_sem);
goto out; goto out;
}
drbd_ping_peer(connection); drbd_ping_peer(connection);
down_write(&device->uuid_sem);
write_lock_irq(&device->resource->state_rwlock); write_lock_irq(&device->resource->state_rwlock);
begin_state_change_locked(device->resource, CS_VERBOSE); begin_state_change_locked(device->resource, CS_VERBOSE);
old_repl_state = repl_state[NOW]; old_repl_state = repl_state[NOW];
verify_done = (repl_state[NOW] == L_VERIFY_S || repl_state[NOW] == L_VERI FY_T); verify_done = (repl_state[NOW] == L_VERIFY_S || repl_state[NOW] == L_VERI FY_T);
/* This protects us against multiple calls (that can happen in the presen ce /* This protects us against multiple calls (that can happen in the presen ce
of application IO), and against connectivity loss just before we arriv e here. */ of application IO), and against connectivity loss just before we arriv e here. */
if (peer_device->repl_state[NOW] <= L_ESTABLISHED) if (peer_device->repl_state[NOW] <= L_ESTABLISHED)
goto out_unlock; goto out_unlock;
skipping to change at line 2607 skipping to change at line 2617
} }
static struct drbd_request *__next_request_for_connection( static struct drbd_request *__next_request_for_connection(
struct drbd_connection *connection) struct drbd_connection *connection)
{ {
struct drbd_request *req; struct drbd_request *req;
list_for_each_entry_rcu(req, &connection->resource->transfer_log, tl_requ ests) { list_for_each_entry_rcu(req, &connection->resource->transfer_log, tl_requ ests) {
unsigned s = req->net_rq_state[connection->peer_node_id]; unsigned s = req->net_rq_state[connection->peer_node_id];
connection->send.seen_dagtag_sector = req->dagtag_sector; connection->send.seen_dagtag_sector = req->dagtag_sector;
if (!(s & RQ_NET_QUEUED)) if (s & RQ_NET_QUEUED)
continue; return req;
return req; /* Found a request which is for this peer but not yet queued.
* Do not skip past it. */
if (s & RQ_NET_PENDING && !(s & RQ_NET_SENT))
return NULL;
} }
return NULL; return NULL;
} }
static struct drbd_request *tl_next_request_for_connection(struct drbd_connectio n *connection) static struct drbd_request *tl_next_request_for_connection(struct drbd_connectio n *connection)
{ {
if (connection->todo.req_next == NULL) if (connection->todo.req_next == NULL)
connection->todo.req_next = __next_request_for_connection(connect ion); connection->todo.req_next = __next_request_for_connection(connect ion);
connection->todo.req = connection->todo.req_next; connection->todo.req = connection->todo.req_next;
 End of changes. 5 change blocks. 
5 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)