[DRBD-cvs] drbd by phil; preparing drbd-0.7-pre8 release. Changes...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Fri, 18 Jun 2004 14:45:13 +0200 (CEST)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_actlog.c drbd_bitmap.c drbd_receiver.c
Log Message:
preparing drbd-0.7-pre8 release.
Changes to -pre7
* Zero-copy IO disabled for now, since it cases data-corruption after
resync. This will be investigated further...
* Bitmap code rewritten and seperated into own source file.
In the progress a few bugs were discovered and fixed.
* New metadata flag MDF_FullSync to indicate that we need a full sync
next time. -> This makes sure that we never loose a full sync event,
even if we crash during writing the bitmap.
* PARTNER_CONSISTENT flag, so we won't sync against or read from
some inconsistent peer.
* sync handshake improved. detects split brain, detects inconsistent
local or peer data, detects whether full sync is neccessary.
* moved syncer handshake and detach ioctl into their own functions
* meta data is initialised as inconsistent, need full sync.
* Added the "on-disconnect = stand_allone" and the ko-count options.
* Some work on drbdsetup's man page.
* Added "drbddisk [resource] status" for integration with heartbeat.
* Improved module usage count.
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_actlog.c,v
retrieving revision 1.1.2.109
retrieving revision 1.1.2.110
diff -u -3 -r1.1.2.109 -r1.1.2.110
--- drbd_actlog.c 17 Jun 2004 01:44:36 -0000 1.1.2.109
+++ drbd_actlog.c 18 Jun 2004 12:45:05 -0000 1.1.2.110
@@ -538,9 +538,9 @@
kfree(udw);
- /* FIXME what about PausedSync{S,T} ? */
if(drbd_bm_total_weight(mdev) == 0 &&
- ( mdev->cstate == SyncSource || mdev->cstate == SyncTarget ) ) {
+ ( mdev->cstate == SyncSource || mdev->cstate == SyncTarget ||
+ mdev->cstate == PausedSyncS || mdev->cstate == PausedSyncT ) ) {
D_ASSERT( mdev->resync_work.cb == w_resync_inactive );
drbd_bm_lock(mdev);
drbd_resync_finished(mdev);
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_bitmap.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- drbd_bitmap.c 17 Jun 2004 01:44:36 -0000 1.1.2.4
+++ drbd_bitmap.c 18 Jun 2004 12:45:05 -0000 1.1.2.5
@@ -69,6 +69,7 @@
// { REMOVE once we serialize all state changes properly
#define D_BUG_ON(x) ERR_IF(x) { dump_stack(); }
#define BM_LOCKED 0
+#if 0 // simply disabled for now...
#define MUST_NOT_BE_LOCKED() do { \
if (test_bit(BM_LOCKED,&b->bm_flags)) { \
if (DRBD_ratelimit(5*HZ,5)) { \
@@ -87,6 +88,10 @@
} \
} \
} while (0)
+#else
+#define MUST_NOT_BE_LOCKED() do {(void)b;} while (0)
+#define MUST_BE_LOCKED() do {(void)b;} while (0)
+#endif
void __drbd_bm_lock(drbd_dev *mdev, char* file, int line)
{
struct drbd_bitmap *b = mdev->bitmap;
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.172
retrieving revision 1.97.2.173
diff -u -3 -r1.97.2.172 -r1.97.2.173
--- drbd_receiver.c 17 Jun 2004 01:44:37 -0000 1.97.2.172
+++ drbd_receiver.c 18 Jun 2004 12:45:05 -0000 1.97.2.173
@@ -1262,7 +1262,7 @@
if (have_good == -1) {
/* Sync-Target has to adopt source's gen_cnt. */
int i;
- for(i=HumanCnt;i<=ArbitraryCnt;i++) {
+ for(i=HumanCnt;i<GEN_CNT_SIZE;i++) {
mdev->gen_cnt[i]=be32_to_cpu(p->gen_cnt[i]);
}
}
@@ -1633,8 +1633,7 @@
drbd_thread_stop_nowait(&mdev->worker);
drbd_thread_stop(&mdev->asender);
- while(down_trylock(&mdev->data.mutex))
- {
+ while(down_trylock(&mdev->data.mutex)) {
struct task_struct *task;
spin_lock(&mdev->send_task_lock);
if((task=mdev->send_task)) {
@@ -1664,7 +1663,7 @@
// primary
tl_clear(mdev);
clear_bit(ISSUE_BARRIER,&mdev->flags);
- wait_event( mdev->cstate_wait, atomic_read(&mdev->ap_pending_cnt) == 0 );
+ wait_event( mdev->cstate_wait, atomic_read(&mdev->ap_pending_cnt)==0 );
D_ASSERT(mdev->oldest_barrier->n_req == 0);
// both