Whamcloud - gitweb
Branch b1_6
authoradilger <adilger>
Wed, 18 Jul 2007 21:13:12 +0000 (21:13 +0000)
committeradilger <adilger>
Wed, 18 Jul 2007 21:13:12 +0000 (21:13 +0000)
i=nathan
i=scjody
b=13063
Description: lfsck built against 1.4.x cannot run against 1.6.0 lustre
Details    : the definition for OBD_IOC_GETNAME changed in 1.6.0.  One of the
     few external users of this ioctl number is lfsck's call to
     llapi_lov_get_uuids() and this caused lfsck to fail at startup.
     Add the old ioctl number to the handler so both old and new
     lfsck can work.

lustre/ChangeLog
lustre/include/lustre_lib.h
lustre/llite/dir.c
lustre/llite/file.c

index bc6c481..f883e7c 100644 (file)
@@ -493,12 +493,22 @@ Details    : a disk corruption can cause the mballoc code to assert on a
             ext3_error() instead of assertions.
 
 Severity   : major
+Frequency  : only with mballoc3 code and deep extent trees
 Bugzilla   : 12861
-Description: ldiskfs_ext_search_right: bad header in inode #3981353: unexpected
-            eh_depth
+Description: ldiskfs_ext_search_right: bad header in inode: unexpected eh_depth
 Details    : a wrong check of extent headers in ldiskfs_ext_search_right()
             can cause the filesystem to be remounted read-only.
 
+Severity   : normal
+Frequency  : rare
+Bugzilla   : 13063
+Description: lfsck built against 1.4.x cannot run against 1.6.0 lustre
+Details    : the definition for OBD_IOC_GETNAME changed in 1.6.0.  One of the
+            few external users of this ioctl number is lfsck's call to
+            llapi_lov_get_uuids() and this caused lfsck to fail at startup.
+            Add the old ioctl number to the handler so both old and new
+            lfsck can work.
+
 --------------------------------------------------------------------------------
 
 2007-05-03  Cluster File Systems, Inc. <info@clusterfs.com>
index 3e929d1..092b3a6 100644 (file)
@@ -442,6 +442,8 @@ static inline void obd_ioctl_freedata(char *buf, int len)
 #define OBD_IOC_BRW_WRITE              _IOWR('f', 126, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_NAME2DEV               _IOWR('f', 127, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_UUID2DEV               _IOWR('f', 130, OBD_IOC_DATA_TYPE)
+/* OBD_IOC_GETNAME_OLD is for compatibility with 1.4.x */
+#define OBD_IOC_GETNAME_OLD            _IOR ('f', 131, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_GETNAME                _IOWR('f', 131, OBD_IOC_DATA_TYPE)
 
 #define OBD_IOC_LOV_GET_CONFIG         _IOWR('f', 132, OBD_IOC_DATA_TYPE)
index 8862b5c..2666a04 100644 (file)
@@ -906,6 +906,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                 RETURN(rc);
         }
 #endif /* HAVE_QUOTA_SUPPORT */
+        case OBD_IOC_GETNAME_OLD:
         case OBD_IOC_GETNAME: {
                 struct obd_device *obd = class_exp2obd(sbi->ll_osc_exp);
                 if (!obd)
index 3c0779e..ef6b1f9 100644 (file)
@@ -2132,6 +2132,17 @@ int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                 RETURN(ll_put_grouplock(inode, file, arg));
         case IOC_OBD_STATFS:
                 RETURN(ll_obd_statfs(inode, (void *)arg));
+        case OBD_IOC_GETNAME_OLD:
+        case OBD_IOC_GETNAME: {
+                struct obd_device *obd =
+                        class_exp2obd(ll_i2sbi(inode)->ll_osc_exp);
+                if (!obd)
+                        RETURN(-EFAULT);
+                if (copy_to_user((void *)arg, obd->obd_name,
+                                strlen(obd->obd_name) + 1))
+                        RETURN (-EFAULT);
+                RETURN(0);
+        }
 
         /* We need to special case any other ioctls we want to handle,
          * to send them to the MDS/OST as appropriate and to properly