Whamcloud - gitweb
LU-2675 lustre: remove linux/lustre_common.h 95/11495/2
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 18 Aug 2014 16:43:31 +0000 (11:43 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Sep 2014 00:25:32 +0000 (00:25 +0000)
Remove lustre/include/linux/lustre_common.h and several unnecessary
calls to cfs_cleanup_group_info().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I149673dea6559b02a5de1c0a160836d67ea96119
Reviewed-on: http://review.whamcloud.com/11495
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/linux/Makefile.am
lustre/include/linux/lustre_common.h [deleted file]
lustre/include/linux/lustre_lib.h
lustre/include/linux/lustre_lite.h
lustre/include/linux/lvfs.h
lustre/include/linux/obd_support.h
lustre/llite/file.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_fs.c
lustre/obdclass/obdo.c
lustre/ost/ost_handler.c

index 9aa59f9..b0e311d 100644 (file)
@@ -45,4 +45,4 @@ endif
 EXTRA_DIST = lustre_debug.h lustre_lib.h \
        lustre_dlm.h  lustre_handles.h lustre_net.h obd_class.h obd_support.h \
        obd.h lvfs.h lustre_log.h lustre_compat25.h lustre_lite.h lustre_quota.h \
 EXTRA_DIST = lustre_debug.h lustre_lib.h \
        lustre_dlm.h  lustre_handles.h lustre_net.h obd_class.h obd_support.h \
        obd.h lvfs.h lustre_log.h lustre_compat25.h lustre_lite.h lustre_quota.h \
-       lustre_user.h lustre_patchless_compat.h lustre_intent.h lustre_common.h
+       lustre_user.h lustre_patchless_compat.h lustre_intent.h
diff --git a/lustre/include/linux/lustre_common.h b/lustre/include/linux/lustre_common.h
deleted file mode 100644 (file)
index d1783a3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef LUSTRE_COMMON_H
-#define LUSTRE_COMMON_H
-
-#include <linux/sched.h>
-
-static inline int cfs_cleanup_group_info(void)
-{
-       struct group_info *ginfo;
-
-       ginfo = groups_alloc(0);
-       if (!ginfo)
-               return -ENOMEM;
-
-       set_current_groups(ginfo);
-       put_group_info(ginfo);
-
-       return 0;
-}
-
-#define ll_inode_blksize(a)            (1<<(a)->i_blkbits)
-
-#endif
index 6a09018..f5680fe 100644 (file)
@@ -50,7 +50,6 @@
 #include <linux/signal.h>
 #include <linux/types.h>
 #include <linux/lustre_compat25.h>
 #include <linux/signal.h>
 #include <linux/types.h>
 #include <linux/lustre_compat25.h>
-#include <linux/lustre_common.h>
 
 #ifndef LP_POISON
 #if BITS_PER_LONG > 32
 
 #ifndef LP_POISON
 #if BITS_PER_LONG > 32
index 6978c24..ad254b7 100644 (file)
@@ -49,7 +49,6 @@
 #include <lustre_ha.h>
 #include <linux/rbtree.h>
 #include <linux/lustre_compat25.h>
 #include <lustre_ha.h>
 #include <linux/rbtree.h>
 #include <linux/lustre_compat25.h>
-#include <linux/lustre_common.h>
 #include <linux/pagemap.h>
 
 /* lprocfs.c */
 #include <linux/pagemap.h>
 
 /* lprocfs.c */
index d240ac4..8e7405d 100644 (file)
@@ -46,7 +46,6 @@
 #endif
 
 #include <linux/lustre_compat25.h>
 #endif
 
 #include <linux/lustre_compat25.h>
-#include <linux/lustre_common.h>
 #include <linux/fs.h>
 
 #define OBD_RUN_CTXT_MAGIC     0xC0FFEEAA
 #include <linux/fs.h>
 
 #define OBD_RUN_CTXT_MAGIC     0xC0FFEEAA
index bc85713..52d3470 100644 (file)
@@ -52,7 +52,6 @@
 #include <linux/highmem.h>
 #include <linux/swap.h>
 #include <linux/lustre_compat25.h>
 #include <linux/highmem.h>
 #include <linux/swap.h>
 #include <linux/lustre_compat25.h>
-#include <linux/lustre_common.h>
 #endif
 #include <libcfs/libcfs.h>
 #include <lustre/lustre_idl.h>
 #endif
 #include <libcfs/libcfs.h>
 #include <lustre/lustre_idl.h>
index b29a9c6..a17ae91 100644 (file)
@@ -1024,7 +1024,7 @@ int ll_inode_getattr(struct inode *inode, struct obdo *obdo,
                CDEBUG(D_INODE, "objid "DOSTID" size %llu, blocks %llu,"
                       " blksize %lu\n", POSTID(oi), i_size_read(inode),
                       (unsigned long long)inode->i_blocks,
                CDEBUG(D_INODE, "objid "DOSTID" size %llu, blocks %llu,"
                       " blksize %lu\n", POSTID(oi), i_size_read(inode),
                       (unsigned long long)inode->i_blocks,
-                      (unsigned long)ll_inode_blksize(inode));
+                      1UL << inode->i_blkbits);
        }
        ccc_inode_lsm_put(inode, lsm);
        RETURN(rc);
        }
        ccc_inode_lsm_put(inode, lsm);
        RETURN(rc);
