#define __LINUX_LU_OBJECT_H
/*
- * struct ll_fid
+ * struct lu_fid
*/
#include <linux/lustre_idl.h>
/*
* Fid, uniquely identifying this object.
*/
- struct ll_fid loh_fid;
+ struct lu_fid loh_fid;
/*
* Linkage into per-site hash table. Protected by site guard lock.
*/
return container_of(o->lo_linkage.next, struct lu_object, lo_linkage);
}
-static inline struct ll_fid *lu_object_fid(const struct lu_object *o)
+static inline struct lu_fid *lu_object_fid(const struct lu_object *o)
{
return &o->lo_header->loh_fid;
}
void lu_object_put(struct lu_object *o);
void lu_site_purge(struct lu_site *s, int nr);
int lu_object_print(struct seq_file *f, const struct lu_object *o);
-struct lu_object *lu_object_find(struct lu_site *s, const struct ll_fid *f);
+struct lu_object *lu_object_find(struct lu_site *s, const struct lu_fid *f);
int lu_site_init(struct lu_site *s, struct lu_device *top);
void lu_site_fini(struct lu_site *s);
#define OBD_FL_TRUNCLOCK (0x00000800)
/* this should be not smaller than sizeof(struct lustre_handle) + sizeof(struct
- * llog_cookie) + sizeof(ll_fid). Nevertheless struct ll_fid is not longer
+ * llog_cookie) + sizeof(lu_fid). Nevertheless struct lu_fid is not longer
* stored in o_inline, we keep this just for case. */
#define OBD_INLINESZ 80
/* This FULL lock is useful to take on unlink sort of operations */
#define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1)
-struct ll_fid {
+struct lu_fid {
__u64 id; /* holds object id */
__u32 generation; /* holds object generation */
* OST for saving into EA. */
};
-extern void lustre_swab_ll_fid (struct ll_fid *fid);
+extern void lustre_swab_lu_fid (struct lu_fid *fid);
-static inline int lfid_eq(const struct ll_fid *f0, const struct ll_fid *f1)
+static inline int lfid_eq(const struct lu_fid *f0, const struct lu_fid *f1)
{
/* check that there is no alignment padding */
CLASSERT(sizeof *f0 ==
#define MDS_BFLAG_UNCOMMITTED_WRITES 0x1
struct mds_body {
- struct ll_fid fid1;
- struct ll_fid fid2;
+ struct lu_fid fid1;
+ struct lu_fid fid2;
struct lustre_handle handle;
__u64 valid;
__u64 size; /* Offset, in the case of MDS_READPAGE */
__u32 sa_cap;
__u32 sa_suppgid;
__u32 sa_mode;
- struct ll_fid sa_fid;
+ struct lu_fid sa_fid;
__u64 sa_valid;
__u64 sa_size;
__u64 sa_mtime;
__u32 cr_cap;
__u32 cr_flags; /* for use with open */
__u32 cr_mode;
- struct ll_fid cr_fid;
- struct ll_fid cr_replayfid;
+ struct lu_fid cr_fid;
+ struct lu_fid cr_replayfid;
__u64 cr_time;
__u64 cr_rdev;
__u32 cr_suppgid;
extern void lustre_swab_mds_rec_create (struct mds_rec_create *cr);
struct mds_rec_join {
- struct ll_fid jr_fid;
+ struct lu_fid jr_fid;
__u64 jr_headsize;
};
__u32 lk_cap;
__u32 lk_suppgid1;
__u32 lk_suppgid2;
- struct ll_fid lk_fid1;
- struct ll_fid lk_fid2;
+ struct lu_fid lk_fid1;
+ struct lu_fid lk_fid2;
__u64 lk_time;
__u32 lk_padding_1; /* also fix lustre_swab_mds_rec_link */
__u32 lk_padding_2; /* also fix lustre_swab_mds_rec_link */
__u32 ul_cap;
__u32 ul_suppgid;
__u32 ul_mode;
- struct ll_fid ul_fid1;
- struct ll_fid ul_fid2;
+ struct lu_fid ul_fid1;
+ struct lu_fid ul_fid2;
__u64 ul_time;
__u32 ul_padding_1; /* also fix lustre_swab_mds_rec_unlink */
__u32 ul_padding_2; /* also fix lustre_swab_mds_rec_unlink */
__u32 rn_cap;
__u32 rn_suppgid1;
__u32 rn_suppgid2;
- struct ll_fid rn_fid1;
- struct ll_fid rn_fid2;
+ struct lu_fid rn_fid1;
+ struct lu_fid rn_fid2;
__u64 rn_time;
__u32 rn_padding_1; /* also fix lustre_swab_mds_rec_rename */
__u32 rn_padding_2; /* also fix lustre_swab_mds_rec_rename */
struct llog_create_rec {
struct llog_rec_hdr lcr_hdr;
- struct ll_fid lcr_fid;
+ struct lu_fid lcr_fid;
obd_id lcr_oid;
obd_count lcr_ogen;
__u32 padding;
struct llog_size_change_rec {
struct llog_rec_hdr lsc_hdr;
- struct ll_fid lsc_fid;
+ struct lu_fid lsc_fid;
__u32 lsc_io_epoch;
__u32 padding;
struct llog_rec_tail lsc_tail;
};
struct mdc_op_data {
- struct ll_fid fid1;
- struct ll_fid fid2;
+ struct lu_fid fid1;
+ struct lu_fid fid2;
__u64 mod_time;
const char *name;
int namelen;
struct mds_update_record {
__u32 ur_opcode;
- struct ll_fid *ur_fid1;
- struct ll_fid *ur_fid2;
+ struct lu_fid *ur_fid1;
+ struct lu_fid *ur_fid2;
int ur_namelen;
char *ur_name;
int ur_tgtlen;
/* mds/handler.c */
#ifdef __KERNEL__
-struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
+struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct lu_fid *fid,
struct vfsmount **mnt, int lock_mode,
struct lustre_handle *lockh,
__u64 lockpart);
-struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
+struct dentry *mds_fid2dentry(struct mds_obd *mds, struct lu_fid *fid,
struct vfsmount **mnt);
int mds_update_server_data(struct obd_device *, int force_sync);
void it_set_disposition(struct lookup_intent *it, int flag);
int it_open_error(int phase, struct lookup_intent *it);
void mdc_set_lock_data(__u64 *lockh, void *data);
-int mdc_change_cbdata(struct obd_export *exp, struct ll_fid *fid,
+int mdc_change_cbdata(struct obd_export *exp, struct lu_fid *fid,
ldlm_iterator_t it, void *data);
int mdc_intent_lock(struct obd_export *exp,
struct mdc_op_data *,
struct obd_export *exp, struct lustre_md *md);
void mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md);
-int mdc_getstatus(struct obd_export *exp, struct ll_fid *rootfid);
-int mdc_getattr(struct obd_export *exp, struct ll_fid *fid,
+int mdc_getstatus(struct obd_export *exp, struct lu_fid *rootfid);
+int mdc_getattr(struct obd_export *exp, struct lu_fid *fid,
obd_valid valid, unsigned int ea_size,
struct ptlrpc_request **request);
-int mdc_getattr_name(struct obd_export *exp, struct ll_fid *fid,
+int mdc_getattr_name(struct obd_export *exp, struct lu_fid *fid,
const char *filename, int namelen, unsigned long valid,
unsigned int ea_size, struct ptlrpc_request **request);
int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data,
struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len,
struct ptlrpc_request **request);
-int mdc_setxattr(struct obd_export *exp, struct ll_fid *fid,
+int mdc_setxattr(struct obd_export *exp, struct lu_fid *fid,
obd_valid valid, const char *xattr_name,
const char *input, int input_size,
int output_size, int flags,
struct ptlrpc_request **request);
-int mdc_getxattr(struct obd_export *exp, struct ll_fid *fid,
+int mdc_getxattr(struct obd_export *exp, struct lu_fid *fid,
obd_valid valid, const char *xattr_name,
const char *input, int input_size,
int output_size, struct ptlrpc_request **request);
void mdc_clear_open_replay_data(struct obd_client_handle *och);
int mdc_close(struct obd_export *, struct obdo *, struct obd_client_handle *,
struct ptlrpc_request **);
-int mdc_readpage(struct obd_export *exp, struct ll_fid *mdc_fid, __u64 offset,
+int mdc_readpage(struct obd_export *exp, struct lu_fid *mdc_fid, __u64 offset,
struct page *, struct ptlrpc_request **);
int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
const void *data, int datalen, int mode, __u32 uid, __u32 gid,
int mdc_rename(struct obd_export *exp, struct mdc_op_data *data,
const char *old, int oldlen, const char *new, int newlen,
struct ptlrpc_request **request);
-int mdc_sync(struct obd_export *exp, struct ll_fid *fid,
+int mdc_sync(struct obd_export *exp, struct lu_fid *fid,
struct ptlrpc_request **);
int mdc_create_client(struct obd_uuid uuid, struct ptlrpc_client *cl);
int mdc_llog_process(struct obd_export *, char *logname, llog_cb_t, void *data);
int mdc_done_writing(struct obd_export *exp, struct obdo *);
-static inline void mdc_pack_fid(struct ll_fid *fid, obd_id ino, __u32 gen,
+static inline void mdc_pack_fid(struct lu_fid *fid, obd_id ino, __u32 gen,
int type)
{
fid->id = ino;
#include <libcfs/kp30.h>
#include <linux/lustre_ucache.h>
-#define LL_FID_NAMELEN (16 + 1 + 8 + 1)
+#define lu_fid_NAMELEN (16 + 1 + 8 + 1)
#if defined __KERNEL__
#include <linux/lustre_compat25.h>
}
#endif
-static inline int ll_fid2str(char *str, __u64 id, __u32 generation)
+static inline int lu_fid2str(char *str, __u64 id, __u32 generation)
{
return sprintf(str, "%llx:%08x", (unsigned long long)id, generation);
}
__u64 mds_io_epoch;
unsigned long mds_atime_diff;
struct semaphore mds_epoch_sem;
- struct ll_fid mds_rootfid;
+ struct lu_fid mds_rootfid;
struct lr_server_data *mds_server_data;
struct dentry *mds_pending_dir;
struct dentry *mds_logs_dir;
struct llu_inode_info *lli = llu_i2info(inode);
struct intnl_stat *st = llu_i2stat(inode);
struct llu_sb_info *sbi = llu_i2sbi(inode);
- struct ll_fid mdc_fid;
+ struct lu_fid mdc_fid;
__u64 offset;
int rc = 0;
struct ptlrpc_request *request;
struct llu_inode_info {
struct llu_sb_info *lli_sbi;
- struct ll_fid lli_fid;
+ struct lu_fid lli_fid;
struct lov_stripe_md *lli_smd;
char *lli_symlink_name;
#define LL_LOOKUP_POSITIVE 1
#define LL_LOOKUP_NEGATIVE 2
-static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode)
+static inline void ll_inode2fid(struct lu_fid *fid, struct inode *inode)
{
*fid = llu_i2info(inode)->lli_fid;
}
}
static struct inode* llu_new_inode(struct filesys *fs,
- struct ll_fid *fid)
+ struct lu_fid *fid)
{
struct inode *inode;
struct llu_inode_info *lli;
struct lustre_md md;
struct ptlrpc_request *req = NULL;
struct llu_sb_info *sbi = llu_i2sbi(inode);
- struct ll_fid fid;
+ struct lu_fid fid;
unsigned long valid = OBD_MD_FLGETATTR;
int rc, ealen = 0;
void llu_clear_inode(struct inode *inode)
{
- struct ll_fid fid;
+ struct lu_fid fid;
struct llu_inode_info *lli = llu_i2info(inode);
struct llu_sb_info *sbi = llu_i2sbi(inode);
ENTRY;
{
struct llu_inode_info *lli = llu_i2info(inode);
struct llu_sb_info *sbi = llu_i2sbi(inode);
- struct ll_fid fid;
+ struct lu_fid fid;
struct mds_body *body;
struct intnl_stat *st = llu_i2stat(inode);
int rc, symlen = st->st_size + 1;
struct inode *llu_iget(struct filesys *fs, struct lustre_md *md)
{
struct inode *inode;
- struct ll_fid fid;
+ struct lu_fid fid;
struct file_identifier fileid = {&fid, sizeof(fid)};
if ((md->body->valid &
struct inode *root;
struct pnode_base *rootpb;
struct obd_device *obd;
- struct ll_fid rootfid;
+ struct lu_fid rootfid;
struct llu_sb_info *sbi;
struct obd_statfs osfs;
static struct qstr noname = { NULL, 0, 0 };
static int ll_dir_readpage(struct file *file, struct page *page)
{
struct inode *inode = page->mapping->host;
- struct ll_fid mdc_fid;
+ struct lu_fid mdc_fid;
__u64 offset;
struct ptlrpc_request *request;
struct mds_body *body;
*/
case IOC_MDC_LOOKUP: {
struct ptlrpc_request *request = NULL;
- struct ll_fid fid;
+ struct lu_fid fid;
char *buf = NULL;
char *filename;
int namelen, rc, len = 0;
struct ptlrpc_request *request = NULL;
struct lov_user_md *lump = (struct lov_user_md *)arg;
struct lov_mds_md *lmm;
- struct ll_fid fid;
+ struct lu_fid fid;
struct mds_body *body;
int rc, lmmsize;
case IOC_MDC_GETFILEINFO:
case IOC_MDC_GETSTRIPE: {
struct ptlrpc_request *request = NULL;
- struct ll_fid fid;
+ struct lu_fid fid;
struct mds_body *body;
struct lov_user_md *lump;
struct lov_mds_md *lmm;
struct inode *inode = dentry->d_inode;
struct ll_inode_info *lli = ll_i2info(inode);
struct lov_stripe_md *lsm = lli->lli_smd;
- struct ll_fid fid;
+ struct lu_fid fid;
struct ptlrpc_request *req;
int rc, err;
ENTRY;
if (!ll_have_md_lock(dentry)) {
struct ptlrpc_request *req = NULL;
struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
- struct ll_fid fid;
+ struct lu_fid fid;
obd_valid valid = OBD_MD_FLGETATTR;
int ealen = 0;
return ll_s2mdcexp(inode->i_sb);
}
-static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode)
+static inline void ll_inode2fid(struct lu_fid *fid, struct inode *inode)
{
mdc_pack_fid(fid, inode->i_ino, inode->i_generation,
inode->i_mode & S_IFMT);
struct inode *root = 0;
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
- struct ll_fid rootfid;
+ struct lu_fid rootfid;
struct obd_statfs osfs;
struct ptlrpc_request *request = NULL;
struct lustre_handle osc_conn = {0, };
void ll_clear_inode(struct inode *inode)
{
- struct ll_fid fid;
+ struct lu_fid fid;
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
ENTRY;
switch(cmd) {
case EXT3_IOC_GETFLAGS: {
- struct ll_fid fid;
+ struct lu_fid fid;
struct mds_body *body;
ll_inode2fid(&fid, inode);
static int ll_nfs_test_inode(struct inode *inode, void *opaque)
#endif
{
- struct ll_fid *iid = opaque;
+ struct lu_fid *iid = opaque;
if (inode->i_ino == iid->id && inode->i_generation == iid->generation)
return 1;
{
struct ptlrpc_request *req = NULL;
struct ll_sb_info *sbi = ll_s2sbi(sb);
- struct ll_fid fid;
+ struct lu_fid fid;
unsigned long valid = 0;
int eadatalen = 0, rc;
struct inode *inode = NULL;
- struct ll_fid iid = { .id = ino, .generation = generation };
+ struct lu_fid iid = { .id = ino, .generation = generation };
inode = ILOOKUP(sb, ino, ll_nfs_test_inode, &iid);
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
- struct ll_fid fid;
+ struct lu_fid fid;
struct mds_body *body;
int rc, symlen = inode->i_size + 1;
ENTRY;
{
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *req;
- struct ll_fid fid;
+ struct lu_fid fid;
int xattr_type, rc;
ENTRY;
struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *req = NULL;
struct mds_body *body;
- struct ll_fid fid;
+ struct lu_fid fid;
void *xdata;
int xattr_type, rc;
ENTRY;
#include <linux/lustre_mds.h>
void mdc_pack_req_body(struct ptlrpc_request *req, int offset,
- __u64 valid, struct ll_fid *fid, int ea_size);
+ __u64 valid, struct lu_fid *fid, int ea_size);
void mdc_pack_rep_body(struct ptlrpc_request *);
void mdc_readdir_pack(struct ptlrpc_request *req, int pos, __u64 offset,
- __u32 size, struct ll_fid *mdc_fid);
+ __u32 size, struct lu_fid *mdc_fid);
void mdc_getattr_pack(struct ptlrpc_request *req, int valid, int offset,
int flags, struct mdc_op_data *data);
void mdc_setattr_pack(struct ptlrpc_request *req, int offset,
#endif
void mdc_readdir_pack(struct ptlrpc_request *req, int pos, __u64 offset,
- __u32 size, struct ll_fid *mdc_fid)
+ __u32 size, struct lu_fid *mdc_fid)
{
struct mds_body *b;
}
void mdc_pack_req_body(struct ptlrpc_request *req, int offset,
- __u64 valid, struct ll_fid *fid, int ea_size)
+ __u64 valid, struct lu_fid *fid, int ea_size)
{
struct mds_body *b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b));
}
EXPORT_SYMBOL(mdc_set_lock_data);
-int mdc_change_cbdata(struct obd_export *exp, struct ll_fid *fid,
+int mdc_change_cbdata(struct obd_export *exp, struct lu_fid *fid,
ldlm_iterator_t it, void *data)
{
struct ldlm_res_id res_id = { .name = {0} };
extern int mds_queue_req(struct ptlrpc_request *);
/* Helper that implements most of mdc_getstatus and signal_completed_replay. */
/* XXX this should become mdc_get_info("key"), sending MDS_GET_INFO RPC */
-static int send_getstatus(struct obd_import *imp, struct ll_fid *rootfid,
+static int send_getstatus(struct obd_import *imp, struct lu_fid *rootfid,
int level, int msg_flags)
{
struct ptlrpc_request *req;
}
/* This should be mdc_get_info("rootfid") */
-int mdc_getstatus(struct obd_export *exp, struct ll_fid *rootfid)
+int mdc_getstatus(struct obd_export *exp, struct lu_fid *rootfid)
{
return send_getstatus(class_exp2cliimp(exp), rootfid, LUSTRE_IMP_FULL,
0);
RETURN (0);
}
-int mdc_getattr(struct obd_export *exp, struct ll_fid *fid,
+int mdc_getattr(struct obd_export *exp, struct lu_fid *fid,
obd_valid valid, unsigned int ea_size,
struct ptlrpc_request **request)
{
RETURN (rc);
}
-int mdc_getattr_name(struct obd_export *exp, struct ll_fid *fid,
+int mdc_getattr_name(struct obd_export *exp, struct lu_fid *fid,
const char *filename, int namelen, unsigned long valid,
unsigned int ea_len, struct ptlrpc_request **request)
{
}
static
-int mdc_xattr_common(struct obd_export *exp, struct ll_fid *fid,
+int mdc_xattr_common(struct obd_export *exp, struct lu_fid *fid,
int opcode, obd_valid valid, const char *xattr_name,
const char *input, int input_size, int output_size,
int flags, struct ptlrpc_request **request)
goto out;
}
-int mdc_setxattr(struct obd_export *exp, struct ll_fid *fid,
+int mdc_setxattr(struct obd_export *exp, struct lu_fid *fid,
obd_valid valid, const char *xattr_name,
const char *input, int input_size,
int output_size, int flags,
input, input_size, output_size, flags, request);
}
-int mdc_getxattr(struct obd_export *exp, struct ll_fid *fid,
+int mdc_getxattr(struct obd_export *exp, struct lu_fid *fid,
obd_valid valid, const char *xattr_name,
const char *input, int input_size,
int output_size, struct ptlrpc_request **request)
RETURN(rc);
}
-int mdc_readpage(struct obd_export *exp, struct ll_fid *fid, __u64 offset,
+int mdc_readpage(struct obd_export *exp, struct lu_fid *fid, __u64 offset,
struct page *page, struct ptlrpc_request **request)
{
struct obd_import *imp = class_exp2cliimp(exp);
RETURN(rc);
}
-int mdc_sync(struct obd_export *exp, struct ll_fid *fid,
+int mdc_sync(struct obd_export *exp, struct lu_fid *fid,
struct ptlrpc_request **request)
{
struct ptlrpc_request *req;
RETURN(rc);
}
-
static int
__mdd_index_insert(struct mdd_device *mdd, struct mdd_object *pobj,
struct mdd_object *obj, const char *name,
RETURN(rc);
}
-static int mdd_root_get(struct md_device *m, struct ll_fid *f)
+static int mdd_root_get(struct md_device *m, struct lu_fid *f)
{
return 0;
}
const char *name, struct context *context,
void *handle);
int (*osd_object_dec_check)(struct lu_object *lu);
- int (*osd_index_insert)(struct lu_object *lu, struct ll_fid *fid,
+ int (*osd_index_insert)(struct lu_object *lu, struct lu_fid *fid,
const char *name, struct context *uctxt,
void *handle);
- int (*osd_insert_delete)(struct lu_object *lu, struct ll_fid *fid,
+ int (*osd_insert_delete)(struct lu_object *lu, struct lu_fid *fid,
const char *name, struct context *uctxt,
void *handle);
};
__u64 mdd_mount_count;
__u64 mdd_io_epoch;
unsigned long mdd_atime_diff;
- struct ll_fid mdd_rootfid;
+ struct lu_fid mdd_rootfid;
struct lr_server_data *mdd_server_data;
struct dentry *mdd_pending_dir;
struct dentry *mdd_logs_dir;
}
/* only valid locked dentries or errors should be returned */
-struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
+struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct lu_fid *fid,
struct vfsmount **mnt, int lock_mode,
struct lustre_handle *lockh,
__u64 lockpart)
/* Look up an entry by inode number. */
/* this function ONLY returns valid dget'd dentries with an initialized inode
or errors */
-struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
+struct dentry *mds_fid2dentry(struct mds_obd *mds, struct lu_fid *fid,
struct vfsmount **mnt)
{
char fid_name[32];
GOTO(cleanup, rc);
} else {
struct ldlm_lock *granted_lock;
- struct ll_fid child_fid;
+ struct lu_fid child_fid;
struct ldlm_resource *res;
DEBUG_REQ(D_DLMTRACE, req, "resent, not enqueuing new locks");
granted_lock = ldlm_handle2lock(child_lockh);
void *data)
{
struct obd_device *obd = data;
- struct ll_fid fid;
+ struct lu_fid fid;
fid.id = id;
fid.generation = gen;
return mds_fid2dentry(&obd->u.mds, &fid, NULL);
oa->o_id = filp->f_dentry->d_inode->i_ino;
oa->o_generation = filp->f_dentry->d_inode->i_generation;
- namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation);
+ namelen = lu_fid2str(fidname, oa->o_id, oa->o_generation);
down(&parent_inode->i_sem);
new_child = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
struct obd_device *obd = exp->exp_obd;
struct lvfs_run_ctxt saved;
struct lvfs_ucred ucred = { 0 };
- char fidname[LL_FID_NAMELEN];
+ char fidname[lu_fid_NAMELEN];
struct dentry *de;
void *handle;
int err, namelen, rc = 0;
ucred.luc_cap = current->cap_effective | CAP_SYS_RESOURCE;
push_ctxt(&saved, &obd->obd_lvfs_ctxt, &ucred);
- namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation);
+ namelen = lu_fid2str(fidname, oa->o_id, oa->o_generation);
down(&parent_inode->i_sem);
de = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
void mds_reconstruct_generic(struct ptlrpc_request *req);
void mds_req_from_mcd(struct ptlrpc_request *req, struct mds_client_data *mcd);
int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds,
- struct ll_fid *fid,
+ struct lu_fid *fid,
struct lustre_handle *parent_lockh,
struct dentry **dparentp, int parent_mode,
__u64 parent_lockpart,
struct lustre_handle *child_lockh);
int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode,
struct lov_mds_md *lmm, int lmm_size,
- struct llog_cookie *logcookies, struct ll_fid *fid);
+ struct llog_cookie *logcookies, struct lu_fid *fid);
int mds_get_parents_children_locked(struct obd_device *obd,
struct mds_obd *mds,
- struct ll_fid *p1_fid,
+ struct lu_fid *p1_fid,
struct dentry **de_srcdirp,
- struct ll_fid *p2_fid,
+ struct lu_fid *p2_fid,
struct dentry **de_tgtdirp,
int parent_mode,
const char *old_name, int old_len,
int lock);
int mds_pack_md(struct obd_device *, struct lustre_msg *, int offset,
struct mds_body *, struct inode *, int lock);
-void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode);
+void mds_pack_inode2fid(struct lu_fid *fid, struct inode *inode);
void mds_pack_inode2body(struct mds_body *body, struct inode *inode);
#endif
int mds_pack_acl(struct mds_export_data *med, struct inode *inode,
struct inode *tail_inode, *head_inode;
struct dentry *de_tailparent = NULL, *de_tail = NULL, *de_head = NULL;
struct lustre_handle dlm_handles[4] = {{0}, {0}, {0}, {0}};
- struct ll_fid head_fid;
+ struct lu_fid head_fid;
int rc;
ENTRY;
#include <linux/lustre_lib.h>
#include "mds_internal.h"
-void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode)
+void mds_pack_inode2fid(struct lu_fid *fid, struct inode *inode)
{
fid->id = inode->i_ino;
fid->generation = inode->i_generation;
RETURN(rc);
}
-static int mds_open_by_fid(struct ptlrpc_request *req, struct ll_fid *fid,
+static int mds_open_by_fid(struct ptlrpc_request *req, struct lu_fid *fid,
struct mds_body *body, int flags,
struct mds_update_record *rec,struct ldlm_reply *rep)
{
struct mds_obd *mds = mds_req2mds(req);
struct dentry *dchild;
- char fidname[LL_FID_NAMELEN];
+ char fidname[lu_fid_NAMELEN];
int fidlen = 0, rc;
void *handle = NULL;
ENTRY;
- fidlen = ll_fid2str(fidname, fid->id, fid->generation);
+ fidlen = lu_fid2str(fidname, fid->id, fid->generation);
dchild = ll_lookup_one_len(fidname, mds->mds_pending_dir, fidlen);
if (IS_ERR(dchild)) {
rc = PTR_ERR(dchild);
struct mds_file_data *mfd, int unlink_orphan)
{
struct inode *inode = mfd->mfd_dentry->d_inode;
- char fidname[LL_FID_NAMELEN];
+ char fidname[lu_fid_NAMELEN];
int last_orphan, fidlen, rc = 0, cleanup_phase = 0;
struct dentry *pending_child = NULL;
struct mds_obd *mds = &obd->u.mds;
reply_body = lustre_msg_buf(req->rq_repmsg, 0,
sizeof(*reply_body));
- fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation);
+ fidlen = lu_fid2str(fidname, inode->i_ino, inode->i_generation);
CDEBUG(D_INODE, "inode %p ino %s nlink %d orphan %d\n", inode, fidname,
inode->i_nlink, mds_orphan_open_count(inode));
int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode,
struct lov_mds_md *lmm, int lmm_size,
- struct llog_cookie *logcookies, struct ll_fid *fid)
+ struct llog_cookie *logcookies, struct lu_fid *fid)
{
struct mds_obd *mds = &obd->u.mds;
struct lov_stripe_md *lsm = NULL;
}
int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds,
- struct ll_fid *fid,
+ struct lu_fid *fid,
struct lustre_handle *parent_lockh,
struct dentry **dparentp, int parent_mode,
__u64 parent_lockpart,
struct inode *pending_dir = mds->mds_pending_dir->d_inode;
struct inode *inode = dentry->d_inode;
struct dentry *pending_child;
- char fidname[LL_FID_NAMELEN];
+ char fidname[lu_fid_NAMELEN];
int fidlen = 0, rc, mode;
ENTRY;
#endif
LASSERT(down_trylock(&pending_dir->i_sem) != 0);
- fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation);
+ fidlen = lu_fid2str(fidname, inode->i_ino, inode->i_generation);
CDEBUG(D_INODE, "pending destroy of %dx open %d linked %s %s = %s\n",
mds_orphan_open_count(inode), inode->i_nlink,
*/
int mds_get_parents_children_locked(struct obd_device *obd,
struct mds_obd *mds,
- struct ll_fid *p1_fid,
+ struct lu_fid *p1_fid,
struct dentry **de_srcdirp,
- struct ll_fid *p2_fid,
+ struct lu_fid *p2_fid,
struct dentry **de_tgtdirp,
int parent_mode,
const char *old_name, int old_len,
};
struct md_device_operations {
- int (*mdo_root_get)(struct md_device *m, struct ll_fid *f);
+ int (*mdo_root_get)(struct md_device *m, struct lu_fid *f);
int (*mdo_mkdir)(struct md_object *o, const char *name,
struct md_object *child);
};
};
-int fid_lock(const struct ll_fid *, struct lustre_handle *, ldlm_mode_t);
-void fid_unlock(const struct ll_fid *, struct lustre_handle *, ldlm_mode_t);
+int fid_lock(const struct lu_fid *, struct lustre_handle *, ldlm_mode_t);
+void fid_unlock(const struct lu_fid *, struct lustre_handle *, ldlm_mode_t);
#endif /* __KERNEL__ */
#endif /* _MDT_H */
}
-int fid_lock(const struct ll_fid *f, struct lustre_handle *lh, ldlm_mode_t mode)
+int fid_lock(const struct lu_fid *f, struct lustre_handle *lh, ldlm_mode_t mode)
{
return 0;
}
-void fid_unlock(const struct ll_fid *f,
+void fid_unlock(const struct lu_fid *f,
struct lustre_handle *lh, ldlm_mode_t mode)
{
}
return container_of(o, struct mdt_object, mot_obj.mo_lu);
}
-struct mdt_object *mdt_object_find(struct mdt_device *d, struct ll_fid *f)
+struct mdt_object *mdt_object_find(struct mdt_device *d, struct lu_fid *f)
{
struct lu_object *o;
lu_object_put(&o->mot_obj.mo_lu);
}
-static struct ll_fid *mdt_object_fid(struct mdt_object *o)
+static struct lu_fid *mdt_object_fid(struct mdt_object *o)
{
return lu_object_fid(&o->mot_obj.mo_lu);
}
}
}
-struct mdt_object *mdt_object_find_lock(struct mdt_device *d, struct ll_fid *f,
+struct mdt_object *mdt_object_find_lock(struct mdt_device *d, struct lu_fid *f,
struct mdt_lock_handle *lh)
{
struct mdt_object *o;
}
int mdt_mkdir(struct mdt_thread_info *info, struct mdt_device *d,
- struct ll_fid *pfid, const char *name, struct ll_fid *cfid)
+ struct lu_fid *pfid, const char *name, struct lu_fid *cfid)
{
struct mdt_object *o;
struct mdt_object *child;
/* Look up an entry by inode number. */
/* this function ONLY returns valid dget'd dentries with an initialized inode
or errors */
-static struct dentry *mgs_fid2dentry(struct mgs_obd *mgs, struct ll_fid *fid)
+static struct dentry *mgs_fid2dentry(struct mgs_obd *mgs, struct lu_fid *fid)
{
char fid_name[32];
unsigned long ino = fid->id;
void *data)
{
struct obd_device *obd = data;
- struct ll_fid fid;
+ struct lu_fid fid;
fid.id = id;
fid.generation = gen;
return mgs_fid2dentry(&obd->u.mgs, &fid);
}
EXPORT_SYMBOL(lustre_swab_llogd_conn_body);
-void lustre_swab_ll_fid(struct ll_fid *fid)
+void lustre_swab_lu_fid(struct lu_fid *fid)
{
__swab64s (&fid->id);
__swab32s (&fid->generation);
__swab32s (&fid->f_type);
}
-EXPORT_SYMBOL(lustre_swab_ll_fid);
+EXPORT_SYMBOL(lustre_swab_lu_fid);
void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail)
{
struct llog_size_change_rec *lsc =
(struct llog_size_change_rec *)rec;
- lustre_swab_ll_fid(&lsc->lsc_fid);
+ lustre_swab_lu_fid(&lsc->lsc_fid);
__swab32s(&lsc->lsc_io_epoch);
break;
}
EXPORT_SYMBOL(lu_object_put);
-struct lu_object *lu_object_alloc(struct lu_site *s, const struct ll_fid *f)
+struct lu_object *lu_object_alloc(struct lu_site *s, const struct lu_fid *f)
{
struct lu_object *scan;
struct lu_object *top;
static struct lu_object *htable_lookup(struct lu_site *s,
const struct hlist_head *bucket,
- const struct ll_fid *f)
+ const struct lu_fid *f)
{
struct lu_object_header *h;
struct hlist_node *scan;
return NULL;
}
-static __u32 fid_hash(const struct ll_fid *f)
+static __u32 fid_hash(const struct lu_fid *f)
{
return f->id + f->generation + f->f_type;
}
-struct lu_object *lu_object_find(struct lu_site *s, const struct ll_fid *f)
+struct lu_object *lu_object_find(struct lu_site *s, const struct lu_fid *f)
{
struct lu_object *o;
struct lu_object *shadow;
OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME)
struct filter_fid {
- struct ll_fid ff_fid;
+ struct lu_fid ff_fid;
__u64 ff_objid;
__u64 ff_group;
};
__u32 ofd_epoch;
};
int filter_log_sz_change(struct llog_handle *cathandle,
- struct ll_fid *mds_fid,
+ struct lu_fid *mds_fid,
__u32 io_epoch,
struct llog_cookie *logcookie,
struct inode *inode);
#include "filter_internal.h"
int filter_log_sz_change(struct llog_handle *cathandle,
- struct ll_fid *mds_fid,
+ struct lu_fid *mds_fid,
__u32 io_epoch,
struct llog_cookie *logcookie,
struct inode *inode)
void lustre_swab_mds_body (struct mds_body *b)
{
- lustre_swab_ll_fid (&b->fid1);
- lustre_swab_ll_fid (&b->fid2);
+ lustre_swab_lu_fid (&b->fid1);
+ lustre_swab_lu_fid (&b->fid2);
/* handle is opaque */
__swab64s (&b->valid);
__swab64s (&b->size);
__swab32s (&sa->sa_cap);
__swab32s (&sa->sa_suppgid);
__swab32s (&sa->sa_mode);
- lustre_swab_ll_fid (&sa->sa_fid);
+ lustre_swab_lu_fid (&sa->sa_fid);
__swab64s (&sa->sa_valid);
__swab64s (&sa->sa_size);
__swab64s (&sa->sa_mtime);
void lustre_swab_mds_rec_join (struct mds_rec_join *jr)
{
__swab64s(&jr->jr_headsize);
- lustre_swab_ll_fid(&jr->jr_fid);
+ lustre_swab_lu_fid(&jr->jr_fid);
}
void lustre_swab_mds_rec_create (struct mds_rec_create *cr)
__swab32s (&cr->cr_cap);
__swab32s (&cr->cr_flags); /* for use with open */
__swab32s (&cr->cr_mode);
- lustre_swab_ll_fid (&cr->cr_fid);
- lustre_swab_ll_fid (&cr->cr_replayfid);
+ lustre_swab_lu_fid (&cr->cr_fid);
+ lustre_swab_lu_fid (&cr->cr_replayfid);
__swab64s (&cr->cr_time);
__swab64s (&cr->cr_rdev);
__swab32s (&cr->cr_suppgid);
__swab32s (&lk->lk_cap);
__swab32s (&lk->lk_suppgid1);
__swab32s (&lk->lk_suppgid2);
- lustre_swab_ll_fid (&lk->lk_fid1);
- lustre_swab_ll_fid (&lk->lk_fid2);
+ lustre_swab_lu_fid (&lk->lk_fid1);
+ lustre_swab_lu_fid (&lk->lk_fid2);
__swab64s (&lk->lk_time);
CLASSERT(offsetof(typeof(*lk), lk_padding_1) != 0);
CLASSERT(offsetof(typeof(*lk), lk_padding_2) != 0);
__swab32s (&ul->ul_cap);
__swab32s (&ul->ul_suppgid);
__swab32s (&ul->ul_mode);
- lustre_swab_ll_fid (&ul->ul_fid1);
- lustre_swab_ll_fid (&ul->ul_fid2);
+ lustre_swab_lu_fid (&ul->ul_fid1);
+ lustre_swab_lu_fid (&ul->ul_fid2);
__swab64s (&ul->ul_time);
CLASSERT(offsetof(typeof(*ul), ul_padding_1) != 0);
CLASSERT(offsetof(typeof(*ul), ul_padding_2) != 0);
__swab32s (&rn->rn_cap);
__swab32s (&rn->rn_suppgid1);
__swab32s (&rn->rn_suppgid2);
- lustre_swab_ll_fid (&rn->rn_fid1);
- lustre_swab_ll_fid (&rn->rn_fid2);
+ lustre_swab_lu_fid (&rn->rn_fid1);
+ lustre_swab_lu_fid (&rn->rn_fid2);
__swab64s (&rn->rn_time);
CLASSERT(offsetof(typeof(*rn), rn_padding_1) != 0);
CLASSERT(offsetof(typeof(*rn), rn_padding_2) != 0);
LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, " found %lld\n",
(long long)(int)sizeof(((struct ost_body *)0)->oa));
- /* Checks for struct ll_fid */
- LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
- (long long)(int)sizeof(struct ll_fid));
- LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
- (long long)(int)offsetof(struct ll_fid, id));
- LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
- (long long)(int)sizeof(((struct ll_fid *)0)->id));
- LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
- (long long)(int)offsetof(struct ll_fid, generation));
- LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct ll_fid *)0)->generation));
- LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
- (long long)(int)offsetof(struct ll_fid, f_type));
- LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
+ /* Checks for struct lu_fid */
+ LASSERTF((int)sizeof(struct lu_fid) == 16, " found %lld\n",
+ (long long)(int)sizeof(struct lu_fid));
+ LASSERTF((int)offsetof(struct lu_fid, id) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid, id));
+ LASSERTF((int)sizeof(((struct lu_fid *)0)->id) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid *)0)->id));
+ LASSERTF((int)offsetof(struct lu_fid, generation) == 8, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid, generation));
+ LASSERTF((int)sizeof(((struct lu_fid *)0)->generation) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid *)0)->generation));
+ LASSERTF((int)offsetof(struct lu_fid, f_type) == 12, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid, f_type));
+ LASSERTF((int)sizeof(((struct lu_fid *)0)->f_type) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid *)0)->f_type));
/* Checks for struct mds_status_req */
LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
}
static void
-check_ll_fid(void)
+check_lu_fid(void)
{
BLANK_LINE();
- CHECK_STRUCT(ll_fid);
- CHECK_MEMBER(ll_fid, id);
- CHECK_MEMBER(ll_fid, generation);
- CHECK_MEMBER(ll_fid, f_type);
+ CHECK_STRUCT(lu_fid);
+ CHECK_MEMBER(lu_fid, id);
+ CHECK_MEMBER(lu_fid, generation);
+ CHECK_MEMBER(lu_fid, f_type);
}
static void
check_obd_quotactl();
check_niobuf_remote();
check_ost_body();
- check_ll_fid();
+ check_lu_fid();
check_mds_status_req();
check_mds_body();
check_mds_rec_setattr();
LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, " found %lld\n",
(long long)(int)sizeof(((struct ost_body *)0)->oa));
- /* Checks for struct ll_fid */
- LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
- (long long)(int)sizeof(struct ll_fid));
- LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
- (long long)(int)offsetof(struct ll_fid, id));
- LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
- (long long)(int)sizeof(((struct ll_fid *)0)->id));
- LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
- (long long)(int)offsetof(struct ll_fid, generation));
- LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct ll_fid *)0)->generation));
- LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
- (long long)(int)offsetof(struct ll_fid, f_type));
- LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
- (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
+ /* Checks for struct lu_fid */
+ LASSERTF((int)sizeof(struct lu_fid) == 16, " found %lld\n",
+ (long long)(int)sizeof(struct lu_fid));
+ LASSERTF((int)offsetof(struct lu_fid, id) == 0, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid, id));
+ LASSERTF((int)sizeof(((struct lu_fid *)0)->id) == 8, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid *)0)->id));
+ LASSERTF((int)offsetof(struct lu_fid, generation) == 8, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid, generation));
+ LASSERTF((int)sizeof(((struct lu_fid *)0)->generation) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid *)0)->generation));
+ LASSERTF((int)offsetof(struct lu_fid, f_type) == 12, " found %lld\n",
+ (long long)(int)offsetof(struct lu_fid, f_type));
+ LASSERTF((int)sizeof(((struct lu_fid *)0)->f_type) == 4, " found %lld\n",
+ (long long)(int)sizeof(((struct lu_fid *)0)->f_type));
/* Checks for struct mds_status_req */
LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",