From a80cacd8184639aaddd615437f3ff976e9b91b62 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Tue, 29 Nov 2011 08:05:19 -0500 Subject: [PATCH] LU-335 build: Misc fixes to support SuSE platforms Minor cleanups to the lustre base which only showed up when building for a SuSE platform. Signed-off-by: James Simmons Change-Id: I8708c1074b1adf87bd466c6910231e8edcbdc032 Reviewed-on: http://review.whamcloud.com/1678 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/autoconf/lustre-core.m4 | 18 ++++++++++++++++++ lustre/llite/llite_lib.c | 2 ++ lustre/lvfs/fsfilt_ext3.c | 2 +- lustre/mds/mds_fs.c | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 40c6a0f..de554d4 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -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 +],[ + 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 diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 883f181..7ee2abf 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -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 diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 54b16ae..f0cb78a 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -72,7 +72,7 @@ # include # include # define V2_DQTREEOFF QT_TREEOFF -#elif defined(HAVE_FS_QUOTAIO_V1_H) +#elif defined(HAVE_FS_QUOTAIO_H) # include # include # define V2_DQTREEOFF QT_TREEOFF diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c index af66fc1..e65611c 100644 --- a/lustre/mds/mds_fs.c +++ b/lustre/mds/mds_fs.c @@ -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); -- 1.8.3.1