From: "John L. Hammond" <john.hammond@intel.com>
To: <greg@kroah.com>, <andreas.dilger@intel.com>, <oleg.drokin@intel.com>
Cc: <linux-kernel@vger.kernel.org>,
"John L. Hammond" <john.hammond@intel.com>
Subject: [PATCH 5/7] staging/lustre: remove unused lvfs code
Date: Tue, 9 Sep 2014 13:39:06 -0500 [thread overview]
Message-ID: <1410287948-13168-6-git-send-email-john.hammond@intel.com> (raw)
In-Reply-To: <1410287948-13168-1-git-send-email-john.hammond@intel.com>
From: "John L. Hammond" <john.hammond@intel.com>
Remove the unused "lvfs" functions obd_lvfs_fid2dentry(),
ll_lookup_one_len(), l_dput(), lustre_rename(), push_ctxt(), and
pop_ctxt(). Remove the unused members of struct lvfs_run_ctxt.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
---
drivers/staging/lustre/lustre/include/linux/lvfs.h | 78 --------------------
drivers/staging/lustre/lustre/include/lvfs.h | 8 --
drivers/staging/lustre/lustre/include/obd_class.h | 10 ---
3 files changed, 96 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/linux/lvfs.h b/drivers/staging/lustre/lustre/include/linux/lvfs.h
index ddeb7de..786e779 100644
--- a/drivers/staging/lustre/lustre/include/linux/lvfs.h
+++ b/drivers/staging/lustre/lustre/include/linux/lvfs.h
@@ -50,86 +50,8 @@
#include <linux/sched.h>
#include "lustre_compat25.h"
-#define LLOG_LVFS
-
-/* simple.c */
-
-struct lvfs_ucred {
- kuid_t luc_uid;
- kgid_t luc_gid;
- kuid_t luc_fsuid;
- kgid_t luc_fsgid;
- kernel_cap_t luc_cap;
- __u32 luc_umask;
- struct group_info *luc_ginfo;
- struct md_identity *luc_identity;
-};
-
-struct lvfs_callback_ops {
- struct dentry *(*l_fid2dentry)(__u64 id_ino, __u32 gen, __u64 gr, void *data);
-};
-
-#define OBD_RUN_CTXT_MAGIC 0xC0FFEEAA
-#define OBD_CTXT_DEBUG /* development-only debugging */
struct lvfs_run_ctxt {
- struct vfsmount *pwdmnt;
- struct dentry *pwd;
- mm_segment_t fs;
- struct lvfs_ucred luc;
- int ngroups;
- struct lvfs_callback_ops cb_ops;
- struct group_info *group_info;
struct dt_device *dt;
-#ifdef OBD_CTXT_DEBUG
- __u32 magic;
-#endif
};
-#ifdef OBD_CTXT_DEBUG
-#define OBD_SET_CTXT_MAGIC(ctxt) (ctxt)->magic = OBD_RUN_CTXT_MAGIC
-#else
-#define OBD_SET_CTXT_MAGIC(ctxt) do {} while (0)
-#endif
-
-
-int lustre_rename(struct dentry *dir, struct vfsmount *mnt, char *oldname,
- char *newname);
-
-static inline void l_dput(struct dentry *de)
-{
- if (!de || IS_ERR(de))
- return;
- //shrink_dcache_parent(de);
- LASSERT(d_count(de) > 0);
- dput(de);
-}
-
-/* We need to hold the inode semaphore over the dcache lookup itself, or we
- * run the risk of entering the filesystem lookup path concurrently on SMP
- * systems, and instantiating two inodes for the same entry. We still
- * protect against concurrent addition/removal races with the DLM locking.
- */
-static inline struct dentry *ll_lookup_one_len(const char *fid_name,
- struct dentry *dparent,
- int fid_namelen)
-{
- struct dentry *dchild;
-
- mutex_lock(&dparent->d_inode->i_mutex);
- dchild = lookup_one_len(fid_name, dparent, fid_namelen);
- mutex_unlock(&dparent->d_inode->i_mutex);
-
- if (IS_ERR(dchild) || dchild->d_inode == NULL)
- return dchild;
-
- if (is_bad_inode(dchild->d_inode)) {
- CERROR("bad inode returned %lu/%u\n",
- dchild->d_inode->i_ino, dchild->d_inode->i_generation);
- dput(dchild);
- dchild = ERR_PTR(-ENOENT);
- }
- return dchild;
-}
-
-
#endif
diff --git a/drivers/staging/lustre/lustre/include/lvfs.h b/drivers/staging/lustre/lustre/include/lvfs.h
index f91907c..83bbce5 100644
--- a/drivers/staging/lustre/lustre/include/lvfs.h
+++ b/drivers/staging/lustre/lustre/include/lvfs.h
@@ -39,17 +39,9 @@
#ifndef __LVFS_H__
#define __LVFS_H__
-#define LL_FID_NAMELEN (16 + 1 + 8 + 1)
-
#include "../../include/linux/libcfs/libcfs.h"
#include "linux/lvfs.h"
#include "../../include/linux/libcfs/lucache.h"
-
-/* lvfs_linux.c */
-void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
- struct lvfs_ucred *cred);
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
- struct lvfs_ucred *cred);
#endif
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
index 9030171..882e40b 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -1090,16 +1090,6 @@ static inline int obd_destroy_export(struct obd_export *exp)
return 0;
}
-static inline struct dentry *
-obd_lvfs_fid2dentry(struct obd_export *exp, struct ost_id *oi, __u32 gen)
-{
- struct lvfs_run_ctxt *ctxt = &exp->exp_obd->obd_lvfs_ctxt;
- LASSERT(exp->exp_obd);
-
- return ctxt->cb_ops.l_fid2dentry(ostid_id(oi), gen, ostid_seq(oi),
- exp->exp_obd);
-}
-
/* @max_age is the oldest time in jiffies that we accept using a cached data.
* If the cache is older than @max_age we will get a new value from the
* target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */
--
1.7.9.5
next prev parent reply other threads:[~2014-09-09 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 18:39 [PATCH 0/7] staging/lustre: remove the lvfs layer John L. Hammond
2014-09-09 18:39 ` [PATCH 1/7] staging/lustre/lvfs: " John L. Hammond
2014-09-09 18:39 ` [PATCH 2/7] staging/lustre: remove linux/lustre_common.h John L. Hammond
2014-09-09 18:39 ` [PATCH 3/7] staging/lustre: remove portals_compat25.h John L. Hammond
2014-09-09 18:39 ` [PATCH 4/7] staging/lustre: remove lvfs_linux.h John L. Hammond
2014-09-09 18:39 ` John L. Hammond [this message]
2014-09-09 18:39 ` [PATCH 6/7] staging/lustre/libcfs: remove upcall cache John L. Hammond
2014-09-09 18:39 ` [PATCH 7/7] staging/lustre: remove lvfs.h John L. Hammond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410287948-13168-6-git-send-email-john.hammond@intel.com \
--to=john.hammond@intel.com \
--cc=andreas.dilger@intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome