Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 453359 - page keeps non uptodate
Summary: page keeps non uptodate
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Jiri Pirko
QA Contact: Martin Jenner
Depends On:
Blocks: 461297
TreeView+ depends on / blocked
Reported: 2008-06-30 04:05 UTC by wengang wang
Modified: 2015-05-05 01:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-05-18 19:19:53 UTC
Target Upstream Version:

Attachments (Terms of Use)
patch for block_read_full_page (deleted)
2008-07-09 05:44 UTC, wengang wang
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1024 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.8 kernel security and bug fix update 2009-05-18 14:57:26 UTC

Description wengang wang 2008-06-30 04:05:22 UTC
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 06:58:13 UTC
no updates?

Comment 2 wengang wang 2008-07-09 05:44:08 UTC
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 05:45:34 UTC
please have this patch included in next 2.6.9 kernel release.

Comment 4 Phil Knirsch 2008-07-22 11:48:54 UTC
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 18:03:28 UTC
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 13:02:16 UTC
Updating PM score.

Comment 10 Vivek Goyal 2008-09-12 19:58:33 UTC
Committed in 78.9.EL . RPMS are available at

Comment 13 errata-xmlrpc 2009-05-18 19:19:53 UTC
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.