All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Riffard <laurent.riffard@free.fr>
To: Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.9-mm1: LVM stopped working
Date: Mon, 01 Nov 2004 23:52:17 +0100	[thread overview]
Message-ID: <4186BE21.8050000@free.fr> (raw)

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

             reply	other threads:[~2004-11-01 23:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-01 22:52 Laurent Riffard [this message]
2004-11-02 22:32 ` 2.6.9-mm1: LVM stopped working 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4186BE21.8050000@free.fr \
    --to=laurent.riffard@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.