From: yury Date: Wed, 5 Apr 2006 18:09:24 +0000 (+0000) Subject: - preparation before converting client to new fids X-Git-Tag: v1_8_0_110~486^2~2098 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3d12bbc8a775ff1cdcc3f39d5398990fa11541f5;p=fs%2Flustre-release.git - preparation before converting client to new fids --- diff --git a/lustre/include/linux/Makefile.am b/lustre/include/linux/Makefile.am index 44e4faa..6e7c215 100644 --- a/lustre/include/linux/Makefile.am +++ b/lustre/include/linux/Makefile.am @@ -13,6 +13,6 @@ EXTRA_DIST = lprocfs_status.h lustre_debug.h lustre_ha.h lustre_lib.h \ obd_cache.h obd_lov.h lustre_dlm.h lustre_handles.h lustre_disk.h \ lustre_net.h obd_class.h obd_ost.h obd_support.h lustre_commit_confd.h \ lustre_export.h lustre_log.h obd_echo.h \ - lustre_compat25.h lustre_fsfilt.h lustre_import.h lustre_mds.h obd.h \ - lvfs.h lvfs_linux.h lustre_cfg.h lustre_lite.h lustre_idl.h \ + lustre_compat25.h lustre_fsfilt.h lustre_import.h lustre_mds.h lustre_mdc.h \ + lustre_acl.h obd.h lvfs.h lvfs_linux.h lustre_cfg.h lustre_lite.h lustre_idl.h \ lustre_quota.h lustre_ucache.h lustre_ver.h.in lustre_param.h lu_object.h diff --git a/lustre/include/linux/lustre_acl.h b/lustre/include/linux/lustre_acl.h new file mode 100644 index 0000000..8d26910 --- /dev/null +++ b/lustre/include/linux/lustre_acl.h @@ -0,0 +1,36 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * This file is part of Lustre, http://www.lustre.org + * + * MDS data structures. + * See also lustre_idl.h for wire formats of requests. + */ + +#ifndef _LUSTRE_ACL_H +#define _LUSTRE_ACL_H + +#ifdef __KERNEL__ +# include +# include +# ifdef CONFIG_FS_POSIX_ACL +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_FS_POSIX_ACL +#define LUSTRE_POSIX_ACL_MAX_ENTRIES (32) +#define LUSTRE_POSIX_ACL_MAX_SIZE \ + (xattr_acl_size(LUSTRE_POSIX_ACL_MAX_ENTRIES)) +#else +#define LUSTRE_POSIX_ACL_MAX_SIZE 0 +#endif + +#endif diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h index 1675a5c..2ec499f 100644 --- a/lustre/include/linux/lustre_idl.h +++ b/lustre/include/linux/lustre_idl.h @@ -629,9 +629,20 @@ struct lu_fid { __u16 f_num; /* holds fid number. */ }; -#define fid_seq(fid) ((fid)->f_seq) -#define fid_num(fid) ((fid)->f_num) -#define fid_wid(fid) ((fid)->f_wid) +static inline __u32 fid_seq(const struct lu_fid *fid) +{ + return fid->f_seq; +} + +static inline __u16 fid_wid(const struct lu_fid *fid) +{ + return fid->f_wid; +} + +static inline __u16 fid_num(const struct lu_fid *fid) +{ + return fid->f_num; +} #define DFID2 "%lu/%u" diff --git a/lustre/include/linux/lustre_lite.h b/lustre/include/linux/lustre_lite.h index 146bae0..389f1f8 100644 --- a/lustre/include/linux/lustre_lite.h +++ b/lustre/include/linux/lustre_lite.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/lustre/include/linux/lustre_mdc.h b/lustre/include/linux/lustre_mdc.h new file mode 100644 index 0000000..4aaa8c3 --- /dev/null +++ b/lustre/include/linux/lustre_mdc.h @@ -0,0 +1,141 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * This file is part of Lustre, http://www.lustre.org + * + * MDS data structures. + * See also lustre_idl.h for wire formats of requests. + */ + +#ifndef _LUSTRE_MDC_H +#define _LUSTRE_MDC_H + +#ifdef __KERNEL__ +# include +# include +# ifdef CONFIG_FS_POSIX_ACL +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include + +struct ptlrpc_client; +struct obd_export; +struct ptlrpc_request; +struct obd_device; + +struct lustre_md { + struct mds_body *body; + struct lov_stripe_md *lsm; +#ifdef CONFIG_FS_POSIX_ACL + struct posix_acl *posix_acl; +#endif +}; + +struct mdc_op_data { + struct ll_fid fid1; + struct ll_fid fid2; + __u64 mod_time; + const char *name; + int namelen; + __u32 create_mode; + __u32 suppgids[2]; +}; + +/* mdc/mdc_locks.c */ +int it_disposition(struct lookup_intent *it, int flag); +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, + ldlm_iterator_t it, void *data); +int mdc_intent_lock(struct obd_export *exp, + struct mdc_op_data *, + void *lmm, int lmmsize, + struct lookup_intent *, int, + struct ptlrpc_request **reqp, + ldlm_blocking_callback cb_blocking, int extra_lock_flags); +int mdc_enqueue(struct obd_export *exp, + int lock_type, + struct lookup_intent *it, + int lock_mode, + struct mdc_op_data *data, + struct lustre_handle *lockh, + void *lmm, + int lmmlen, + ldlm_completion_callback cb_completion, + ldlm_blocking_callback cb_blocking, + void *cb_data, int extra_lock_flags); + +/* mdc/mdc_request.c */ +int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp); + +int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, + 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, + obd_valid valid, unsigned int ea_size, + struct ptlrpc_request **request); +int mdc_getattr_name(struct obd_export *exp, struct ll_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, + 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, + obd_valid valid, const char *xattr_name, + const char *input, int input_size, + int output_size, struct ptlrpc_request **request); +int mdc_open(struct obd_export *exp, obd_id ino, int type, int flags, + struct lov_mds_md *lmm, int lmm_size, struct lustre_handle *fh, + struct ptlrpc_request **); +struct obd_client_handle; +void mdc_set_open_replay_data(struct obd_client_handle *och, + struct ptlrpc_request *open_req); +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, + 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, + __u32 cap_effective, __u64 rdev,struct ptlrpc_request **request); +int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, + struct ptlrpc_request **request); +int mdc_link(struct obd_export *exp, struct mdc_op_data *data, + struct ptlrpc_request **); +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, + struct ptlrpc_request **); +int mdc_create_client(struct obd_uuid uuid, struct ptlrpc_client *cl); + +/* Store the generation of a newly-created inode in |req| for replay. */ +void mdc_store_inode_generation(struct ptlrpc_request *req, int reqoff, + int repoff); +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, + int type) +{ + fid->id = ino; + fid->generation = gen; + fid->f_type = type; +} + +#endif diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h index eba9531..97f089c 100644 --- a/lustre/include/linux/lustre_mds.h +++ b/lustre/include/linux/lustre_mds.h @@ -13,9 +13,6 @@ #ifdef __KERNEL__ # include # include -# ifdef CONFIG_FS_POSIX_ACL -# include -# endif #endif #include #include @@ -25,32 +22,9 @@ #include #include -struct ldlm_lock_desc; struct mds_obd; -struct ptlrpc_connection; -struct ptlrpc_client; -struct obd_export; struct ptlrpc_request; struct obd_device; -struct ll_file_data; - -struct lustre_md { - struct mds_body *body; - struct lov_stripe_md *lsm; -#ifdef CONFIG_FS_POSIX_ACL - struct posix_acl *posix_acl; -#endif -}; - -struct mdc_op_data { - struct ll_fid fid1; - struct ll_fid fid2; - __u64 mod_time; - const char *name; - int namelen; - __u32 create_mode; - __u32 suppgids[2]; -}; struct mds_update_record { __u32 ur_opcode; @@ -83,15 +57,6 @@ struct mds_file_data { struct dentry *mfd_dentry; }; -/* ACL */ -#ifdef CONFIG_FS_POSIX_ACL -#define LUSTRE_POSIX_ACL_MAX_ENTRIES (32) -#define LUSTRE_POSIX_ACL_MAX_SIZE \ - (xattr_acl_size(LUSTRE_POSIX_ACL_MAX_ENTRIES)) -#else -#define LUSTRE_POSIX_ACL_MAX_SIZE 0 -#endif - /* mds/mds_reint.c */ int mds_reint_rec(struct mds_update_record *r, int offset, struct ptlrpc_request *req, struct lustre_handle *); @@ -111,98 +76,6 @@ int mds_fs_setup(struct obd_device *obddev, struct vfsmount *mnt); int mds_fs_cleanup(struct obd_device *obddev); #endif -/* mds/mds_lov.c */ - -/* mdc/mdc_locks.c */ -int it_disposition(struct lookup_intent *it, int flag); -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, - ldlm_iterator_t it, void *data); -int mdc_intent_lock(struct obd_export *exp, - struct mdc_op_data *, - void *lmm, int lmmsize, - struct lookup_intent *, int, - struct ptlrpc_request **reqp, - ldlm_blocking_callback cb_blocking, int extra_lock_flags); -int mdc_enqueue(struct obd_export *exp, - int lock_type, - struct lookup_intent *it, - int lock_mode, - struct mdc_op_data *data, - struct lustre_handle *lockh, - void *lmm, - int lmmlen, - ldlm_completion_callback cb_completion, - ldlm_blocking_callback cb_blocking, - void *cb_data, int extra_lock_flags); - -/* mdc/mdc_request.c */ -int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp); - -int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, - 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, - obd_valid valid, unsigned int ea_size, - struct ptlrpc_request **request); -int mdc_getattr_name(struct obd_export *exp, struct ll_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, - 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, - obd_valid valid, const char *xattr_name, - const char *input, int input_size, - int output_size, struct ptlrpc_request **request); -int mdc_open(struct obd_export *exp, obd_id ino, int type, int flags, - struct lov_mds_md *lmm, int lmm_size, struct lustre_handle *fh, - struct ptlrpc_request **); -struct obd_client_handle; -void mdc_set_open_replay_data(struct obd_client_handle *och, - struct ptlrpc_request *open_req); -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, - 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, - __u32 cap_effective, __u64 rdev,struct ptlrpc_request **request); -int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data, - struct ptlrpc_request **request); -int mdc_link(struct obd_export *exp, struct mdc_op_data *data, - struct ptlrpc_request **); -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, - struct ptlrpc_request **); -int mdc_create_client(struct obd_uuid uuid, struct ptlrpc_client *cl); - -/* Store the generation of a newly-created inode in |req| for replay. */ -void mdc_store_inode_generation(struct ptlrpc_request *req, int reqoff, - int repoff); -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, - int type) -{ - fid->id = ino; - fid->generation = gen; - fid->f_type = type; -} - /* ioctls for trying requests */ #define IOC_REQUEST_TYPE 'f' #define IOC_REQUEST_MIN_NR 30 diff --git a/lustre/include/linux/lvfs.h b/lustre/include/linux/lvfs.h index 858e3f5..4d0250c 100644 --- a/lustre/include/linux/lvfs.h +++ b/lustre/include/linux/lvfs.h @@ -142,9 +142,4 @@ static inline void ll_sleep(int t) } #endif -static inline int ll_fid2str(char *str, __u64 id, __u32 generation) -{ - return sprintf(str, "%llx:%08x", (unsigned long long)id, generation); -} - #endif diff --git a/lustre/liblustre/llite_lib.h b/lustre/liblustre/llite_lib.h index b853899..77a38b7 100644 --- a/lustre/liblustre/llite_lib.h +++ b/lustre/liblustre/llite_lib.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 8102e50..3c6a445 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include "llite_internal.h" diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index 91b77f8..420e232 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -25,7 +25,7 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include +#include #include #include "llite_internal.h" diff --git a/lustre/llite/llite_fid.c b/lustre/llite/llite_fid.c index 48eec2e..e3a9648 100644 --- a/lustre/llite/llite_fid.c +++ b/lustre/llite/llite_fid.c @@ -3,7 +3,7 @@ * * Lustre Light Super operations * - * Copyright (c) 2002-2005 Cluster File Systems, Inc. + * Copyright (c) 2006 Cluster File Systems, Inc. * * This file is part of Lustre, http://www.lustre.org. * diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index 2e77ba8..3b0e6c5 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -44,7 +44,7 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include +#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 81c4eda..7de5c53 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -43,7 +43,7 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include +#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw24.c b/lustre/llite/rw24.c index b9ca5cd..af1f1e3 100644 --- a/lustre/llite/rw24.c +++ b/lustre/llite/rw24.c @@ -44,7 +44,7 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include +#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index f9699ed..2c333e5 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -46,7 +46,7 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include +#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index da0a951..8a97ab6 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include "llite_internal.h" diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index 9459b51..5f62042 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -1,4 +1,4 @@ -#include +#include void mdc_pack_req_body(struct ptlrpc_request *req, int offset, __u64 valid, struct ll_fid *fid, int ea_size); void mdc_pack_rep_body(struct ptlrpc_request *); diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index 1f614df..8b829da 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -29,7 +29,7 @@ #endif #include #include -#include +#include #include "mdc_internal.h" #ifndef __KERNEL__ diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 0d85c2e..f17bc9c 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -37,7 +37,8 @@ #endif #include -#include +#include +#include #include #include #include "mdc_internal.h" diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index c586b64..22af6dc 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -36,7 +36,7 @@ #endif #include -#include +#include #include "mdc_internal.h" /* mdc_setattr does its own semaphore handling */ diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index c647c90..7886564 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -37,7 +37,8 @@ #endif #include -#include +#include +#include #include #include #include "mdc_internal.h" diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 823e36e..21928cf 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c index 0ff7870..bc3a0f2 100644 --- a/lustre/mds/mds_fs.c +++ b/lustre/mds/mds_fs.c @@ -672,7 +672,7 @@ int mds_obd_create(struct obd_export *exp, struct obdo *oa, 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 = mds_fid2str(fidname, oa->o_id, oa->o_generation); down(&parent_inode->i_sem); new_child = lookup_one_len(fidname, mds->mds_objects_dir, namelen); @@ -739,7 +739,7 @@ int mds_obd_destroy(struct obd_export *exp, struct obdo *oa, 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 = mds_fid2str(fidname, oa->o_id, oa->o_generation); down(&parent_inode->i_sem); de = lookup_one_len(fidname, mds->mds_objects_dir, namelen); diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h index 38eb3c9..4c27432 100644 --- a/lustre/mds/mds_internal.h +++ b/lustre/mds/mds_internal.h @@ -249,4 +249,9 @@ extern quota_interface_t *quota_interface; int mds_setxattr(struct ptlrpc_request *req); int mds_getxattr(struct ptlrpc_request *req); +static inline int mds_fid2str(char *str, __u64 id, __u32 generation) +{ + return sprintf(str, "%llx:%08x", (unsigned long long)id, generation); +} + #endif /* _MDS_INTERNAL_H */ diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 4586573..41f4987 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -768,7 +768,7 @@ static int mds_open_by_fid(struct ptlrpc_request *req, struct ll_fid *fid, void *handle = NULL; ENTRY; - fidlen = ll_fid2str(fidname, fid->id, fid->generation); + fidlen = mds_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); @@ -1176,7 +1176,7 @@ int mds_mfd_close(struct ptlrpc_request *req, int offset,struct obd_device *obd, reply_body = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*reply_body)); - fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation); + fidlen = mds_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)); diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 4e4c2ce..70b0d16 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -1366,7 +1366,7 @@ static int mds_orphan_add_link(struct mds_update_record *rec, #endif LASSERT(down_trylock(&pending_dir->i_sem) != 0); - fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation); + fidlen = mds_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, diff --git a/lustre/mdt/autoMakefile.am b/lustre/mdt/autoMakefile.am index 22c79cf..1f3e5ce 100644 --- a/lustre/mdt/autoMakefile.am +++ b/lustre/mdt/autoMakefile.am @@ -8,4 +8,4 @@ modulefs_DATA = mdt$(KMODEXT) endif MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ -DIST_SOURCES := $(mdt-objs:%.o=%.c) #mdt.h +DIST_SOURCES := $(mdt-objs:%.o=%.c) #mdt_internal.h diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index dc11c06..59e4a10 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -55,7 +55,7 @@ /* struct mds_client_data */ #include "../mds/mds_internal.h" -#include "mdt.h" +#include "mdt_internal.h" /* * Initialized in mdt_mod_init(). @@ -696,7 +696,8 @@ static int mdt_intent_policy(struct ldlm_namespace *ns, struct ldlm_lock **lockp, void *req_cookie, ldlm_mode_t mode, int flags, void *data) { - return ELDLM_LOCK_ABORTED; + ENTRY; + RETURN(ELDLM_LOCK_ABORTED); } struct ptlrpc_service *ptlrpc_init_svc_conf(struct ptlrpc_service_conf *c, diff --git a/lustre/mdt/mdt.h b/lustre/mdt/mdt_internal.h similarity index 74% rename from lustre/mdt/mdt.h rename to lustre/mdt/mdt_internal.h index 694f743..45ac9e0 100644 --- a/lustre/mdt/mdt.h +++ b/lustre/mdt/mdt_internal.h @@ -1,9 +1,37 @@ /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- * vim:expandtab:shiftwidth=8:tabstop=8: + * + * lustre/mds/handler.c + * Lustre Metadata Target (mdt) request handler + * + * Copyright (c) 2006 Cluster File Systems, Inc. + * Author: Peter Braam + * Author: Andreas Dilger + * Author: Phil Schwan + * Author: Mike Shaver + * Author: Nikita Danilov + * + * This file is part of the Lustre file system, http://www.lustre.org + * Lustre is a trademark of Cluster File Systems, Inc. + * + * You may have signed or agreed to another license before downloading + * this software. If so, you are bound by the terms and conditions + * of that agreement, and the following does not apply to you. See the + * LICENSE file included with this distribution for more information. + * + * If you did not agree to a different license, then this copy of Lustre + * is open source software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * In either case, Lustre is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * license text for more details. */ -#ifndef _MDT_H -#define _MDT_H +#ifndef _MDT_INTERNAL_H +#define _MDT_INTERNAL_H #if defined(__KERNEL__) diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index b8de51e..969c6bc 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -938,8 +938,10 @@ static int mgs_write_log_mdt(struct obd_device *obd, struct fs_db *fsdb, struct mgs_target_info *mti) { struct llog_handle *llh = NULL; - char *cliname, *mdcname, *lovname, *nodeuuid, *mdcuuid; - int rc, i, first_log = 0; +// char *mdcname, **nodeuuid, *mdcuuid; + char *cliname, *lovname; + int rc, first_log = 0; +// int i; ENTRY; CDEBUG(D_MGS, "writing new mdt %s\n", mti->mti_svname); @@ -1029,7 +1031,7 @@ static int mgs_write_log_mdt(struct obd_device *obd, struct fs_db *fsdb, // mgs_write_log_mdc(...); //END PROTO - + RETURN(rc); }