Bug 137392 - device number extension for e2fsprogs
Summary: device number extension for e2fsprogs
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs   
(Show other bugs)
Version: 4.0
Hardware: i386 Linux
Target Milestone: ---
: ---
Assignee: Thomas Woerner
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-10-28 00:43 UTC by wang chen
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description wang chen 2004-10-28 00:43:05 UTC
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):

How reproducible:

Steps to Reproduce:
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 -
@@ -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 17:02:57 UTC
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.