linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DRBD: ASSERT in drbd_actlog.c:259
@ 2016-11-11 17:45 Wolfgang Walter
  2016-11-14 10:11 ` [Drbd-dev] " Lars Ellenberg
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Walter @ 2016-11-11 17:45 UTC (permalink / raw)
  To: drbd-dev; +Cc: linux-kernel

Hello,

when I execute

mkfs.ext4 -J device=UUID=625d871f-c278-4acb-916d-774dc78dbd8a -v -b 4096 -E stride=$((512/4)),stripe_width=$((512/4*3)),lazy_itable_init=0 -O inline_data,mmp -L dyn -m .01 /dev/test/big

the command hangs and the kernel (4.4.30) complains:

block drbd1: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259
block drbd2: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259
block drbd1: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259
block drbd3: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259
block drbd2: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259
block drbd3: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259

This does _not_ happen if I use

mkfs.ext4 -J device=UUID=625d871f-c278-4acb-916d-774dc78dbd8a -v -b 4096 -E stride=$((512/4)),stripe_width=$((512/4*3)),lazy_itable_init=0, nodiscard -O inline_data,mmp -L dyn -m .01 /dev/export/dyn

drbd1, drbd2 and drbd3 are three volumes of one resource. These three drbd devices are physical volumes of a volume group test with an LV big. test/big uses drbd1 ... drbd3 as backing devices (striped; stripesize ist 512k.


Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Drbd-dev] DRBD: ASSERT in drbd_actlog.c:259
  2016-11-11 17:45 DRBD: ASSERT in drbd_actlog.c:259 Wolfgang Walter
@ 2016-11-14 10:11 ` Lars Ellenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ellenberg @ 2016-11-14 10:11 UTC (permalink / raw)
  To: Wolfgang Walter; +Cc: drbd-dev, linux-kernel

On Fri, Nov 11, 2016 at 06:45:18PM +0100, Wolfgang Walter wrote:
> Hello,
> 
> when I execute
> 
> mkfs.ext4 -J device=UUID=625d871f-c278-4acb-916d-774dc78dbd8a -v -b 4096 -E stride=$((512/4)),stripe_width=$((512/4*3)),lazy_itable_init=0 -O inline_data,mmp -L dyn -m .01 /dev/test/big
> 
> the command hangs

It should not hang, really, but it is probably too busy spewing below
message to the console over and over again.

There have been some problems with our trim/discard handling in some situations.
That's also why this does not happen if you say nodiscard.

> and the kernel (4.4.30) complains:
>
> block drbd1: ASSERT( (unsigned)(last - first) <= 1 ) in drivers/block/drbd/drbd_actlog.c:259

see:
commit 505675f96cf0f169647a18c3dda1f373eca957b1
Author: Lars Ellenberg <lars.ellenberg@linbit.com>
Date:   Tue Jun 14 00:26:23 2016 +0200

    drbd: allow larger max_discard_sectors
    
    Make sure we have at least 67 (> AL_UPDATES_PER_TRANSACTION)
    al-extents available, and allow up to half of that to be
    discarded in one bio.
    
    Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>

diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index d524973..265b2b6 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -258,7 +258,7 @@ bool drbd_al_begin_io_fastpath(struct drbd_device *device, struct drbd_interval
 	unsigned first = i->sector >> (AL_EXTENT_SHIFT-9);
 	unsigned last = i->size == 0 ? first : (i->sector + (i->size >> 9) - 1) >> (AL_EXTENT_SHIFT-9);
 
-	D_ASSERT(device, (unsigned)(last - first) <= 1);
+	D_ASSERT(device, first <= last);
 	D_ASSERT(device, atomic_read(&device->local_cnt) > 0);
 
 	/* FIXME figure out a fast path for bios crossing AL extent boundaries */

...
and some more chunks, but you should not cherry-pick stuff "just so",
if it may change semantics ...

kernel v4.4 is roughly equivalent to out-of-tree drbd 8.4.5,
we are at 8.4.9 meanwhile, so you may want to try that as well.

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-14 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-11 17:45 DRBD: ASSERT in drbd_actlog.c:259 Wolfgang Walter
2016-11-14 10:11 ` [Drbd-dev] " Lars Ellenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).