From nobody@FreeBSD.org  Fri Oct 17 09:26:12 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F28A41065687
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Oct 2008 09:26:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E28148FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Oct 2008 09:26:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9H9QCRn005736
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Oct 2008 09:26:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id m9H9QCWL005712;
	Fri, 17 Oct 2008 09:26:12 GMT
	(envelope-from nobody)
Message-Id: <200810170926.m9H9QCWL005712@www.freebsd.org>
Date: Fri, 17 Oct 2008 09:26:12 GMT
From: Christophe Cap <christope.cap@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ls gives "Input/output error" on mounted ext3 filesystem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128173
>Category:       kern
>Synopsis:       [ext2fs] ls gives "Input/output error" on mounted ext3 filesystem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 17 09:30:06 UTC 2008
>Closed-Date:    Sat Oct 31 14:40:34 UTC 2009
>Last-Modified:  Fri Feb 24 12:30:10 UTC 2012
>Originator:     Christophe Cap
>Release:        7.1-PRERELEASE
>Organization:
n.a.
>Environment:
FreeBSD pcbsd 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #42: Thu Sep 11 09:07:25 EDT 2008

>Description:
Hi.

I'm migrating my main desktop from OpenSuse 10.3 back to FreeBSD. 
(Using PCBSD at home for desktop convenience)

All user data (home) is still on the ext3 filesystem so I want 
to move it to my new UFS disk.

I manage to mount the filesystem with this fstab line:
/dev/ad1s3              /mnt/opensuse   ext2fs  ro              1       0

The mount 'mounts' fine.

However whe n I cd into /mnt/opensuse, and do an 'ls' I get the folowing :

> uname -a                                                               
FreeBSD pcbsd 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #42: Thu Sep 11 09:07:25 EDT 2008     root@pcbsd:/usr/obj/usr/src/sys/PCBSD  i386                                               
>                                                                                         
>                                                                                         
> pwd                                                                                     
/mnt/opensuse                                                                             
> cd ..
> cd opensuse/
> ls          
ls: christophe: Input/output error
ls: veronique: Input/output error 
> cd christophe
christophe: Input/output error.




>How-To-Repeat:
1) mount ext3 filesystem using mount -t ext2fs /dev/ad1s3 /mnt/opensuse
   (or fstab equivalent)
2) cd into /mnt/opensuse
3) do an 'ls', which will return with "Input/output error."
4) do 'cd' to any directory, will also return "Input/output error."
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-fs 
Responsible-Changed-By: remko 
Responsible-Changed-When: Sat Oct 18 08:13:50 UTC 2008 
Responsible-Changed-Why:  
Reassign to filesystem team. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128173 

From: Stanislav Sedov <stas@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/128173: [ext2fs] ls gives "Input/output error" on mounted  ext3 filesystem
Date: Sun, 18 Jan 2009 20:19:48 +0300

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Hi, Christophe!
 
 Can you check, please, if recent current suffers from the same
 problem? The patch I've committed today should solve this issue.
 I can give you a patch for 7.1 if you're in position to rebuild
 the kernel.
 
 - -- 
 Stanislav Sedov
 ST4096-RIPE
 -----BEGIN PGP SIGNATURE-----
 
 iEYEARECAAYFAklzZLQACgkQK/VZk+smlYGs+wCdGTrYT8G0Ptt0ICTJ5mNKcaay
 xIMAn0gtJN2PYsefXuna+GP6aZIVQBPa
 =0UUe
 -----END PGP SIGNATURE-----
 
 !DSPAM:497364b1967001989116225!
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: stas 
State-Changed-When: Sun Jan 18 17:25:35 UTC 2009 
State-Changed-Why:  
Ask for submitter test. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128173 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Sat Oct 31 14:39:41 UTC 2009 
State-Changed-Why:  
Duplicate of kern/124621. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128173 

From: Peter Maloney <peter.maloney@brockmann-consult.de>
To: bug-followup@FreeBSD.org, christope.cap@gmail.com
Cc:  
Subject: Re: kern/128173: [ext2fs] ls gives &quot;Input/output error&quot;
 on mounted ext3 filesystem
Date: Fri, 24 Feb 2012 13:23:59 +0100

 I have a similar problem... but not with ls.
 
 # md5 biglonguglyfilename.zip
 MD5 (biglonguglyfilename.zip) = 511fdc3352d9265ffac0d472de7bb994
 
 # md5 differentbiglonguglyfilename.zip
 md5: differentbiglonguglyfilename.zip: Input/output error
 
 These files can be read with no problem in Linux, whether I mount the
 system as ext3 or ext2.
 
 I did not create this file system; it was from a 3rd party.
 
 Here is tune2fs output from a Linux machine:
 
 # tune2fs -l /dev/sdb1
 tune2fs 1.41.14 (22-Dec-2010)
 Filesystem volume name:   [snip]
 Last mounted on:          <not available>
 Filesystem UUID:          [snip]
 Filesystem magic number:  0xEF53
 Filesystem revision #:    1 (dynamic)
 Filesystem features:      has_journal ext_attr resize_inode dir_index
 filetype needs_recovery sparse_super large_file
 Filesystem flags:         signed_directory_hash
 Default mount options:    (none)
 Filesystem state:         clean
 Errors behavior:          Continue
 Filesystem OS type:       Linux
 Inode count:              244203520
 Block count:              488378000
 Reserved block count:     0
 Free blocks:              16884957
 Free inodes:              244183788
 First block:              0
 Block size:               4096
 Fragment size:            4096
 Reserved GDT blocks:      907
 Blocks per group:         32768
 Fragments per group:      32768
 Inodes per group:         16384
 Inode blocks per group:   512
 Filesystem created:       Sun Oct 23 17:07:18 2011
 Last mount time:          Fri Feb 24 13:10:50 2012
 Last write time:          Fri Feb 24 13:10:50 2012
 Mount count:              6
 Maximum mount count:      21
 Last checked:             Sun Oct 23 17:07:18 2011
 Check interval:           15552000 (6 months)
 Next check after:         Fri Apr 20 17:07:18 2012
 Reserved blocks uid:      0 (user root)
 Reserved blocks gid:      0 (group root)
 First inode:              11
 Inode size:               128
 Journal inode:            8
 Default directory hash:   tea
 Directory Hash Seed:      364481f6-7b5a-4cbb-89d7-7e50c112c884
 Journal backup:           inode blocks
 
 
 # uname -a
 FreeBSD smostank2.bc.local 8.2-STABLE-20120204 FreeBSD
 8.2-STABLE-20120104 #0: Mon Feb  6 12:10:32 UTC 2012    
 root@bczfsvm1.bc.local:/usr/obj/usr/src/sys/GENERIC  amd64
 
 According to the man page of mkfs.ext4 in FreeBSD: E2fsprogs version 1.42
>Unformatted:
