[DRBD-cvs] svn commit by phil - r2762 - trunk/drbd - Better error
reporting for alloc_ee()
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Tue Feb 20 15:50:00 CET 2007
Author: phil
Date: 2007-02-20 15:49:58 +0100 (Tue, 20 Feb 2007)
New Revision: 2762
Modified:
trunk/drbd/drbd_receiver.c
Log:
Better error reporting for alloc_ee()
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2007-02-19 14:03:33 UTC (rev 2761)
+++ trunk/drbd/drbd_receiver.c 2007-02-20 14:49:58 UTC (rev 2762)
@@ -245,10 +245,16 @@
int i;
e = mempool_alloc(drbd_ee_mempool, gfp_mask);
- if (!e) return NULL;
+ if (!e) {
+ ERR("alloc_ee: Allocation of an EE failed\n");
+ return NULL;
+ }
bio = bio_alloc(GFP_KERNEL, div_ceil(data_size,PAGE_SIZE));
- if (!bio) goto fail1;
+ if (!bio) {
+ ERR("alloc_ee: Allocation of a bio failed\n");
+ goto fail1;
+ }
bio->bi_bdev = mdev->bc->backing_bdev;
bio->bi_sector = sector;
@@ -256,9 +262,13 @@
ds = data_size;
while(ds) {
page = drbd_pp_alloc(mdev, gfp_mask);
- if (!page) goto fail2;
+ if (!page) {
+ ERR("alloc_ee: Allocation of a page failed\n");
+ goto fail2;
+ }
if (!bio_add_page(bio, page, min_t(int, ds, PAGE_SIZE), 0)) {
drbd_pp_free(mdev,page);
+ ERR("alloc_ee: bio_add_page() failed\n");
goto fail2;
break;
}
More information about the drbd-cvs
mailing list