Bug 137392 - device number extension for e2fsprogs
device number extension for e2fsprogs
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-27 20:43 EDT by wang chen
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-04 12:02:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wang chen 2004-10-27 20:43:05 EDT
Description of problem:
In Linux kernel 2.6, device number is extended from 16-bit to 32-bit. 
All utilities and libraries should make corresponding extension for 
this new feature in kernel 2.6. 
In e2fsprogs,following operation defines type "kdev_t" as "unsigned 
short" type, thus the device number has only 16-bit.
In file lib/ext2fs/jfs_user.h: 4
        typedef unsigned short kdev_t; 
In file misc/jfs_user.h: 4
        typedef unsigned short kdev_t; 
In file debugfs/jfs_user.h: 4
        typedef unsigned short kdev_t; 
It seems not to correspond to device number extension.I think Kdev_t 
should be defined as 32-bit long int.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
The attached patch is for device number extension as following:
--- e2fsprogs-1.35-orig/debugfs/jfs_user.h 2004-08-25 
13:42:41.118920528 -0400
+++ e2fsprogs-1.35/debugfs/jfs_user.h 2004-08-25 13:47:00.732453272 -
0400
@@ -1,7 +1,7 @@
 #ifndef _JFS_USER_H
 #define _JFS_USER_H
 
-typedef unsigned short kdev_t;
+typedef unsigned long kdev_t;
 
 #include <ext2fs/kernel-jbd.h>
 
--- e2fsprogs-1.35-orig/lib/ext2fs/jfs_user.h 2004-08-25 
13:42:41.136917792 -0400
+++ e2fsprogs-1.35/lib/ext2fs/jfs_user.h 2004-08-25 
13:43:42.790545016 -0400
@@ -1,7 +1,7 @@
 #ifndef _JFS_USER_H
 #define _JFS_USER_H
 
-typedef unsigned short kdev_t;
+typedef unsigned long kdev_t;
 
 #include "kernel-jbd.h"
 
--- e2fsprogs-1.35-orig/misc/jfs_user.h 2004-08-25 
13:42:41.247900920 -0400
+++ e2fsprogs-1.35/misc/jfs_user.h 2004-08-25 13:46:38.840781312 -0400
@@ -1,7 +1,7 @@
 #ifndef _JFS_USER_H
 #define _JFS_USER_H
 
-typedef unsigned short kdev_t;
+typedef unsigned long kdev_t;
 
 #include <ext2fs/kernel-jbd.h>
Comment 1 Stephen Tweedie 2004-11-04 12:02:57 EST
Those definitions are nothing more than placeholders used to allow
e2fsprogs to compile using the kernel version of the jbd header files.
 In fact, replacing the kdev_t definition in those files with

typedef struct {unsigned short unused;} kdev_t;

still allows it to build just fine.  The e2fsck code _does_ use
kdev_t, but it defines that as a far more useful internal struct,
rather than as an unsigned short.

"kernel-jbd.h" uses kdev_t only twice, for j_dev and j_fs_dev, and
searching for those shows nothing that actually uses them other than
the code in e2fsck that uses the expanded definition.

I don't think there's anything here needing changed.

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