Bug 453359 - page keeps non uptodate
page keeps non uptodate
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Jiri Pirko
Martin Jenner
Depends On:
Blocks: 461297
  Show dependency treegraph
Reported: 2008-06-30 00:05 EDT by wengang wang
Modified: 2015-05-04 21:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-18 15:19:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for block_read_full_page (451 bytes, patch)
2008-07-09 01:44 EDT, wengang wang
no flags Details | Diff

  None (edit)
Description wengang wang 2008-06-30 00:05:22 EDT
this happens on kernel 2.6.9-55, but seems even 2.6.9-67.0.20 has this problem too.

the problem is in function  fs/buffer.c block_read_full_page(),

1                        if (iblock < lblock) {
2                               if (get_block(inode, iblock, bh, 0))
3                                        SetPageError(page);
4                        }
5                        if (!buffer_mapped(bh)) {
6                                void *kaddr = kmap_atomic(page, KM_USER0);
7                                memset(kaddr + i * blocksize, 0, blocksize);
8                                flush_dcache_page(page);
9                                kunmap_atomic(kaddr, KM_USER0);
10                               set_buffer_uptodate(bh);
11                               continue;
12                        }

when the system specific get_block() fails and buffer head (bh) is not mapped,
it comes to line 10, the bh is set as uptodate (with page in error in line 3).
when another readpage comes, seeing the bh is uptodate it ignores that bh so the
bh never has a chance to run a get_block() on.

I made a fix, that's
10                set_buffer_uptodate(bh);
11                continue;
10                if (!PageError(page))
11                        set_buffer_uptodate(bh);
12                continue;

is this patch ok?
Comment 1 wengang wang 2008-07-03 02:58:13 EDT
no updates?
Comment 2 wengang wang 2008-07-09 01:44:08 EDT
Created attachment 311347 [details]
patch for block_read_full_page

this patch fixes problem when FS specific get_block() returns error.
Comment 3 wengang wang 2008-07-09 01:45:34 EDT
please have this patch included in next 2.6.9 kernel release.
Comment 4 Phil Knirsch 2008-07-22 07:48:54 EDT
Moving bug to kernel component so that it gets the attention from the correct team.

Read ya, Phil
Comment 7 RHEL Product and Program Management 2008-07-31 14:03:28 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 9 RHEL Product and Program Management 2008-09-03 09:02:16 EDT
Updating PM score.
Comment 10 Vivek Goyal 2008-09-12 15:58:33 EDT
Committed in 78.9.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 13 errata-xmlrpc 2009-05-18 15:19:53 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.