index 09f9952..6160ffb 100644 (file)
@@ -711,8 +711,6 @@ static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb)
        /* The mgc fs exclusion mutex. Only one fs can be setup at a time. */
        mutex_lock(&cli->cl_mgc_mutex);
 
        /* The mgc fs exclusion mutex. Only one fs can be setup at a time. */
        mutex_lock(&cli->cl_mgc_mutex);
 
-       cfs_cleanup_group_info();
-
        /* Setup the configs dir */
        rc = lu_env_init(env, LCT_MG_THREAD);
        if (rc)
        /* Setup the configs dir */
        rc = lu_env_init(env, LCT_MG_THREAD);
        if (rc)
index 5d2b99b..e5c1d6c 100644 (file)
@@ -113,11 +113,6 @@ int mgs_fs_setup(const struct lu_env *env, struct mgs_device *mgs)
 
        ENTRY;
 
 
        ENTRY;
 
-       /* FIXME what's this?  Do I need it? */
-       rc = cfs_cleanup_group_info();
-       if (rc)
-               RETURN(rc);
-
        OBD_SET_CTXT_MAGIC(&mgs->mgs_obd->obd_lvfs_ctxt);
        mgs->mgs_obd->obd_lvfs_ctxt.dt = mgs->mgs_bottom;
 
        OBD_SET_CTXT_MAGIC(&mgs->mgs_obd->obd_lvfs_ctxt);
        mgs->mgs_obd->obd_lvfs_ctxt.dt = mgs->mgs_bottom;
 
index 4ac18b4..767cf74 100644 (file)
@@ -86,7 +86,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid)
                 newvalid |= OBD_MD_FLBLOCKS;
         }
         if (valid & OBD_MD_FLBLKSZ) {   /* optimal block size */
                 newvalid |= OBD_MD_FLBLOCKS;
         }
         if (valid & OBD_MD_FLBLKSZ) {   /* optimal block size */
-                dst->o_blksize = ll_inode_blksize(src);
+               dst->o_blksize = 1U << src->i_blkbits;
                 newvalid |= OBD_MD_FLBLKSZ;
         }
         if (valid & OBD_MD_FLTYPE) {
                 newvalid |= OBD_MD_FLBLKSZ;
         }
         if (valid & OBD_MD_FLTYPE) {
index bae0a40..46cbe77 100644 (file)
@@ -90,10 +90,6 @@ static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg)
        int rc;
        ENTRY;
 
        int rc;
        ENTRY;
 
-        rc = cfs_cleanup_group_info();
-        if (rc)
-                RETURN(rc);
-
 #ifdef LPROCFS
        obd->obd_vars = lprocfs_ost_obd_vars;
        lprocfs_seq_obd_setup(obd);
 #ifdef LPROCFS
        obd->obd_vars = lprocfs_ost_obd_vars;
        lprocfs_seq_obd_setup(obd);