All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>, tony@linx.net
Subject: Re: ~3TB ext4 volume not read correctly by ext2-fs driver in GRUB2
Date: Wed, 24 Feb 2010 11:49:36 +0100	[thread overview]
Message-ID: <4B850440.6000108@gmail.com> (raw)
In-Reply-To: <1252350805.4234.6.camel@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 4400 bytes --]

Try attached patch
Tony Vroon wrote:
> Ladies and gentlemen,
>
> It would appear that the ext2-fs driver is not reliably able to read
> directories on my ~3TB / filesystem:
> /dev/root             3.4T  1.7T  1.6T  52% /
> /dev/root on / type ext4 (rw,noatime,barrier=1,data=ordered)
>
> Whilst doing some troubleshooting over IRC, I was given a debug patch.
> With this patch applied, I'll show you a working directory entry (/etc)
> and a non-working directory entry (/boot):
> prometheus ~ # grub-fstest -d ext2 -v /dev/sda3 ls /etc
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:651: iterating inode size=4096 mode=0x41ed
> fs/ext2.c:688: got filename: '.', type 2
> fs/ext2.c:862: grub_fshelp_dir returning: 0
> fs/ext2.c:651: iterating inode size=4096 mode=0x41ed
> fs/ext2.c:688: got filename: '.', type 2
> fs/ext2.c:688: got filename: '..', type 2
> fs/ext2.c:688: got filename: 'lost+found', type 2
> fs/ext2.c:688: got filename: 'lib', type 7
> fs/ext2.c:688: got filename: '.config', type 1
> fs/ext2.c:688: got filename: 'sbin', type 2
> fs/ext2.c:688: got filename: 'root', type 2
> fs/ext2.c:688: got filename: 'mnt', type 2
> fs/ext2.c:688: got filename: 'opt', type 2
> fs/ext2.c:688: got filename: 'var', type 2
> fs/ext2.c:688: got filename: 'usr', type 2
> fs/ext2.c:688: got filename: 'dev', type 2
> fs/ext2.c:688: got filename: 'lib32', type 2
> fs/ext2.c:688: got filename: 'home', type 2
> fs/ext2.c:688: got filename: 'tmp', type 2
> fs/ext2.c:688: got filename: 'media', type 2
> fs/ext2.c:688: got filename: 'sys', type 2
> fs/ext2.c:688: got filename: 'cvs', type 2
> fs/ext2.c:688: got filename: 'proc', type 2
> fs/ext2.c:688: got filename: 'etc', type 2
> fs/ext2.c:651: iterating inode size=0 mode=0x0
> fs/ext2.c:862: grub_fshelp_dir returning: 0
>
> prometheus ~ # grub-fstest -d ext2 -v /dev/sda3 ls /boot
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:862: grub_fshelp_dir returning: 9
> fs/ext2.c:651: iterating inode size=4096 mode=0x41ed
> fs/ext2.c:688: got filename: '.', type 2
> fs/ext2.c:862: grub_fshelp_dir returning: 0
> fs/ext2.c:651: iterating inode size=4096 mode=0x41ed
> fs/ext2.c:688: got filename: '.', type 2
> fs/ext2.c:688: got filename: '..', type 2
> fs/ext2.c:688: got filename: 'lost+found', type 2
> fs/ext2.c:688: got filename: 'lib', type 7
> fs/ext2.c:688: got filename: '.config', type 1
> fs/ext2.c:688: got filename: 'sbin', type 2
> fs/ext2.c:688: got filename: 'root', type 2
> fs/ext2.c:688: got filename: 'mnt', type 2
> fs/ext2.c:688: got filename: 'opt', type 2
> fs/ext2.c:688: got filename: 'var', type 2
> fs/ext2.c:688: got filename: 'usr', type 2
> fs/ext2.c:688: got filename: 'dev', type 2
> fs/ext2.c:688: got filename: 'lib32', type 2
> fs/ext2.c:688: got filename: 'home', type 2
> fs/ext2.c:688: got filename: 'tmp', type 2
> fs/ext2.c:688: got filename: 'media', type 2
> fs/ext2.c:688: got filename: 'sys', type 2
> fs/ext2.c:688: got filename: 'cvs', type 2
> fs/ext2.c:688: got filename: 'proc', type 2
> fs/ext2.c:688: got filename: 'etc', type 2
> fs/ext2.c:688: got filename: 'lib64', type 2
> fs/ext2.c:688: got filename: 'boot', type 2
> fs/ext2.c:651: iterating inode size=0 mode=0x0
> fs/ext2.c:862: grub_fshelp_dir returning: 0
>
> In order to help troubleshoot this, I can apply patches on top of
> current SVN, run fstest & test booting for you. Please note that making
> images of a 3TB drive is not practical and will not reflect the real
> situation to you.
> Sorry, but I am not comfortable offering SSH access to random internet
> strangers.
>
> Regards,
> Tony V.
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: bige2fs.diff --]
[-- Type: text/x-diff; name="bige2fs.diff", Size: 986 bytes --]

=== modified file 'fs/ext2.c'
--- fs/ext2.c	2010-01-20 08:12:47 +0000
+++ fs/ext2.c	2010-02-24 10:48:31 +0000
@@ -436,7 +436,8 @@
       grub_uint32_t indir[blksz / 4];
 
       if (grub_disk_read (data->disk,
-			  grub_le_to_cpu32 (inode->blocks.indir_block)
+			  ((grub_disk_addr_t)
+			   grub_le_to_cpu32 (inode->blocks.indir_block))
 			  << log2_blksz,
 			  0, blksz, indir))
 	return grub_errno;
@@ -452,13 +453,15 @@
       grub_uint32_t indir[blksz / 4];
 
       if (grub_disk_read (data->disk,
-			  grub_le_to_cpu32 (inode->blocks.double_indir_block)
+			  ((grub_disk_addr_t)
+			   grub_le_to_cpu32 (inode->blocks.double_indir_block))
 			  << log2_blksz,
 			  0, blksz, indir))
 	return grub_errno;
 
       if (grub_disk_read (data->disk,
-			  grub_le_to_cpu32 (indir[rblock / perblock])
+			  ((grub_disk_addr_t)
+			   grub_le_to_cpu32 (indir[rblock / perblock]))
 			  << log2_blksz,
 			  0, blksz, indir))
 	return grub_errno;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

      parent reply	other threads:[~2010-02-24 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07 19:13 ~3TB ext4 volume not read correctly by ext2-fs driver in GRUB2 Tony Vroon
2009-09-12 13:54 ` Tony Vroon
2010-02-24 10:49 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B850440.6000108@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=tony@linx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.