[DRBD-cvs] drbd by phil; * Disabled a check in drbd_actlog.c, sin...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Tue, 15 Jun 2004 17:44:57 +0200 (CEST)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_actlog.c drbd_compat_wrappers.h
Log Message:
* Disabled a check in drbd_actlog.c, since it does not consider the
external metadata case.
* An ASSERTION in the new drbd_bitmap.c pointed me to an fatal error in
drbd_set_my_capacity(). The patch is microscopic... but somehow it
took me quite some time until I understood the issue.
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_actlog.c,v
retrieving revision 1.1.2.106
retrieving revision 1.1.2.107
diff -u -3 -r1.1.2.106 -r1.1.2.107
--- drbd_actlog.c 15 Jun 2004 13:42:29 -0000 1.1.2.106
+++ drbd_actlog.c 15 Jun 2004 15:44:52 -0000 1.1.2.107
@@ -81,7 +81,7 @@
struct bio bio;
struct bio_vec vec;
struct completion event;
- const sector_t capacity = drbd_get_capacity(mdev->this_bdev);
+ //const sector_t capacity = drbd_get_capacity(mdev->this_bdev);
int ok = 0;
if (!mdev->md_bdev) {
@@ -116,13 +116,15 @@
current->comm, current->pid, __func__,
sector, rw ? "WRITE" : "READ");
#endif
+
+ /* This check does not handle external meta data corretly. -> Disabled.
if (sector < drbd_md_ss(mdev) ||
sector > drbd_md_ss(mdev)+MD_BM_OFFSET+BM_SECT_TO_EXT(capacity)) {
ALERT("%s [%d]:%s(,%ld,%s) out of range md access!\n",
current->comm, current->pid, __func__,
(long)sector, rw ? "WRITE" : "READ");
}
-
+ */
#ifdef BIO_RW_SYNC
submit_bio(rw | (1 << BIO_RW_SYNC), &bio);
#else
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_compat_wrappers.h,v
retrieving revision 1.1.2.45
retrieving revision 1.1.2.46
diff -u -3 -r1.1.2.45 -r1.1.2.46
--- drbd_compat_wrappers.h 15 Jun 2004 10:07:32 -0000 1.1.2.45
+++ drbd_compat_wrappers.h 15 Jun 2004 15:44:52 -0000 1.1.2.46
@@ -316,7 +316,7 @@
static inline void drbd_set_my_capacity(drbd_dev *mdev, sector_t size)
{
set_capacity(mdev->vdisk,size);
- mdev->this_bdev->bd_inode->i_size = size << 9;
+ mdev->this_bdev->bd_inode->i_size = (loff_t)size << 9;
}
//#warning "FIXME why don't we care for the return value?"