Bug 187930 - loop.c: integrate upstream changes
Summary: loop.c: integrate upstream changes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Eric Sandeen
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 164499 176344
TreeView+ depends on / blocked
 
Reported: 2006-04-04 17:22 UTC by Robert Peterson
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version: RHBA-2007-0304
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-08 01:06:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to loop.c that seems to work properly with my GFS fix for 164499. (13.75 KB, text/plain)
2006-04-04 17:22 UTC, Robert Peterson
no flags Details
minimal upstream loop.c patch (8.41 KB, patch)
2006-09-15 14:30 UTC, Eric Sandeen
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0304 0 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 4 Update 5 2007-04-28 18:58:50 UTC

Description Robert Peterson 2006-04-04 17:22:51 UTC
Description of problem:
The RHEL4 version of drivers/block/loop.c does not currently support
the write vfs method, it only supports the aops prepare_write and
commit_write.  The upstream kernels and Fedora kernels support using
write when prepare_write/commit_write are not available.
This makes it pretty much impossible to support loopback operations
properly on an underlying filesystem that is clustered like GFS.
See bz #164499 for more information on how to recreate the problem.

Right now, loop.c only uses prepare_write/commit_write aops methods
to operate on a filesystem.  These operations circumvent proper
cluster locking in the case of GFS.  In order to fix GFS, I need
loop.c to support the write method as it currently does in FC4/FC5
and the upstream kernels.

How reproducible:
Always

Steps to Reproduce:
1. Create a file in a GFS filesystem:
   dd if=/dev/zero of=/mnt/gfs/ext2_over_gfs bz=100M count=1
2. Format a filesystem on top of the file:
   mkfs.ext2 /mnt/gfs/ext2_over_gfs
3. Loopback mount the file:
   mount -o loop -text3 /mnt/gfs/ext2_over_gfs /mnt/test
  
Actual results:
Filesystem does not mount properly, assertion errors in dmesg.

Expected results:
Filesystem should mount properly.

Additional info:
I'm not sure how far we want to go to integrate the loop.c module
from upstream and how much we just want to port to get it to work.
I just took a version from the FC4 kernel, ported it to RHEL4, made
changes necessary for it to compile, and it seemed to work properly.
See attachment.  This patch may have things we don't necessarily
want to port to RHEL4.

Comment 1 Robert Peterson 2006-04-04 17:22:51 UTC
Created attachment 127304 [details]
Patch to loop.c that seems to work properly with my GFS fix for 164499.

Comment 5 Eric Sandeen 2006-09-15 14:30:21 UTC
Created attachment 136362 [details]
minimal upstream loop.c patch

Bob, is this more targeted backport sufficient?

Backport of
http://linux.bkbits.net:8080/linux-2.6/cset@1.1994.11.124?nav=index.html|src/|src/drivers|src/drivers/block|related/drivers/block/loop.c

Comment 6 Robert Peterson 2006-09-19 18:41:45 UTC
Eric,

I just tested your patch to loop.c and verified it works properly with
GFS and my fix for bz 164499.


Comment 7 Eric Sandeen 2006-09-22 18:50:26 UTC
patch sent to rhkernel-list

Comment 8 Jay Turner 2006-10-03 13:21:18 UTC
QE ack for 4.5.  Patch has been confirmed in comment 6.

Comment 9 Jason Baron 2006-10-10 15:22:38 UTC
committed in stream U5 build 42.17. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 11 RHEL Program Management 2006-10-10 19:03:59 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 14 Red Hat Bugzilla 2007-05-08 01:06:06 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 the 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/RHBA-2007-0304.html


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