public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.6.9-mm1: LVM stopped working
@ 2004-11-01 22:52 Laurent Riffard
  2004-11-02 22:32 ` Laurent Riffard
  0 siblings, 1 reply; 15+ messages in thread
From: Laurent Riffard @ 2004-11-01 22:52 UTC (permalink / raw)
  To: Kernel development list

[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]


Hello,

Lvm2 stopped working since 2.6.9-mm1 for me too : 2.6.9-rc4-mm1 was 
fine, 2.6.9-mm1 to 2.6.10-mm2 break lvm2. Reverting 
dio-handle-eof.patch on these kernel solves the problem.

I have a simple test case here.

With 2.6.9-rc4-mm1, "pvdisplay /dev/hda4" shows :
 --- Physical volume ---
 PV Name               /dev/hda4
 VG Name               vglinux1
 PV Size               19,07 GB / not usable 0
 Allocatable           yes
 PE Size (KByte)       4096
 Total PE              4882
 Free PE               3424
 Allocated PE          1458
 PV UUID               Kvi5oA-d8NL-DU0n-vJpt-TKb3-RmDP-nrZoaz

With later -mm kernel, "pvdisplay /dev/hda4" shows :
 No physical volume label read from /dev/hda4
 Failed to read physical volume "/dev/hda4"

I tracked down the problem to this code section in fs/direct-io.c (function direct_io_worker) :

  1012                 dio->total_pages = 0;
  1013                 if (user_addr & (PAGE_SIZE-1)) {
  1014                         dio->total_pages++;
  1015                         bytes -= PAGE_SIZE - (user_addr & (PAGE_SIZE - 1));
  1016                 }
  1017                 dio->total_pages += (bytes + PAGE_SIZE - 1) / PAGE_SIZE;
  1018                 dio->curr_user_address = user_addr;
  1019
  1020                 ret = do_direct_IO(dio);
  1021
  1022                 dio->result += bytes -
  1023                         ((dio->final_block_in_request - dio->block_in_file) <<
  1024                                         blkbits);

In my case, direct_io_worker is called to read 2048 bytes at the beginning of /dev/hda4 :
 user_addr=0xbfff9800 (half page aligned)
 bytes=2048 (half page)
So "bytes" is zeroed line 1015.
And dio->result is zeroed line 1023.
As a result, direct_io_worker returns 0.

Before dio-handle-eof.patch, line 1022 was :
	dio->result += iov[seg].iov_len -

What is the semantic of "bytes" line 1015 : bytes to read on the next page ?
Did I miss something ?

hope this helps... 
I will do some tests if needed.

-- 
laurent



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread
* 2.6.9-mm1: LVM stopped working
@ 2004-10-23 23:06 Mathieu Segaud
  2004-10-25 19:03 ` Christophe Saout
  2004-10-26 14:00 ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 15+ messages in thread
From: Mathieu Segaud @ 2004-10-23 23:06 UTC (permalink / raw)
  To: linux-kernel


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

-- 
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


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

end of thread, other threads:[~2004-11-03  0:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-01 22:52 2.6.9-mm1: LVM stopped working Laurent Riffard
2004-11-02 22:32 ` Laurent Riffard
  -- strict thread matches above, loose matches on Subject: below --
2004-10-23 23:06 Mathieu Segaud
2004-10-25 19:03 ` Christophe Saout
2004-10-25 22:31   ` Mathieu Segaud
2004-10-26 11:00   ` Mathieu Segaud
2004-10-26 12:36   ` jfannin1
2004-10-26 13:55     ` Jeff Chua
2004-10-26 14:09       ` Alasdair G Kergon
2004-10-26 13:59     ` Alasdair G Kergon
2004-10-26 14:00 ` Bartlomiej Zolnierkiewicz
2004-10-26 17:07   ` Bartlomiej Zolnierkiewicz
2004-10-26 17:21     ` Mathieu Segaud
2004-10-26 17:54     ` Mathieu Segaud
2004-10-26 18:04       ` Mathieu Segaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox