diff options
author | Jonathan Earl Brassow <jbrassow@redhat.com> | 2010-08-30 18:37:42 +0000 |
---|---|---|
committer | Jonathan Earl Brassow <jbrassow@redhat.com> | 2010-08-30 18:37:42 +0000 |
commit | 34cbedceafef960ec1aa0af863cc147e81d5b86e (patch) | |
tree | 51e74842ee8e1d2c4faacd033e1d2b30f9b480c3 /daemons/cmirrord/functions.c | |
parent | ba6662c5d6f1fe31561a8eb6eb5eae0274424a1c (diff) | |
download | lvm2-34cbedceafef960ec1aa0af863cc147e81d5b86e.tar.gz lvm2-34cbedceafef960ec1aa0af863cc147e81d5b86e.tar.xz lvm2-34cbedceafef960ec1aa0af863cc147e81d5b86e.zip |
This patch fixes an issue where cluster mirror write I/O
can be opprobriously slow if created with '--nosync'.
One of the ways cluster mirrors coordinate I/O and recovery
amoung the different machines is by the use of the log
function 'is_remote_recovering()' which lets nodes know if
a region they wish to perform a write on is currently being
recovered on another node. If the region is being recovered,
the I/O is delayed.
The 'is_remote_recovering' routine has been optimized to
avoid the deluge of requests that would be issued to the
userspace log server by maintaining a marker of how far
the recovery has gotten. It can then immediately return
'not recovering' if the region being inquired about is
less than this mark. Additionally, if the region of
concern is greater than the mark, the function will
limit the number of transmissions to userspace by assuming
the region /is/ being recovered when skipping the
transmission. This limits the amount of processing
and updates the mark in 1/4 sec time steps.
This patch fixes a problem where 'the mark' is not being
updated because of faulty logic in the userspace log
daemon. When '--nosync' is used to create a cluster
mirror, the userspace log daemon never has a chance
to update the mark in the normal way. The fix is to set
the mark to "complete" if the mirror was created with
the --nosync flag.
Diffstat (limited to 'daemons/cmirrord/functions.c')
-rw-r--r-- | daemons/cmirrord/functions.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index 36910b19..e5da7575 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -1268,6 +1268,7 @@ static int clog_get_resync_work(struct dm_ulog_request *rq, uint32_t originator) LOG_SPRINT(lc, "GET - SEQ#=%u, UUID=%s, nodeid = %u:: " "Resync work complete.", rq->seq, SHORT_UUID(lc->uuid), originator); + lc->sync_search = lc->region_count + 1; return 0; } |