This commit is contained in:
parent
3e4cc222d1
commit
baae30a30d
200
drbd-2.6.24.patch
Normal file
200
drbd-2.6.24.patch
Normal file
@ -0,0 +1,200 @@
|
||||
--- drbd/drbd_actlog.c
|
||||
+++ drbd/drbd_actlog.c
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
if (FAULT_ACTIVE(mdev, (rw & WRITE)? DRBD_FAULT_MD_WR:DRBD_FAULT_MD_RD)) {
|
||||
bio->bi_rw |= rw;
|
||||
- bio_endio(bio,bio->bi_size,-EIO);
|
||||
+ bio_endio(bio,-EIO);
|
||||
}
|
||||
else {
|
||||
#ifdef BIO_RW_SYNC
|
||||
@@ -674,7 +674,7 @@
|
||||
if (bios[i]==NULL) break;
|
||||
if (FAULT_ACTIVE( mdev, DRBD_FAULT_MD_WR )) {
|
||||
bios[i]->bi_rw = WRITE;
|
||||
- bio_endio(bios[i],bios[i]->bi_size,-EIO);
|
||||
+ bio_endio(bios[i],-EIO);
|
||||
} else {
|
||||
submit_bio(WRITE, bios[i]);
|
||||
}
|
||||
--- drbd/drbd_bitmap.c
|
||||
+++ drbd/drbd_bitmap.c
|
||||
@@ -681,7 +681,7 @@
|
||||
|
||||
if (FAULT_ACTIVE(mdev, (rw&WRITE)?DRBD_FAULT_MD_WR:DRBD_FAULT_MD_RD)) {
|
||||
bio->bi_rw |= rw;
|
||||
- bio_endio(bio,bio->bi_size,-EIO);
|
||||
+ bio_endio(bio, -EIO);
|
||||
}
|
||||
else
|
||||
submit_bio(rw, bio);
|
||||
--- drbd/drbd_compat_wrappers.h
|
||||
+++ drbd/drbd_compat_wrappers.h
|
||||
@@ -23,12 +23,12 @@
|
||||
extern char* drbd_sec_holder;
|
||||
|
||||
// bi_end_io handlers
|
||||
-// int (bio_end_io_t) (struct bio *, unsigned int, int);
|
||||
-extern int drbd_md_io_complete (struct bio *bio, unsigned int bytes_done, int error);
|
||||
+// int (bio_end_io_t) (struct bio *, int);
|
||||
+extern int drbd_md_io_complete (struct bio *bio, int error);
|
||||
|
||||
-extern int drbd_endio_read_sec (struct bio *bio, unsigned int bytes_done, int error);
|
||||
-extern int drbd_endio_write_sec(struct bio *bio, unsigned int bytes_done, int error);
|
||||
-extern int drbd_endio_pri (struct bio *bio, unsigned int bytes_done, int error);
|
||||
+extern int drbd_endio_read_sec (struct bio *bio, int error);
|
||||
+extern int drbd_endio_write_sec(struct bio *bio, int error);
|
||||
+extern int drbd_endio_pri (struct bio *bio, int error);
|
||||
|
||||
static inline sector_t drbd_get_hardsect(struct block_device *bdev)
|
||||
{
|
||||
@@ -128,12 +128,12 @@
|
||||
printk(KERN_ERR DEVICE_NAME "%d: drbd_generic_make_request: bio->bi_bdev == NULL\n",
|
||||
mdev_to_minor(mdev));
|
||||
dump_stack();
|
||||
- bio_endio(bio, bio->bi_size, -ENODEV);
|
||||
+ bio_endio(bio, -ENODEV);
|
||||
return;
|
||||
}
|
||||
|
||||
if (FAULT_ACTIVE(mdev, fault_type))
|
||||
- bio_endio(bio,bio->bi_size,-EIO);
|
||||
+ bio_endio(bio, -EIO);
|
||||
else
|
||||
generic_make_request(bio);
|
||||
}
|
||||
--- drbd/drbd_receiver.c
|
||||
+++ drbd/drbd_receiver.c
|
||||
@@ -3019,9 +3019,7 @@
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- sg.page = virt_to_page(peers_ch);
|
||||
- sg.offset = offset_in_page(peers_ch);
|
||||
- sg.length = p.length;
|
||||
+ sg_set_page(&sg, virt_to_page(peers_ch), p.length, offset_in_page(peers_ch));
|
||||
|
||||
rv = crypto_hash_digest(&desc, &sg, sg.length, response);
|
||||
if(rv) {
|
||||
@@ -3064,9 +3062,7 @@
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- sg.page = virt_to_page(my_challenge);
|
||||
- sg.offset = offset_in_page(my_challenge);
|
||||
- sg.length = CHALLENGE_LEN;
|
||||
+ sg_set_page(&sg, virt_to_page(my_challenge), CHALLENGE_LEN, offset_in_page(my_challenge));
|
||||
|
||||
rv = crypto_hash_digest(&desc, &sg, sg.length, right_response);
|
||||
if(rv) {
|
||||
--- drbd/drbd_req.c
|
||||
+++ drbd/drbd_req.c
|
||||
@@ -243,7 +243,7 @@
|
||||
static void _complete_master_bio(drbd_dev *mdev, drbd_request_t *req, int error)
|
||||
{
|
||||
dump_bio(mdev,req->master_bio,1);
|
||||
- bio_endio(req->master_bio, req->master_bio->bi_size, error);
|
||||
+ bio_endio(req->master_bio, error);
|
||||
req->master_bio = NULL;
|
||||
dec_ap_bio(mdev);
|
||||
}
|
||||
@@ -779,7 +779,7 @@
|
||||
/* only pass the error to the upper layers.
|
||||
* if user cannot handle io errors, thats not our business. */
|
||||
ERR("could not kmalloc() req\n");
|
||||
- bio_endio(bio, bio->bi_size, -ENOMEM);
|
||||
+ bio_endio(bio, -ENOMEM);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -975,7 +975,7 @@
|
||||
if (remote) dec_ap_pending(mdev);
|
||||
dump_bio(mdev,req->master_bio,1);
|
||||
/* THINK: do we want to fail it (-EIO), or pretend success? */
|
||||
- bio_endio(req->master_bio, req->master_bio->bi_size, 0);
|
||||
+ bio_endio(req->master_bio, 0);
|
||||
req->master_bio = NULL;
|
||||
dec_ap_bio(mdev);
|
||||
drbd_req_free(req);
|
||||
@@ -1003,7 +1003,7 @@
|
||||
if (FAULT_ACTIVE(mdev, rw==WRITE ? DRBD_FAULT_DT_WR :
|
||||
( rw==READ ? DRBD_FAULT_DT_RD :
|
||||
DRBD_FAULT_DT_RA ) ))
|
||||
- bio_endio(req->private_bio, req->private_bio->bi_size, -EIO);
|
||||
+ bio_endio(req->private_bio, -EIO);
|
||||
else
|
||||
generic_make_request(req->private_bio);
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@
|
||||
|
||||
fail_and_free_req:
|
||||
if (b) kfree(b);
|
||||
- bio_endio(bio, bio->bi_size, err);
|
||||
+ bio_endio(bio, err);
|
||||
drbd_req_free(req);
|
||||
return 0;
|
||||
}
|
||||
@@ -1071,13 +1071,13 @@
|
||||
struct Drbd_Conf* mdev = (drbd_dev*) q->queuedata;
|
||||
|
||||
if (drbd_fail_request_early(mdev, bio_data_dir(bio) & WRITE)) {
|
||||
- bio_endio(bio, bio->bi_size, -EPERM);
|
||||
+ bio_endio(bio, -EPERM);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Currently our BARRIER code is disabled. */
|
||||
if(unlikely(bio_barrier(bio))) {
|
||||
- bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
|
||||
+ bio_endio(bio, -EOPNOTSUPP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1100,7 +1100,7 @@
|
||||
ERR("bio would need to, but cannot, be split: "
|
||||
"(vcnt=%u,idx=%u,size=%u,sector=%llu)\n",
|
||||
bio->bi_vcnt, bio->bi_idx, bio->bi_size, bio->bi_sector);
|
||||
- bio_endio(bio, bio->bi_size, -EINVAL);
|
||||
+ bio_endio(bio, -EINVAL);
|
||||
return 0;
|
||||
} else {
|
||||
/* This bio crosses some boundary, so we have to split it. */
|
||||
--- drbd/drbd_worker.c
|
||||
+++ drbd/drbd_worker.c
|
||||
@@ -62,7 +62,7 @@
|
||||
/* used for synchronous meta data and bitmap IO
|
||||
* submitted by drbd_md_sync_page_io()
|
||||
*/
|
||||
-int drbd_md_io_complete(struct bio *bio, unsigned int bytes_done, int error)
|
||||
+int drbd_md_io_complete(struct bio *bio, int error)
|
||||
{
|
||||
if (bio->bi_size) return 1;
|
||||
/* error parameter ignored:
|
||||
@@ -75,7 +75,7 @@
|
||||
/* reads on behalf of the partner,
|
||||
* "submitted" by the receiver
|
||||
*/
|
||||
-int drbd_endio_read_sec(struct bio *bio, unsigned int bytes_done, int error)
|
||||
+int drbd_endio_read_sec(struct bio *bio, int error)
|
||||
{
|
||||
unsigned long flags=0;
|
||||
struct Tl_epoch_entry *e=NULL;
|
||||
@@ -119,7 +119,7 @@
|
||||
/* writes on behalf of the partner, or resync writes,
|
||||
* "submitted" by the receiver.
|
||||
*/
|
||||
-int drbd_endio_write_sec(struct bio *bio, unsigned int bytes_done, int error)
|
||||
+int drbd_endio_write_sec(struct bio *bio, int error)
|
||||
{
|
||||
unsigned long flags=0;
|
||||
struct Tl_epoch_entry *e=NULL;
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
/* read, readA or write requests on Primary comming from drbd_make_request
|
||||
*/
|
||||
-int drbd_endio_pri(struct bio *bio, unsigned int bytes_done, int error)
|
||||
+int drbd_endio_pri(struct bio *bio, int error)
|
||||
{
|
||||
unsigned long flags;
|
||||
drbd_request_t *req=bio->bi_private;
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 5 15:03:58 CET 2007 - ro@suse.de
|
||||
|
||||
- hack to compile with 2.6.24
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 18 12:07:34 CEST 2007 - ro@suse.de
|
||||
|
||||
|
@ -13,9 +13,10 @@ Name: drbd
|
||||
BuildRequires: bison flex glib-devel kernel-source kernel-syms module-init-tools
|
||||
Summary: Distributed Replicated Block Device
|
||||
Version: 8.0.6
|
||||
Release: 2
|
||||
Release: 24
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Patch0: drbd-optflags.patch
|
||||
Patch1: drbd-2.6.24.patch
|
||||
License: GPL v2 or later
|
||||
Group: Productivity/Clustering/HA
|
||||
Provides: drbdsetup drbd-control
|
||||
@ -55,6 +56,7 @@ Authors:
|
||||
%prep
|
||||
%setup -n drbd-%{version}
|
||||
%patch0 -p1
|
||||
%patch1
|
||||
mkdir source
|
||||
cp -a drbd/. source/. || :
|
||||
cp source/Makefile-2.6 source/Makefile
|
||||
@ -138,6 +140,8 @@ done
|
||||
%doc scripts/drbd.conf
|
||||
|
||||
%changelog
|
||||
* Wed Dec 05 2007 - ro@suse.de
|
||||
- hack to compile with 2.6.24
|
||||
* Tue Sep 18 2007 - ro@suse.de
|
||||
- do really build a module
|
||||
* Mon Sep 17 2007 - lmb@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user