2.6.9-mm1: LVM stopped working
Well, I gave a try to last -mm tree. The bot seemed good till it got to LVM stuff. Vgchange does not find any volume groups. I can't say much because lvm is pretty "early stuff" on this box; so it is pretty unusable. All I know for now, as I changed a little my boot scripts to be more verbose, is that vgchange -avvv y returns this kind of message:
hdXN: cannot read LABEL
and this message for all parts it can test....
As I need this box up and running, I came back to 2.6.9-rc3-mm3 (it works pretty well). I will be able to run more tests on it, tomorrow but for now that's all I can provide.
Oh and dmesg didn't have any oops or BUG in it, and seemed quite usual, in IDE detection and settings messages and device-mapper messages.
However, I use dm-crypt to encrypt my / (no initrd, just initramfs) and it works under 2.6.9-mm1, so the bug is likely to be in IDE stuff.
Sorry, for not being able to provide more infos. I will see if I can try on another LVM'ed box but not for critical stuff.
Mathieu
Signature · 4 lines
Lots of luck ... please pass your crack pipe arounds so the rest of us idiots can see your vision or lack of ... - Andre Hedrick on linux-kernel
Am Sonntag, den 24.10.2004, 01:06 +0200 schrieb Mathieu Segaud:
Quoted 11 lines
Well, I gave a try to last -mm tree. The bot seemed good till it got to LVM stuff. Vgchange does not find any volume groups. I can't say much because lvm is pretty "early stuff" on this box; so it is pretty unusable. All I know for now, as I changed a little my boot scripts to be more verbose, is that vgchange -avvv y returns this kind of message:
hdXN: cannot read LABEL
and this message for all parts it can test....
As I need this box up and running, I came back to 2.6.9-rc3-mm3 (it works pretty well). I will be able to run more tests on it, tomorrow but for now that's all I can provide.
Quoted 5 lines
Oh and dmesg didn't have any oops or BUG in it, and seemed quite usual, in IDE detection and settings messages and device-mapper messages.
However, I use dm-crypt to encrypt my / (no initrd, just initramfs) and it works under 2.6.9-mm1, so the bug is likely to be in IDE stuff.
Are you encrypting your PV or your LVs?
There's some new dm-crypt code in -mm1 along with some API changes, but backward compatibility is provided and should work.
Christophe Saout <[email protected]> disait dernièrement que :
Quoted 1 line
Are you encrypting your PV or your LVs?
non they are not encrypted, I thought about the new iv but my aes-encrypted / still boot :)
I wonder if it comes from some ide changes, as the messages from vgscan and vgchange indicate that LABEL areas are detected, but cannot be read....
quite weird as anything else works quite well...
Quoted 3 lines
There's some new dm-crypt code in -mm1 along with some API changes, but backward compatibility is provided and should work.
Best regards,
Mathieu
Signature · 2 lines
printk("----------- [cut here ] --------- [please bite here ] ---------\n");
linux-2.6.6/arch/x86_64/kernel/traps.Christophe Saout <[email protected]> disait dernièrement que :
Quoted 4 lines
Are you encrypting your PV or your LVs?
There's some new dm-crypt code in -mm1 along with some API changes, but backward compatibility is provided and should work.
I tried 2.6.9-mm1, reverting all the new dm-crypt stuff, and it didn't make it. So it is not related to these patches.
Will look further into it later; for now I must go working on my PhD :)
Best regards,
Signature · 4 lines
<riel> google rules <google> rules: http://www.law.cornell.edu/rules/fre/overview.html - Rik van Riel chatting with the bots on #kernelnewbies
Quoted 5 lines · Christophe Saout
Am Sonntag, den 24.10.2004, 01:06 +0200 schrieb Mathieu Segaud:
Quoted 3 lines
Well, I gave a try to last -mm tree. The bot seemed good till it got to LVM stuff. Vgchange does not find any volume groups. I can't say much because lvm is pretty "early stuff" on this box; so it is pretty unusable.
LVM doesn't work with 2.6.9-mm1 here either, complaining that it
can't find all the pv's. I'm not using any sort of encryption. Here, pvdisplay reports:
--- Physical volume ---
PV Name /dev/hda2 VG Name home PV Size 24.52 GB / not usable 0 Allocatable yes (but full) PE Size (KByte) 4096 Total PE 6277 Free PE 0 Allocated PE 6277 PV UUID M8tcls-7Tp7-sAYe-ypH3-if50-00JH-hvvXSL
--- Physical volume ---
PV Name unknown device VG Name home PV Size 70.47 GB / not usable 0 Allocatable yes (but full) PE Size (KByte) 4096 Total PE 18040 Free PE 0 Allocated PE 18040 PV UUID SmreB9-Q3dp-DBBc-q0N9-v762-o6UB-1VUgYw
--- Physical volume ---
PV Name unknown device VG Name home PV Size 25.12 GB / not usable 0 Allocatable yes (but full) PE Size (KByte) 4096 Total PE 6431 Free PE 0 Allocated PE 6431 PV UUID sbbFSh-0MP8-jtir-Jcyx-VtcE-TxNh-tfNwNe
I can open the device nodes for the 'missing' pv's in a hexeditor and see the
uuid magic; if I reboot into 2.6.9-rc4-mm1 they are found without a problem, and everything works.
Whether or not I'll have time to try to narrow down the change
that causes this depends on things that are out of my control ATM. :-/
Signature · 2 lines
Joseph Fannin [email protected]
Quoted 10 lines · On Tue, 26 Oct 2004 [email protected] wrote:
Quoted 5 lines · Christophe Saout
Am Sonntag, den 24.10.2004, 01:06 +0200 schrieb Mathieu Segaud:
Quoted 3 lines
Well, I gave a try to last -mm tree. The bot seemed good till it got to LVM stuff. Vgchange does not find any volume groups. I can't say much because lvm is pretty "early stuff" on this box; so it is pretty unusable.
LVM doesn't work with 2.6.9-mm1 here either, complaining that it
can't find all the pv's. I'm not using any sort of encryption. Here, pvdisplay reports:
It doesn't work on 2.6.10-rc1 either. Works fine on 2.6.9 and 2.4.8-rc1.
device-mapper ioctl cmd 0 failed: Inappropriate ioctl for device
striped: Required device-mapper target(s) not detected in your kernel
lvcreate: Create a logical volume
Jeff.
Quoted 2 lines · Jeff Chua
It doesn't work on 2.6.10-rc1 either. Works fine on 2.6.9 and 2.4.8-rc1.
device-mapper ioctl cmd 0 failed: Inappropriate ioctl for device
Do you get any corresponding kernel messages?
Check /dev/mapper/control corresponds to /proc/devices & /proc/misc. (See device-mapper scripts/devmap_mknod.sh)
Use 'dmsetup version' and 'dmsetup targets' to test.
Alasdair
Signature · 1 line
[email protected]
Quoted 7 lines · On Tue, Oct 26, 2004 at 08:36:51AM -0400, [email protected] wrote:
LVM doesn't work with 2.6.9-mm1 here either, complaining that it can't find all the pv's. I'm not using any sort of encryption. Here, pvdisplay reports:
I can open the device nodes for the 'missing' pv's in a hexeditor and see the uuid magic; if I reboot into 2.6.9-rc4-mm1 they are found without a problem, and everything works.
Firstly enable lvm debugging. lvm.conf: log { file="/tmp/lvm2.log" level=7 } Compare the lvm log files for the kernels to see where it's going wrong. Then take complete straces (incl. read/write data) of the lvm process with each kernel and again compare them. [Or put files on web and send URLs.]
[To check for repeat of old problems with related symptoms:]
Were both kernels compiled with the same compiler version? Which version? Does it make any difference if you rebuild lvm with --disable-o_direct?
Alasdair
Signature · 1 line
[email protected]
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 5 lines · Alasdair G Kergon
Quoted 3 lines · On Tue, Oct 26, 2004 at 08:36:51AM -0400, [email protected] wrote:
LVM doesn't work with 2.6.9-mm1 here either, complaining that it can't find all the pv's. I'm not using any sort of encryption. Here, pvdisplay reports:
Quoted 7 lines
Quoted 3 lines
I can open the device nodes for the 'missing' pv's in a hexeditor and see the uuid magic; if I reboot into 2.6.9-rc4-mm1 they are found without a problem, and everything works.
[To check for repeat of old problems with related symptoms:]
Were both kernels compiled with the same compiler version? Which version? Does it make any difference if you rebuild lvm with --disable-o_direct?
Chris Han (BCC'ed) mailed me to let me know he'd narrowed the
problem down to the 'dio-handle-eof.patch'. Reverting it makes things work for me too. Yay!
Quoted 4 lines
Firstly enable lvm debugging. lvm.conf: log { file="/tmp/lvm2.log" level=7 } Compare the lvm log files for the kernels to see where it's going wrong. Then take complete straces (incl. read/write data) of the lvm process with each kernel and again compare them. [Or put files on web and send URLs.]
vgchange -a y logs that it 'Failed to read label area' for the 'missing' pv's.
I've put up some possibly useful traces, but I think I've picked out the relevant bits just below:
http://home.columbus.rr.com/jfannin1/vgchange-trace-good.txt
http://home.columbus.rr.com/jfannin1/vgchange-trace-bad.txt
Some (but not all) partitions opened are reading alternately (the -1024 is constant):
read(4, 0xbfffe600, 2048) = ? ERESTARTSYS (To be restarted)read(4, "\300;9\230", 2048) = -1024
If there's anything else that wants investigating, I'm still
willing as my free time allows. Thanks!
Signature · 2 lines
Joseph Fannin [email protected]
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 8 lines · [email protected] wrote:
Quoted 4 lines
[To check for repeat of old problems with related symptoms:]
Were both kernels compiled with the same compiler version? Which version? Does it make any difference if you rebuild lvm with --disable-o_direct?Chris Han (BCC'ed) mailed me to let me know he'd narrowed the
problem down to the 'dio-handle-eof.patch'. Reverting it makes things work for me too. Yay!
If you have time, please restore dio-handle-eof.patch and then apply the below fixup, then retest. Thanks.
fs/direct-io.c renamed from fs/direct-io.c~dio-handle-eof-fix +2 -0
@@ -987,6 +987,8 @@ direct_io_worker(int rw, struct kiocb *i isize =i_size_read (inode);if (bytes_todo > (isize - offset)) bytes_todo = isize - offset; +if (!bytes_todo) +return 0 ;for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;
_
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Andrew Morton <[email protected]> disait dernièrement que :
Quoted 2 lines
If you have time, please restore dio-handle-eof.patch and then apply the below fixup, then retest. Thanks.
I had time to test this fix; it did not solve the problem. Whereas reverting the complete dio-handle-eof.patch solved it.
Best regards,
Mathieu
Signature · 5 lines
"We ought to make the pie higher." George W. Bush February 15, 2000 Comment made in Columbia, South Carolina during presidential campaign.
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 8 lines · Mathieu Segaud
Andrew Morton <[email protected]> disait dernièrement que :
Quoted 2 lines
If you have time, please restore dio-handle-eof.patch and then apply the below fixup, then retest. Thanks.
I had time to test this fix; it did not solve the problem. Whereas reverting the complete dio-handle-eof.patch solved it.
bummer. Can you send a super-simple means by which I can demonstrate the problem?
Thanks.
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 4 lines · Andrew Morton
Quoted 3 lines · Mathieu Segaud
Andrew Morton <[email protected]> disait dernièrement que :
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
If you have time, please restore dio-handle-eof.patch and then apply the below fixup, then retest. Thanks.
I had time to test this fix; it did not solve the problem. Whereas reverting the complete dio-handle-eof.patch solved it.
bummer. Can you send a super-simple means by which I can demonstrate the problem?
Hmm, maybe round the value up to a PAGE_SIZE in length?
Signature · 1 line
Jens Axboe
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 8 lines · Jens Axboe
Quoted 7 lines · Andrew Morton
Quoted 6 lines · Mathieu Segaud
Andrew Morton <[email protected]> disait dernièrement que :
Quoted 2 lines
If you have time, please restore dio-handle-eof.patch and then apply the below fixup, then retest. Thanks.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
I had time to test this fix; it did not solve the problem. Whereas reverting the complete dio-handle-eof.patch solved it.
bummer. Can you send a super-simple means by which I can demonstrate the problem?
Hmm, maybe round the value up to a
PAGE_SIZEin length?
This feels pretty icky, but should suffice for testing. Does it make a difference?
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +2 -2
@@ -987,8 +987,8 @@ isize =i_size_read (inode);if (bytes_todo > (isize - offset)) bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo <PAGE_SIZE ) + bytes_todo =PAGE_SIZE ;for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;
Signature · 1 line
Jens Axboe
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Jens Axboe
Quoted 9 lines · Andrew Morton
Quoted 7 lines · Mathieu Segaud
Andrew Morton <[email protected]> disait derni?rement que :
Quoted 2 lines
If you have time, please restore dio-handle-eof.patch and then apply the below fixup, then retest. Thanks.
I had time to test this fix; it did not solve the problem. Whereas reverting the complete dio-handle-eof.patch solved it.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
bummer. Can you send a super-simple means by which I can demonstrate the problem?
Hmm, maybe round the value up to a
PAGE_SIZEin length?This feels pretty icky, but should suffice for testing. Does it make a difference?
I made this change to 2.6.9-mm1 and it didn't. vgchange still
seems to be trying to read 2048 bytes, rather than 4096 (I may not know what I'm talking about, or even what I'm looking at, though).
Signature · 5 lines
Joseph Fannin [email protected] "Bull in pure form is rare; there is usually some contamination by data." -- William Graves Perry Jr.
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 3 lines · Joseph Fannin
I made this change to 2.6.9-mm1 and it didn't. vgchange still
seems to be trying to read 2048 bytes, rather than 4096 (I may not know what I'm talking about, or even what I'm looking at, though).
LVM2 uses the (soft) device block size for both alignment and size. If no blocksize is defined, it uses pagesize.
Even when it only needs to change a few consecutive bytes, it still has to read a complete aligned block, make the change, then write it back.
Alasdair
Signature · 1 line
[email protected]
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Jens AxboeJens Axboe <[email protected]> disait dernièrement que :
Quoted 6 lines
This feels pretty icky, but should suffice for testing. Does it make a difference?
fs/direct-io.c line 994
Quoted 10 lines
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +2
-2@@ -987,8 +987,8 @@ isize =i_size_read (inode);if (bytes_todo > (isize - offset)) bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo <PAGE_SIZE ) + bytes_todo =PAGE_SIZE ;for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;
As 2.6.10-rc1-mm1 failed (as expected), I tried tour fix applied upon 2.6.10-rc1-mm1. This did not make any difference.
The only workaround for now is backing out dio-handle-eof-fix.patch and dio-handle-eof.patch
I am willing to test anything you could send :)
Best regards,
Mathieu
Signature · 2 lines
panic("esp_handle: current_SC == penguin within interrupt!");
linux-2.2.16/drivers/scsi/esp.cRe: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 18 lines · Mathieu Segaud
Jens Axboe <[email protected]> disait dernièrement que :
Quoted 14 lines
This feels pretty icky, but should suffice for testing. Does it make a difference?
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +2
-2@@ -987,8 +987,8 @@ isize =i_size_read (inode);if (bytes_todo > (isize - offset)) bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo <PAGE_SIZE ) + bytes_todo =PAGE_SIZE ;
Quoted 7 lines
fs/direct-io.c line 994
Quoted 2 lines
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +0
-0for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;As 2.6.10-rc1-mm1 failed (as expected), I tried tour fix applied upon 2.6.10-rc1-mm1. This did not make any difference.
The only workaround for now is backing out dio-handle-eof-fix.patch and dio-handle-eof.patch
Could someone pleeeeze send out a simple recipe for repeating this problem?
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Andrew Morton <[email protected]> disait dernièrement que :
Quoted 1 line
Could someone pleeeeze send out a simple recipe for repeating this problem?
Well, as soon as the boot scripts "initializes" an LVM2 volume group;
just create one with vgcreate(8) from the lvm2 tools (I guess it'd fail under faulty kernels like the latest -mm's).
Then boot 2.6.9-mm1 or 2.6.10-rc1-mm1, either the distro specific init scripts will yield an error (No volume groups found), or just issue 'vgchange -a y', to activate all available volume groups, and it will fail with the above error.
In my case, no kernel messages in dmesg related to these errors.
Signature · 2 lines
printk("----------- [cut here ] --------- [please bite here ] ---------\n");
linux-2.6.6/arch/x86_64/kernel/traps.Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Andrew MortonQuoted 1 line · Andrew Morton
Could someone pleeeeze send out a simple recipe for repeating this problem?
I'm using 2.6.10-rc1 and got the following error ...
# vgscan Reading all physical volumes. This may take a while... Found volume group "vg01" using metadata type lvm2
# vgchange -a y 0 logical volume(s) in volume group "vg01" now active
# lvcreate -L 100M -n lv01 vg01 device-mapper ioctl cmd 0 failed: Inappropriate ioctl for device striped: Required device-mapper target(s) not detected in your kernel lvcreate: Create a logical volume
Can't create logical volume (lvcreate) using 2.6.10-rc1.
No problem with 2.6.9 and 2.4.28-rc1.
Lvm tools is LVM2.2.00.25.
Here's my partial .config (same as 2.6.9 which is working with lvm).
#
# Multi-device support (RAID and LVM)
#CONFIG_MD=yCONFIG_BLK_DEV_MD=m
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID5 is not set
# CONFIG_MD_RAID6 is not set
# CONFIG_MD_MULTIPATH is not setCONFIG_BLK_DEV_DM=y
# CONFIG_DM_CRYPT is not set
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_ZERO is not set
Thanks,
Jeff.
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 5 lines · Jeff Chua
I'm using 2.6.10-rc1 and got the following error ...
# lvcreate -L 100M -n lv01 vg01 device-mapper ioctl cmd 0 failed: Inappropriate ioctl for device striped: Required device-mapper target(s) not detected in your kernel lvcreate: Create a logical volume
But that's *not* the dio problem we're discussing in this thread. It's saying userspace communication with device-mapper isn't working, most likely because there's something wrong with the way your system creates /dev/mapper/control when booting or the ioctl compatibility code (what architecture?).
Alasdair
Signature · 5 lines
[email protected] Subject: Re: 2.6.9-mm1: LVM stopped working Reply-To: In-Reply-To: <[email protected]>
Quoted 12 lines · Alasdair G Kergon
Quoted 2 lines · Jeff Chua
It doesn't work on 2.6.10-rc1 either. Works fine on 2.6.9 and 2.4.8-rc1.
device-mapper ioctl cmd 0 failed: Inappropriate ioctl for deviceDo you get any corresponding kernel messages?
Check/dev/mapper/controlcorresponds to/proc/devices&/proc/misc. (See device-mapperscripts/devmap_mknod.sh)
Use 'dmsetup version' and 'dmsetup targets' to test.Alasdair
--
[email protected]
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 7 lines · Alasdair G Kergon
Quoted 5 lines · Jeff Chua
I'm using 2.6.10-rc1 and got the following error ...
# lvcreate -L 100M -n lv01 vg01 device-mapper ioctl cmd 0 failed: Inappropriate ioctl for device striped: Required device-mapper target(s) not detected in your kernel lvcreate: Create a logical volume
Quoted 5 lines
But that's *not* the dio problem we're discussing in this thread. It's saying userspace communication with device-mapper isn't working, most likely because there's something wrong with the way your system creates
/dev/mapper/controlwhen booting or the ioctl compatibility code (what architecture?).
doesn't make any sense to me. Why would 2.6.9 works then? Architecture is Intel running on IBM X31 notebook.
Never had LVM problem until 2.6.10-rc1. It just went dead.
Jeff.
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 2 lines · In article <[email protected]> you wrote:
doesn't make any sense to me. Why would 2.6.9 works then? Architecture is Intel running on IBM X31 notebook.
Perhaps you different devfs settings? I had a similiar problem.
Greetings
Bernd
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Mathieu SegaudQuoted 5 lines · Mathieu Segaud
As 2.6.10-rc1-mm1 failed (as expected), I tried tour fix applied upon 2.6.10-rc1-mm1. This did not make any difference.
The only workaround for now is backing out dio-handle-eof-fix.patch and dio-handle-eof.patch
I am willing to test anything you could send :)
For what it's worth, I hit the exact same problem with 2.6.10-rc1-mm1 (failure to get the LVM together at boot, causing a wedge because my / filesystem is on an LVM), and backing out those two patches has me up and running.
# fdisk -l /dev/hda
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 1 29 232911 84 OS/2 hidden C: drive /dev/hda2 30 4864 38837137+ 5 Extended /dev/hda5 * 30 32 24066 83 Linux /dev/hda6 33 2327 18434556 8e Linux LVM /dev/hda7 2328 2458 1052226 82 Linux swap /dev/hda8 2459 4864 19326163+ 8e Linux LVM
(Basically, a 24M /boot, a swap, and *two* LVM partitions - I wonder if that has anything to do with it - it found one and didn't find the other, and gave up with much complaining). That OS/2 partition is a remnant of what the docs 2 years ago said was needed for suspend-to-disk...
Am also able to test patches if needed...
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Mathieu SegaudQuoted 17 lines · Mathieu Segaud
Jens Axboe <[email protected]> disait dernièrement que :
Quoted 14 lines
This feels pretty icky, but should suffice for testing. Does it make a difference?
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +2
-2@@ -987,8 +987,8 @@ isize =i_size_read (inode);if (bytes_todo > (isize - offset)) bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo <PAGE_SIZE ) + bytes_todo =PAGE_SIZE ;
Quoted 8 lines
fs/direct-io.c line 994
Quoted 2 lines
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +0
-0for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;As 2.6.10-rc1-mm1 failed (as expected), I tried tour fix applied upon 2.6.10-rc1-mm1. This did not make any difference.
The only workaround for now is backing out dio-handle-eof-fix.patch and dio-handle-eof.patch
I am willing to test anything you could send :)
Does this work, on top of 2.6.0-rc1-mm1?
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +8 -7
@@ -985,10 +985,12 @@ } isize =i_size_read (inode); -if (bytes_todo > (isize - offset)) - bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo > (isize - offset)) { +if ((isize - offset)) + bytes_todo = isize - offset; +if (bytes_todo >PAGE_SIZE ) + bytes_todo =PAGE_SIZE ; + }for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;
@@ -1008,10 +1010,9 @@ dio->curr_page =0 ; dio->total_pages =0 ; -if (user_addr & (PAGE_SIZE -1 )) { +if (user_addr & (PAGE_SIZE -1 )) dio->total_pages++; - bytes -=PAGE_SIZE - (user_addr & (PAGE_SIZE -1 )); - } + dio->total_pages += (bytes +PAGE_SIZE -1 ) /PAGE_SIZE ; dio->curr_user_address = user_addr;
Signature · 1 line
Jens Axboe
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 35 lines · Jens Axboe
Quoted 17 lines · Mathieu Segaud
Jens Axboe <[email protected]> disait dernièrement que :
Quoted 14 lines
This feels pretty icky, but should suffice for testing. Does it make a difference?
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +2
-2@@ -987,8 +987,8 @@ isize =i_size_read (inode);if (bytes_todo > (isize - offset)) bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo <PAGE_SIZE ) + bytes_todo =PAGE_SIZE ;Quoted 8 lines
fs/direct-io.c line 994
Quoted 2 lines
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +0
-0for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;As 2.6.10-rc1-mm1 failed (as expected), I tried tour fix applied upon 2.6.10-rc1-mm1. This did not make any difference.
The only workaround for now is backing out dio-handle-eof-fix.patch and dio-handle-eof.patch
I am willing to test anything you could send :)Does this work, on top of 2.6.0-rc1-mm1?
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +0
-0@@ -985,10 +985,12 @@ } isize =i_size_read (inode);
fs/direct-io.c line 993
Quoted 10 lines
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +6
-4-if (bytes_todo > (isize - offset)) - bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo > (isize - offset)) { +if ((isize - offset)) + bytes_todo = isize - offset; +if (bytes_todo >PAGE_SIZE ) + bytes_todo =PAGE_SIZE ; + }
Ehm, that should be
if ((isize - offset)) bytes_todo = isize - offset; else if (bytes_todo > PAGE_SIZE) bytes_todo = PAGE_SIZE;
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +8 -7
@@ -985,10 +985,12 @@ } isize =i_size_read (inode); -if (bytes_todo > (isize - offset)) - bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo > (isize - offset)) { +if ((isize - offset)) + bytes_todo = isize - offset; +else if (bytes_todo >PAGE_SIZE ) + bytes_todo =PAGE_SIZE ; + }for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;
@@ -1008,10 +1010,9 @@ dio->curr_page =0 ; dio->total_pages =0 ; -if (user_addr & (PAGE_SIZE -1 )) { +if (user_addr & (PAGE_SIZE -1 )) dio->total_pages++; - bytes -=PAGE_SIZE - (user_addr & (PAGE_SIZE -1 )); - } + dio->total_pages += (bytes +PAGE_SIZE -1 ) /PAGE_SIZE ; dio->curr_user_address = user_addr;
Signature · 1 line
Jens Axboe
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Jens Axboe <[email protected]> disait dernièrement que :
Quoted 6 lines
Ehm, that should be
if ((isize - offset)) bytes_todo = isize - offset; else if (bytes_todo > PAGE_SIZE) bytes_todo = PAGE_SIZE;
Give 2 or 3 hours (time to get from office to home, rhooo trafic in Paris) and I'll get you an answer (I will adapt this patch to 2.6.10-rc1-mm2 if need be)
Best,
Signature · 3 lines
There is a word for that and that word is "crap". - Alexander Viro on linux-kernel
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Jens AxboeJens Axboe <[email protected]> disait dernièrement que :
Quoted 7 lines
Ehm, that should be
if ((isize - offset)) bytes_todo = isize - offset; else if (bytes_todo > PAGE_SIZE) bytes_todo = PAGE_SIZE;
this one works :)
(of course on top 2.6.10-rc1-mm2, too)
Thanks,
Signature · 4 lines
<JALH> regex are more than some crappy posix thing <JALH> they are an art form - Marc Zealey on #kernelnewbies
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Jens AxboeQuoted 6 lines · Jens Axboe
Ehm, that should be
if ((isize - offset)) bytes_todo = isize - offset; else if (bytes_todo > PAGE_SIZE) bytes_todo = PAGE_SIZE;
(Sorry for delay in testing this one...)
This version fixes my LVM issues on 2.6.10-rc1-mm2 as well...
Quoted 2 lines
---
/opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c2004-10-27 08:29:51.000
000000 +0200
Quoted 1 line
+++
linux-2.6.10-rc1-mm1/fs/direct-io.c2004-11-02 15:55:27.918459070 +
0100
Quoted 40 lines
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +8
-7@@ -985,10 +985,12 @@ } isize =i_size_read (inode); -if (bytes_todo > (isize - offset)) - bytes_todo = isize - offset; -if (!bytes_todo) -return 0 ; +if (bytes_todo > (isize - offset)) { +if ((isize - offset)) + bytes_todo = isize - offset; +else if (bytes_todo >PAGE_SIZE ) + bytes_todo =PAGE_SIZE ; + }for (seg =0 ; seg < nr_segs && bytes_todo; seg++) { user_addr = (unsigned long )iov[seg].iov_base;@@ -1008,10 +1010,9 @@ dio->curr_page =0 ; dio->total_pages =0 ; -if (user_addr & (PAGE_SIZE -1 )) { +if (user_addr & (PAGE_SIZE -1 )) dio->total_pages++; - bytes -=PAGE_SIZE - (user_addr & (PAGE_SIZE -1 )); - } + dio->total_pages += (bytes +PAGE_SIZE -1 ) /PAGE_SIZE ; dio->curr_user_address = user_addr;Signature · 8 lines
-- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
In reply to Jens Axboefs/direct-io.c line 987
Quoted 4 lines · Jens Axboe
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +0
-0@@ -987,8 +987,8 @@ isize =i_size_read (inode);
Can that return 0?
Alasdair
Signature · 1 line
[email protected]
Re: 2.6.9-mm1: LVM stopped working (dio-handle-eof.patch)
Quoted 7 lines · Alasdair G Kergon
fs/direct-io.c line 987
Quoted 4 lines · Jens Axboe
fs/direct-io.c renamed from opt/kernel/linux-2.6.10-rc1-mm1/fs/direct-io.c +0
-0@@ -987,8 +987,8 @@ isize =i_size_read (inode);Can that return 0?
This may not be the problem coz' the bug still exists using vanilla 2.6.10-rc1, and there's no "isize" in fs/direct-io.c
Thanks,
Jeff.
Quoted 12 lines · Mathieu Segaud
Well, I gave a try to last -mm tree. The bot seemed good till it got to LVM stuff. Vgchange does not find any volume groups. I can't say much because lvm is pretty "early stuff" on this box; so it is pretty unusable. All I know for now, as I changed a little my boot scripts to be more verbose, is that vgchange -avvv y returns this kind of message:
hdXN: cannot read LABEL
and this message for all parts it can test....
As I need this box up and running, I came back to 2.6.9-rc3-mm3 (it works pretty well). I will be able to run more tests on it, tomorrow but for now that's all I can provide.
Quoted 5 lines
Oh and dmesg didn't have any oops or BUG in it, and seemed quite usual, in IDE detection and settings messages and device-mapper messages.
However, I use dm-crypt to encrypt my / (no initrd, just initramfs) and it works under 2.6.9-mm1, so the bug is likely to be in IDE stuff.
prove it ;)
There were only minor IDE changes from 2.6.9-rc3-mm3 to 2.6.9-mm1, I don't see any obvious suspects...
Quoted 14 lines · Bartlomiej Zolnierkiewicz
Quoted 12 lines · Mathieu Segaud
Well, I gave a try to last -mm tree. The bot seemed good till it got to LVM stuff. Vgchange does not find any volume groups. I can't say much because lvm is pretty "early stuff" on this box; so it is pretty unusable. All I know for now, as I changed a little my boot scripts to be more verbose, is that vgchange -avvv y returns this kind of message:
hdXN: cannot read LABEL
and this message for all parts it can test....
As I need this box up and running, I came back to 2.6.9-rc3-mm3 (it works pretty well). I will be able to run more tests on it, tomorrow but for now that's all I can provide.
Quoted 7 lines
Quoted 5 lines
Oh and dmesg didn't have any oops or BUG in it, and seemed quite usual, in IDE detection and settings messages and device-mapper messages.
However, I use dm-crypt to encrypt my / (no initrd, just initramfs) and it works under 2.6.9-mm1, so the bug is likely to be in IDE stuff.
prove it ;)
To make this task easier I prepared 2.6.9-rc3-mm3 to 2.6.9-mm1 IDE patch:
http://home.elka.pw.edu.pl/~bzolnier/ide-2.6.9-rc3-mm3-to-2.6.9-mm1.patch.bz2
Just revert it from 2.6.9-mm1.
Quoted 2 lines
There were only minor IDE changes from 2.6.9-rc3-mm3 to 2.6.9-mm1, I don't see any obvious suspects...
Bartlomiej Zolnierkiewicz <[email protected]> disait dernièrement que :
Quoted 5 lines
To make this task easier I prepared 2.6.9-rc3-mm3 to 2.6.9-mm1 IDE patch:
http://home.elka.pw.edu.pl/~bzolnier/ide-2.6.9-rc3-mm3-to-2.6.9-mm1.patch.bz2
Just revert it from 2.6.9-mm1.
thx, I will test it soon.
I have just made straces of vgchange processes in success and failure cases (there is little difference in the fact that in the failure case, I added -v verbose option but that's all)
vgchange tries to read 2 chunks of data from the partition:
- the first 2048 bytes,
- and after closing device, and reopening it, the 512 next ones.
in the failure case, the first read succeeds with just 1536 bytes read, which causes the process to issue another read syscall to read the "missing" 512 bytes, which fails...
for now, that's all I can see
I will enable lvm debugging, for the next try
the straces are:
http://www.crans.org/~segaud/vgchange.failure
http://www.crans.org/~segaud/vgchange.succeeded
(names are obvious)
Best regards,
Mathieu
Signature · 5 lines
"I am a living example of someone who took on an issue and benefited from it." George W. Bush April 25, 2001 Speaking to John King of CNN.
Bartlomiej Zolnierkiewicz <[email protected]> disait dernièrement que :
Quoted 10 lines
Quoted 4 lines
Quoted 2 lines
However, I use dm-crypt to encrypt my / (no initrd, just initramfs) and it works under 2.6.9-mm1, so the bug is likely to be in IDE stuff.
prove it ;)
To make this task easier I prepared 2.6.9-rc3-mm3 to 2.6.9-mm1 IDE patch:
http://home.elka.pw.edu.pl/~bzolnier/ide-2.6.9-rc3-mm3-to-2.6.9-mm1.patch.bz2
Just revert it from 2.6.9-mm1.
reverting ide changes do not change anything....
error is still here
The only changes I can see now, are the md changes. I will try reverting it, and if I get no positive results, I give up (for today :))
Signature · 2 lines
printk("What? oldfid != cii->c_fid. Call 911.\n");
linux-2.4.3/fs/coda/cnode.cMathieu Segaud <[email protected]> disait dernièrement que :
Quoted 4 lines
reverting ide changes do not change anything....
error is still here
The only changes I can see now, are the md changes. I will try reverting it, and if I get no positive results, I give up (for today :))
obviously, md changes cannot have caused this failure....my mistake
I will dig again and again, if need be
Signature · 2 lines
dprintk(5, KERN_DEBUG "Jotti is een held!\n");
linux-2.6.6/drivers/media/video/zoran_card.c