[Bug 1068707] New: bcache broken on s390x
http://bugzilla.suse.com/show_bug.cgi?id=1068707 Bug ID: 1068707 Summary: bcache broken on s390x Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: S/390-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-maintainers@forge.provo.novell.com Reporter: ro@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- trying to repeat on s390x what worked on aarch64 ... OBS_WORKER_DISK=/dev/mapper/3600a098051764b2d515d436d66416b4f wipefs -f -a $OBS_WORKER_DISK modprobe zram num_devices=1 modprobe bcache echo 8G > /sys/block/zram0/disksize wipefs -f -a /dev/zram0 make-bcache --wipe-bcache --block 4k --bucket 2M -B $OBS_WORKER_DISK -C /dev/zram0 # up to here it seemed to work, but: echo /dev/zram0 > /sys/fs/bcache/register -bash: echo: write error: Invalid argument in dmesg: [1256250.924470] zram: Added device: zram0 [1256258.363017] zram0: detected capacity change from 0 to 8589934592 [1256269.146000] bcache: register_bcache() error opening /dev/dm-2: Not a bcache superblock [1256275.462897] bcache: register_bcache() error opening /dev/zram0: Not a bcache superblock so the written superblock is not recognized ... endianess issue ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |colyli@suse.com, | |tiwai@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c1 Coly Li <colyli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kernel-maintainers@forge.pr |colyli@suse.com |ovo.novell.com | --- Comment #1 from Coly Li <colyli@suse.com> --- (In reply to Ruediger Oertel from comment #0)
trying to repeat on s390x what worked on aarch64 ...
OBS_WORKER_DISK=/dev/mapper/3600a098051764b2d515d436d66416b4f wipefs -f -a $OBS_WORKER_DISK modprobe zram num_devices=1 modprobe bcache echo 8G > /sys/block/zram0/disksize wipefs -f -a /dev/zram0 make-bcache --wipe-bcache --block 4k --bucket 2M -B $OBS_WORKER_DISK -C /dev/zram0 # up to here it seemed to work, but: echo /dev/zram0 > /sys/fs/bcache/register -bash: echo: write error: Invalid argument
in dmesg: [1256250.924470] zram: Added device: zram0 [1256258.363017] zram0: detected capacity change from 0 to 8589934592 [1256269.146000] bcache: register_bcache() error opening /dev/dm-2: Not a bcache superblock [1256275.462897] bcache: register_bcache() error opening /dev/zram0: Not a bcache superblock
so the written superblock is not recognized ... endianess issue ?
It is very probably an endianess issue. Good to know people use bcache on non-little-endian machines. Hmm, I need to find a 390x machine to fix and test the code ... Thanks for the report. Coly Li -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c2 --- Comment #2 from Coly Li <colyli@suse.com> --- (In reply to Coly Li from comment #1)
(In reply to Ruediger Oertel from comment #0)
trying to repeat on s390x what worked on aarch64 ...
OBS_WORKER_DISK=/dev/mapper/3600a098051764b2d515d436d66416b4f wipefs -f -a $OBS_WORKER_DISK modprobe zram num_devices=1 modprobe bcache echo 8G > /sys/block/zram0/disksize wipefs -f -a /dev/zram0 make-bcache --wipe-bcache --block 4k --bucket 2M -B $OBS_WORKER_DISK -C /dev/zram0 # up to here it seemed to work, but: echo /dev/zram0 > /sys/fs/bcache/register -bash: echo: write error: Invalid argument
in dmesg: [1256250.924470] zram: Added device: zram0 [1256258.363017] zram0: detected capacity change from 0 to 8589934592 [1256269.146000] bcache: register_bcache() error opening /dev/dm-2: Not a bcache superblock [1256275.462897] bcache: register_bcache() error opening /dev/zram0: Not a bcache superblock
so the written superblock is not recognized ... endianess issue ?
It is very probably an endianess issue. Good to know people use bcache on non-little-endian machines. Hmm, I need to find a 390x machine to fix and test the code ...
Thanks for the report.
The problem is not from kernel, it is from make-bcache tool. The user space tool does not use xx_to_cpu() and cpu_to_xx() family so all super block values are in little endian. I will post a patch for testing. Coly -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c3 Coly Li <colyli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ro@suse.com Flags| |needinfo?(ro@suse.com) --- Comment #3 from Coly Li <colyli@suse.com> --- Hi Ruediger, I upload a fixed bcache-tools code to my kernel.org repo, https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git/ But I spend whole day still do not find a s390x server to test. I submit a ticket but the s390 people is not available for now; I also try to reserve a s390 machin via orthos, also failed to create an account for now. Could you please have a try whether the HEAD code of the above repo works on s390 ? And at mean time I am still applying a s390 vm for testing ... Thanks in advance. Coly Li -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c4 --- Comment #4 from Ruediger Oertel <ro@suse.com> --- building a package in home:oertel:branches:filesystems/bcache-tools -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c5 Ruediger Oertel <ro@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(ro@suse.com) | --- Comment #5 from Ruediger Oertel <ro@suse.com> --- hm, different error message but still does not work: s390p21:~ # echo /dev/zram0 > /sys/fs/bcache/register -bash: echo: write error: Invalid argument [4830275.525506] zram: Added device: zram0 [4830291.485844] zram0: detected capacity change from 0 to 8589934592 [4830321.315018] bcache: register_bcache() error opening /dev/dm-2: Bad checksum [4830328.502621] bcache: register_bcache() error opening /dev/zram0: Bad checksum -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c6 --- Comment #6 from Coly Li <colyli@suse.com> --- (In reply to Ruediger Oertel from comment #5)
hm, different error message but still does not work:
s390p21:~ # echo /dev/zram0 > /sys/fs/bcache/register -bash: echo: write error: Invalid argument
[4830275.525506] zram: Added device: zram0 [4830291.485844] zram0: detected capacity change from 0 to 8589934592 [4830321.315018] bcache: register_bcache() error opening /dev/dm-2: Bad checksum [4830328.502621] bcache: register_bcache() error opening /dev/zram0: Bad checksum
Can I access this machine, compile bcache-tools source and run it on this machine ? So far I still do not have my own s390 machine ready. Thanks. Coly Li -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c7 --- Comment #7 from Coly Li <colyli@suse.com> --- (In reply to Coly Li from comment #6)
(In reply to Ruediger Oertel from comment #5)
hm, different error message but still does not work:
s390p21:~ # echo /dev/zram0 > /sys/fs/bcache/register -bash: echo: write error: Invalid argument
[4830275.525506] zram: Added device: zram0 [4830291.485844] zram0: detected capacity change from 0 to 8589934592 [4830321.315018] bcache: register_bcache() error opening /dev/dm-2: Bad checksum [4830328.502621] bcache: register_bcache() error opening /dev/zram0: Bad checksum
Thanks for the information, I see why the checksum is bad. There is a bug in bcache kernel code, it checks csum before swap all necessary members of bcache super block. I will post a kernel fix, once it gets merged into SLE kernels, let's try it again. Coly Li -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c8 Ihno Krumreich <ihno@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium CC| |ihno@suse.com Flags| |needinfo?(colyli@suse.com) --- Comment #8 from Ihno Krumreich <ihno@suse.com> --- Hi Coly, is the bug still valid? Ihno -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c9 Coly Li <colyli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(colyli@suse.com) | --- Comment #9 from Coly Li <colyli@suse.com> --- (In reply to Ihno Krumreich from comment #8)
Hi Coly,
is the bug still valid?
Hi Ihno, It turns out to be a feature: enabling bcache on big endian machines. This will be a very large change set, and it seems there already is a feature request in Jira (but I don't know which it is). Thanks. Coly Li -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c10 Coly Li <colyli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS --- Comment #10 from Coly Li <colyli@suse.com> --- After fixing quit a lot bcache kernel bugs and user space tools bugs, now I finally can make bcache run on s390 machine with 5.5 kernel. Both kernel and user space tools should be updated. For Tumbleweed, I am working on package bcache-tools update from 1.0.9 to 1.0. Once it gets done, I will update information here. It is a long term effort, finally we make it now. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c11 --- Comment #11 from Coly Li <colyli@suse.com> --- (In reply to Coly Li from comment #10)
After fixing quit a lot bcache kernel bugs and user space tools bugs, now I finally can make bcache run on s390 machine with 5.5 kernel.
Both kernel and user space tools should be updated. For Tumbleweed, I am working on package bcache-tools update from 1.0.9 to 1.0. Once it gets done, I will update information here.
It is a long term effort, finally we make it now.
Now it is in OpenSUSE Base:System bcache-tools-1.1, I will back port them to SLE products. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1068707 http://bugzilla.suse.com/show_bug.cgi?id=1068707#c12 Coly Li <colyli@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED --- Comment #12 from Coly Li <colyli@suse.com> --- (In reply to Coly Li from comment #11)
(In reply to Coly Li from comment #10)
After fixing quit a lot bcache kernel bugs and user space tools bugs, now I finally can make bcache run on s390 machine with 5.5 kernel.
Both kernel and user space tools should be updated. For Tumbleweed, I am working on package bcache-tools update from 1.0.9 to 1.0. Once it gets done, I will update information here.
It is a long term effort, finally we make it now.
Now it is in OpenSUSE Base:System bcache-tools-1.1, I will back port them to SLE products.
Here I close this bug, because bcache-tools-1.1 is in openSUSE Basy:System already. The code is tested under s390x machine. This is done by a regular package update, so the bugzilla ID is not mentioned. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com