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

Summary: page keeps non uptodate
Product: Red Hat Enterprise Linux 4 Reporter: wengang wang <wangwengang1976>
Component: kernelAssignee: Jiri Pirko <jpirko>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: riek, rkhan, vgoyal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-18 19:19:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 461297    
Attachments:
Description Flags
patch for block_read_full_page none

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
changing
10                set_buffer_uptodate(bh);
11                continue;
to
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
release.

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 http://people.redhat.com/vgoyal/rhel4/

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.

http://rhn.redhat.com/errata/RHSA-2009-1024.html