[DRBD-cvs] svn commit by phil - r2776 - trunk/drbd - * Incleased
the verbosity in case a bio_add_page() fail
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Fri Mar 2 13:11:27 CET 2007
Author: phil
Date: 2007-03-02 13:11:26 +0100 (Fri, 02 Mar 2007)
New Revision: 2776
Modified:
trunk/drbd/drbd_nl.c
trunk/drbd/drbd_receiver.c
Log:
* Incleased the verbosity in case a bio_add_page() fails.
* Added tracing code for the setup of our block-device-queue.
* Fixed the issue that caused DRBD to fail resync on LVM on top
of a MD raid0 (stripe set).
Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c 2007-03-02 12:09:34 UTC (rev 2775)
+++ trunk/drbd/drbd_nl.c 2007-03-02 12:11:26 UTC (rev 2776)
@@ -616,6 +616,17 @@
if (b->merge_bvec_fn && !mdev->bc->dc.use_bmbv)
max_seg_s = PAGE_SIZE;
+ max_seg_s = min(b->max_sectors << 9 , max_seg_s);
+
+ MTRACE(TraceTypeRq,TraceLvlSummary,
+ DUMPI(b->max_sectors);
+ DUMPI(b->max_phys_segments);
+ DUMPI(b->max_hw_segments);
+ DUMPI(b->max_segment_size);
+ DUMPI(b->hardsect_size);
+ DUMPI(b->seg_boundary_mask);
+ );
+
q->max_sectors = max_seg_s >> 9;
q->max_phys_segments = max_seg_s >> PAGE_SHIFT;
q->max_hw_segments = max_seg_s >> PAGE_SHIFT;
@@ -632,6 +643,15 @@
// workaround here:
if(q->max_segment_size == 0) q->max_segment_size = max_seg_s;
+ MTRACE(TraceTypeRq,TraceLvlSummary,
+ DUMPI(q->max_sectors);
+ DUMPI(q->max_phys_segments);
+ DUMPI(q->max_hw_segments);
+ DUMPI(q->max_segment_size);
+ DUMPI(q->hardsect_size);
+ DUMPI(q->seg_boundary_mask);
+ );
+
if(b->merge_bvec_fn) {
WARN("Backing device's merge_bvec_fn() = %p\n",
b->merge_bvec_fn);
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2007-03-02 12:09:34 UTC (rev 2775)
+++ trunk/drbd/drbd_receiver.c 2007-03-02 12:11:26 UTC (rev 2776)
@@ -271,6 +271,21 @@
ERR("alloc_ee: bio_add_page(s=%llu,"
"data_size=%u,ds=%u) failed\n",
(unsigned long long)sector, data_size, ds);
+
+ request_queue_t *q = bdev_get_queue(bio->bi_bdev);
+ if (q->merge_bvec_fn) {
+ ERR("merge_bvec_fn() = %d\n",
+ q->merge_bvec_fn(q, bio,
+ &bio->bi_io_vec[bio->bi_vcnt]));
+ }
+
+ /* dump more of the bio. */
+ DUMPI(bio->bi_max_vecs);
+ DUMPI(bio->bi_vcnt);
+ DUMPI(bio->bi_size);
+ DUMPI(bio->bi_phys_segments);
+ DUMPI(bio->bi_hw_segments);
+
goto fail2;
break;
}
More information about the drbd-cvs
mailing list