Linux device number extension patch

Wang Chen wangchen at nanjing-fnst.com
Wed Oct 13 06:49:55 UTC 2004


Hello,

I have a question about device number extension in "e2fsprogs-1.35".

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. 

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.

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>

Best Regards,
Wang Chen
----------------------------------------------------------
Wang Chen
Dept. of Technology and Development
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 16-5, Guangzhou Rd., Nanjing, P.R.China 210008
PHONE  : +86+25-86630523-636
FUJITSU INTERNAL: 79955-636
FAX  : +86+25-83317685
Mail  : wangchen at nanjing-fnst.com
----------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20041013/e7e0a110/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e2fsprogs-1.35-device_number.patch
Type: application/octet-stream
Size: 929 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20041013/e7e0a110/attachment.obj>


More information about the Ext3-users mailing list