lkml.org 
[lkml]   [2004]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.9-mm1: LVM stopped working

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


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.029 / U:2.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site