From: Christian Borntraeger on
Hi,

with todays git I got a huge amount of warnings for device mapper:
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel(a)redhat.com
device-mapper: table: 252:0: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=196608
device-mapper: table: 252:0: target device dasde1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=196608
device-mapper: table: 252:0: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=196608
device-mapper: table: 252:0: target device dasde1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=196608
device-mapper: table: 252:1: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=5368905728
device-mapper: table: 252:1: target device dasde1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=5368905728
device-mapper: table: 252:1: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=5368905728
device-mapper: table: 252:1: target device dasde1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=5368905728
device-mapper: table: 252:2: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=6979518464
device-mapper: table: 252:2: target device dasde1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=6979518464
device-mapper: table: 252:2: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=6979518464
device-mapper: table: 252:2: target device dasde1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=6979518464
device-mapper: table: 252:3: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=7189233664
[...]

But the system seems to work fine.
The same devices produce no warning with a 2.6.32 vanilla kernel.

[root(a)t63lp34 ~]# pvdisplay
--- Physical volume ---
PV Name /dev/dasdf1
VG Name space
PV Size 22.49 GB / not usable 2.28 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 5758
Free PE 3
Allocated PE 5755
PV UUID Uocvlz-I6wv-JtLH-8W5L-ziib-pP7h-4Qdzgz

--- Physical volume ---
PV Name /dev/dasde1
VG Name space
PV Size 22.49 GB / not usable 2.28 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 5758
Free PE 15
Allocated PE 5743
PV UUID UuM16H-GUdC-gfA3-3yvE-c5Af-UVPW-Cfe2no

--- Physical volume ---
PV Name /dev/dasdd1
VG Name space
PV Size 4.59 GB / not usable 3.38 MB
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 1173
Free PE 0
Allocated PE 1173
PV UUID 800CzR-0hjD-lL6Z-yQPt-vRcl-WlYp-cUtZwJ

--- Physical volume ---
PV Name /dev/dasdc1
VG Name space
PV Size 4.59 GB / not usable 3.38 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 1173
Free PE 12
Allocated PE 1161
PV UUID hG8bJE-xYJL-eo0N-tsD5-kdcH-AONB-FGdtAK

[root(a)t63lp34 ~]# vgdisplay
--- Volume group ---
VG Name space
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 96
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 65
Open LV 4
Max PV 0
Cur PV 4
Act PV 4
VG Size 54.15 GB
PE Size 4.00 MB
Total PE 13862
Alloc PE / Size 13832 / 54.03 GB
Free PE / Size 30 / 120.00 MB
VG UUID AcRPg8-6DaJ-ND6i-s3H7-Sh5V-8KWa-KtKRmv

From: Christian Borntraeger on
Am Mittwoch 09 Dezember 2009 23:07:49 schrieb Jens Axboe:
> > > > device-mapper: table: 252:0: target device dasdf1 is misaligned: physical_block_size=4096, logical_block_size=4096, alignment_offset=0, start=196608
[...]
> Does this work?
[...]
> +#if 0
> if (offset &&
> (offset & (b->discard_granularity - 1)) != b->discard_alignment) {
> t->discard_misaligned = 1;
> ret = -1;
> }
> +#endif

Yes it does.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Christian Borntraeger on
Am Donnerstag 10 Dezember 2009 02:14:03 schrieb Martin K. Petersen:
> The warning is caused by an error in stacking discard granularity. I
> have a fix but I'd like to run verify all my oddball alignment combos
> before submitting.

Martin,

any news on the final fix? Do you want Heinz and me to verify your fix
on our systems?

Christian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Martin K. Petersen on
>>>>> "Christian" == Christian Borntraeger <borntraeger(a)de.ibm.com> writes:

Christian> any news on the final fix? Do you want Heinz and me to verify
Christian> your fix on our systems?

Looking into this issue unearthed an unrelated problem with the topology
stacking algorithm that turns out to be much trickier to fix. That's
what's taking time.

Since the first bug is simply causing a warning I'm inclined to get
everything fixed up before having Jens queue a fix. Shouldn't be more
than a day or two before I have all this worked out.

--
Martin K. Petersen Oracle Linux Engineering

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Martin K. Petersen on
>>>>> "Jens" == Jens Axboe <jens.axboe(a)oracle.com> writes:

Jens> I'll revert the bad commit tomorrow so that -rc1 wont be affected,
Jens> at least.

I'm pretty close to having a new stacking algorithm that works. If I
don't have it ready by tomorrow maybe we should commit the following
patch instead of reverting the discard changes wholesale?

diff --git a/block/blk-settings.c b/block/blk-settings.c
index dd1f1e0..65ae861 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -555,10 +555,8 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
}

if (offset &&
- (offset & (b->discard_granularity - 1)) != b->discard_alignment) {
+ (offset & (b->discard_granularity - 1)) != b->discard_alignment)
t->discard_misaligned = 1;
- ret = -1;
- }

/* If top has no alignment offset, inherit from bottom */
if (!t->alignment_offset)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/