[DRBD-cvs] drbd by phil; * Fixes to bio_prepare functions. (drbd_...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Sun, 1 Feb 2004 19:15:14 +0100 (CET)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_compat_wrappers.h drbd_dsender.c drbd_fs.c drbd_req-2.4.c
Log Message:
* Fixes to bio_prepare functions. (drbd_compat_wrappers.h)
* Removed ASSERT. (I think that assertion is only true for reads.)
* fix to drbd_set_state. (Crashed if the device was not opened. =
Call form cleanup_module)
* Implemented remapping in drbd_req-2.4.c for L26 :)
Whow. It is already possible to run mkfs on top of DRBD under
Linux-2.6.x. -- Moving forward!
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_compat_wrappers.h,v
retrieving revision 1.1.2.17
retrieving revision 1.1.2.18
diff -u -3 -r1.1.2.17 -r1.1.2.18
--- drbd_compat_wrappers.h 1 Feb 2004 12:09:31 -0000 1.1.2.17
+++ drbd_compat_wrappers.h 1 Feb 2004 18:15:08 -0000 1.1.2.18
@@ -466,6 +466,7 @@
bio->bi_bdev = mdev->backing_bdev;
bio->bi_sector = sector;
bio->bi_private = mdev;
+ bio->bi_next = 0;
}
static inline void
@@ -494,6 +495,7 @@
bio->bi_bdev = mdev->backing_bdev;
bio->bi_private = mdev;
bio->bi_end_io = drbd_dio_end;
+ bio->bi_next = 0;
// FIXME D_ASSERT(??)
// what else?
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_dsender.c,v
retrieving revision 1.1.2.66
retrieving revision 1.1.2.67
diff -u -3 -r1.1.2.66 -r1.1.2.67
--- drbd_dsender.c 1 Feb 2004 12:09:31 -0000 1.1.2.66
+++ drbd_dsender.c 1 Feb 2004 18:15:08 -0000 1.1.2.67
@@ -251,9 +251,6 @@
req = container_of(bio,struct drbd_request,private_bio);
PARANOIA_BUG_ON(!VALID_POINTER(req));
- if (error == 0)
- D_ASSERT(drbd_bio_uptodate(bio));
-
drbd_end_req(req, RQ_DRBD_WRITTEN, (error == 0), drbd_req_get_sector(req));
drbd_al_complete_io(mdev,drbd_req_get_sector(req));
return 0;
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_fs.c,v
retrieving revision 1.28.2.58
retrieving revision 1.28.2.59
diff -u -3 -r1.28.2.58 -r1.28.2.59
--- drbd_fs.c 1 Feb 2004 12:09:31 -0000 1.28.2.58
+++ drbd_fs.c 1 Feb 2004 18:15:08 -0000 1.28.2.59
@@ -486,6 +486,10 @@
drbd_is_mounted(minor) == MountedRW))
return -EBUSY;
#else
+ if(mdev->this_bdev->bd_contains == 0) {
+ mdev->this_bdev->bd_contains = mdev->this_bdev;
+ }
+
if ( newstate & Secondary ) {
/* If I got here, I am Primary. I claim me for myself. If that
* does not succeed, someone other has claimed me, so I cannot
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_req-2.4.c,v
retrieving revision 1.33.2.48
retrieving revision 1.33.2.49
diff -u -3 -r1.33.2.48 -r1.33.2.49
--- drbd_req-2.4.c 1 Feb 2004 12:09:32 -0000 1.33.2.48
+++ drbd_req-2.4.c 1 Feb 2004 18:15:09 -0000 1.33.2.49
@@ -287,9 +287,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
bio->b_rdev = mdev->lo_device;
#else
- //#warning "FIXME"
- //WORK_HERE
- /* I want to change it anyways so we never remap ... */
+ bio->bi_bdev = mdev->backing_bdev;
#endif
return 1; // Not arranged for transfer ( but remapped :)
}
@@ -304,8 +302,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
bio->b_rdev = mdev->lo_device;
#else
- //#warning "FIXME"
- //WORK_HERE
+ bio->bi_bdev = mdev->backing_bdev;
/* I want to change it anyways so we never remap ... */
#endif
return 1; // Not arranged for transfer ( but remapped :)