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 83977

Summary: Receiving EXT2-fs errors on a loopback file system
Product: [Retired] Red Hat Linux Reporter: Michael Lee Yohe <michael>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-30 15:40:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Michael Lee Yohe 2003-02-10 17:33:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030102

Description of problem:
I currently have an ext2 file system "sand box" via the loopback driver kernel.

Here are the details:
$ rpm -q kernel
kernel-2.4.18-24.8.0

$ uname -a
Linux rhlinux-04 2.4.18-24.8.0 #1 Fri Jan 31 06:51:30 EST 2003 i686 i686 i386
GNU/Linux

$ mount | grep /\ 
/dev/hda7 on / type ext3 (rw)

$ ls -laF /etc/fs/embedded_fs 
-rw-rw----    1 root     myohe    12000000000 Feb  6 09:46 /etc/fs/embedded_fs

"embedded_fs" is what my loopback device points to and is approximately 12G in
capacity.

$ mount | grep loop
/dev/loop0 on /home/fs type ext2 (rw,noexec,nosuid,nodev,loop=/dev/loop1)

$ df | grep loop
/dev/loop0            11534708    189136  11345572   2% /home/fs

The problem occurs when you create files on the loopback file system and then
delete them.

$ cd /home/fs
$ mkdir tmp
$ cd tmp
$ touch file-1
$ touch file-2
$ touch file-3
... so on and so forth ...
$ rm file-1
$ rm file-2
$ rm file-3
... so on and so forth ...
$ dmesg | grep loop
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176146
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176147
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176148
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176149
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176150
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176151
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176152
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176153
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176154
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1176155
EXT2-fs error (device loop(7,1)): ext2_free_blocks: bit already cleared for
block 1175131

$ dmesg | grep loop | wc
    176    1936   15840

As you can see, 176 occurrences have occured (presumably, the number of "rm"
statements that were executed on this loopback file system).

This problem had occurred with the last kernel errata release (-18).  -24
advisory notes cited some ext2 related problems that were corrected.  If I
unmount the file system and then check it via e2fsck, it does find errors and
then corrects the problem.

I am attempting to avoid using the ext3 driver since the "embedded_fs" file,
itself, is on top of a journaled file system (ext3).  


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create an arbitrary file.
2. Use losetup to create a loopback device that points to that file.
3. Format the loopback device using mke2fs.
4. Mount the loopback device using the ext2 (not ext3) driver.
    

Actual Results:  A slew of "EXT2-fs error (device loop(7,1)): ext2_free_blocks:
bit already cleared for block 1175131" error messages.  Requires unmounting the
file system and then running e2fsck.


Expected Results:  No error messages whatsoever.

Additional info:

Comment 1 Michael Lee Yohe 2003-07-17 19:32:18 UTC
Update: This problem still exists in the latest errata Red Hat kernel for Red
Hat Linux 9.

Comment 2 Bugzilla owner 2004-09-30 15:40:31 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/