Whamcloud - gitweb
LU-335 build: Misc fixes to support SuSE platforms
authorJames Simmons <uja.ornl@gmail.com>
Tue, 29 Nov 2011 13:05:19 +0000 (08:05 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 12 Dec 2011 18:13:50 +0000 (13:13 -0500)
Minor cleanups to the lustre base which only showed up when building
for a SuSE platform.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8708c1074b1adf87bd466c6910231e8edcbdc032
Reviewed-on: http://review.whamcloud.com/1678
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/llite/llite_lib.c
lustre/lvfs/fsfilt_ext3.c
lustre/mds/mds_fs.c

index 40c6a0f..de554d4 100644 (file)
@@ -1972,6 +1972,23 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
+#  2.6.27.15-2 SuSE 11 sp0 kernels lack the name field for BDI
+AC_DEFUN([LC_BDI_NAME],
+[AC_MSG_CHECKING([if backing_device_info has name field])
+LB_LINUX_TRY_COMPILE([
+        #include <linux/blkkdev.h>
+],[
+        struct backing_dev_info bdi;
+        bdi.name = NULL;
+],[
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(HAVE_BDI_NAME, 1,
+                  [backing_device_info has name field])
+],[
+        AC_MSG_RESULT(no)
+])
+])  
+
 # 2.6.32 removes blk_queue_max_sectors and add blk_queue_max_hw_sectors
 # check blk_queue_max_sectors and use it until disappear.
 AC_DEFUN([LC_BLK_QUEUE_MAX_SECTORS],
@@ -2247,6 +2264,7 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_BI_HW_SEGMENTS
          LC_HAVE_QUOTAIO_H
          LC_VFS_SYMLINK_5ARGS
+         LC_BDI_NAME
          LC_SB_ANY_QUOTA_ACTIVE
          LC_SB_HAS_QUOTA_ACTIVE
          LC_EXPORT_ADD_TO_PAGE_CACHE_LRU
index 883f181..7ee2abf 100644 (file)
@@ -883,7 +883,9 @@ static inline int ll_bdi_register(struct backing_dev_info *bdi)
 #ifdef HAVE_BDI_REGISTER
         static atomic_t ll_bdi_num = ATOMIC_INIT(0);
 
+#ifdef HAVE_BDI_NAME
         bdi->name = "lustre";
+#endif
         return bdi_register(bdi, NULL, "lustre-%d",
                             atomic_inc_return(&ll_bdi_num));
 #else
index 54b16ae..f0cb78a 100644 (file)
@@ -72,7 +72,7 @@
 # include <quota/quotaio_v2.h>
 # include <quota/quota_tree.h>
 # define V2_DQTREEOFF    QT_TREEOFF
-#elif defined(HAVE_FS_QUOTAIO_V1_H)
+#elif defined(HAVE_FS_QUOTAIO_H)
 # include <quotaio_v2.h>
 # include <quota_tree.h>
 # define V2_DQTREEOFF    QT_TREEOFF
index af66fc1..e65611c 100644 (file)
@@ -204,7 +204,8 @@ int mds_obd_destroy(struct obd_export *exp, struct obdo *oa,
            vfs_unlink() context. bug 10409 */
         inode = de->d_inode;
         atomic_inc(&inode->i_count);
-        rc = ll_vfs_unlink(mds->mds_objects_dir->d_inode, de, mds->mds_vfsmnt);
+        rc = ll_vfs_unlink(mds->mds_objects_dir->d_inode, de,
+                           mds->mds_obt.obt_vfsmnt);
         if (rc)
                 CERROR("error destroying object "LPU64":%u: rc %d\n",
                        oa->o_id, oa->o_generation, rc);