]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: fix bug in unix_io corrupted > 16TB file systems on 32-bit systems
authorTheodore Ts'o <tytso@mit.edu>
Mon, 14 May 2012 14:55:09 +0000 (10:55 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 May 2012 14:55:09 +0000 (10:55 -0400)
The code was assuming that "unsigned long" was 64-bit, which of course
it isn't on 32-bit systems.  This caused blocks to get written to the
wrong place.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/unix_io.c

index 2ce05631f454612fa32a9695cb50348ecf5dfe4a..e66b5c8b7431287d4e38c836d401d85f85027b6f 100644 (file)
          if ((struct)->magic != (code)) return (code)
 
 struct unix_cache {
-       char            *buf;
-       unsigned long   block;
-       int             access_time;
-       unsigned        dirty:1;
-       unsigned        in_use:1;
+       char                    *buf;
+       unsigned long long      block;
+       int                     access_time;
+       unsigned                dirty:1;
+       unsigned                in_use:1;
 };
 
 #define CACHE_SIZE 8