From 623bc9248cb8f859923a5360dee09833f24f313e Mon Sep 17 00:00:00 2001 From: pschwan Date: Fri, 4 Jul 2003 08:56:57 +0000 Subject: [PATCH] merge b_orphan into b_merge, with orphan code disabled --- lnet/include/linux/portals_compat25.h | 19 +++++++++++++++---- lnet/include/lnet/internal.h | 2 -- lnet/include/lnet/list.h | 7 +++++-- lnet/include/lnet/myrnal.h | 3 --- lnet/include/lnet/nal.h | 2 -- lnet/include/lnet/ppid.h | 3 --- lnet/include/lnet/stringtab.h | 2 -- lnet/lnet/api-init.c | 2 +- lustre/liblustre/file.c | 2 +- lustre/mdc/mdc_internal.h | 23 ++++++++++++----------- lustre/mds/mds_internal.h | 13 ++++++++++--- lustre/mds/mds_lib.c | 8 ++++++++ lustre/obdclass/simple.c | 1 - lustre/portals/include/linux/portals_compat25.h | 19 +++++++++++++++---- lustre/portals/include/portals/list.h | 7 +++++-- lustre/portals/include/portals/myrnal.h | 3 --- lustre/portals/include/portals/nal.h | 2 -- lustre/portals/include/portals/ppid.h | 3 --- lustre/portals/include/portals/stringtab.h | 2 -- lustre/portals/portals/api-init.c | 2 +- 20 files changed, 73 insertions(+), 52 deletions(-) diff --git a/lnet/include/linux/portals_compat25.h b/lnet/include/linux/portals_compat25.h index e28fbac..c5e17a9 100644 --- a/lnet/include/linux/portals_compat25.h +++ b/lnet/include/linux/portals_compat25.h @@ -1,13 +1,24 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20) -# define SIGNAL_MASK_LOCK(task, flags) \ +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sighand->siglock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sighand->siglock, flags) # define RECALC_SIGPENDING recalc_sigpending() #else -# define SIGNAL_MASK_LOCK(task, flags) \ +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sigmask_lock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sigmask_lock, flags) # define RECALC_SIGPENDING recalc_sigpending(current) #endif + +#if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid) +#elif defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt "|%d", ## a, current->thread.mode.tt.extern_pid) +#else +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt, ## a) +#endif diff --git a/lnet/include/lnet/internal.h b/lnet/include/lnet/internal.h index d78cad4..a70b465 100644 --- a/lnet/include/lnet/internal.h +++ b/lnet/include/lnet/internal.h @@ -1,5 +1,3 @@ -/* -*/ #ifndef _P30_INTERNAL_H_ #define _P30_INTERNAL_H_ diff --git a/lnet/include/lnet/list.h b/lnet/include/lnet/list.h index 2b63312..78a1e2d 100644 --- a/lnet/include/lnet/list.h +++ b/lnet/include/lnet/list.h @@ -1,6 +1,4 @@ #ifndef _LINUX_LIST_H -#define _LINUX_LIST_H - /* * Simple doubly linked list implementation. @@ -101,7 +99,9 @@ static inline void list_del_init(struct list_head *entry) __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); } +#endif +#ifndef list_for_each_entry /** * list_move - delete from one list and add as another's head * @list: the entry to move @@ -124,7 +124,10 @@ static inline void list_move_tail(struct list_head *list, __list_del(list->prev, list->next); list_add_tail(list, head); } +#endif +#ifndef _LINUX_LIST_H +#define _LINUX_LIST_H /** * list_empty - tests whether a list is empty * @head: the list to test. diff --git a/lnet/include/lnet/myrnal.h b/lnet/include/lnet/myrnal.h index 12b1925..13790f7 100644 --- a/lnet/include/lnet/myrnal.h +++ b/lnet/include/lnet/myrnal.h @@ -1,6 +1,3 @@ -/* -*/ - #ifndef MYRNAL_H #define MYRNAL_H diff --git a/lnet/include/lnet/nal.h b/lnet/include/lnet/nal.h index 88be63c..7cb3ab7 100644 --- a/lnet/include/lnet/nal.h +++ b/lnet/include/lnet/nal.h @@ -1,5 +1,3 @@ -/* -*/ #ifndef _NAL_H_ #define _NAL_H_ diff --git a/lnet/include/lnet/ppid.h b/lnet/include/lnet/ppid.h index 4727599..760f465 100644 --- a/lnet/include/lnet/ppid.h +++ b/lnet/include/lnet/ppid.h @@ -1,6 +1,3 @@ -/* - */ - #ifndef _INCppidh_ #define _INCppidh_ diff --git a/lnet/include/lnet/stringtab.h b/lnet/include/lnet/stringtab.h index c9683f7..33e4375 100644 --- a/lnet/include/lnet/stringtab.h +++ b/lnet/include/lnet/stringtab.h @@ -1,5 +1,3 @@ /* -*/ -/* * stringtab.h */ diff --git a/lnet/lnet/api-init.c b/lnet/lnet/api-init.c index e59c922..20a67fc 100644 --- a/lnet/lnet/api-init.c +++ b/lnet/lnet/api-init.c @@ -26,7 +26,7 @@ #include int ptl_init; -unsigned int portal_subsystem_debug = 0xfff7e3ff; +unsigned int portal_subsystem_debug = ~0; unsigned int portal_debug = ~0; unsigned int portal_printk; unsigned int portal_stack; diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index 8344af5..30bb6cc 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -477,7 +477,7 @@ static int llu_file_release(struct inode *inode) oa.o_id = lsm->lsm_object_id; oa.o_mode = S_IFREG; oa.o_valid = OBD_MD_FLTYPE | OBD_MD_FLID; - + memcpy(&oa.o_inline, &fd->fd_ost_och, FD_OSTDATA_SIZE); oa.o_valid |= OBD_MD_FLHANDLE; diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index e39a0aa..49d85ab2 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -1,24 +1,25 @@ -void mds_pack_req_body(struct ptlrpc_request *); -void mds_pack_rep_body(struct ptlrpc_request *); -void mds_readdir_pack(struct ptlrpc_request *req, __u64 offset, __u32 size, +void mdc_pack_req_body(struct ptlrpc_request *); +void mdc_pack_rep_body(struct ptlrpc_request *); +void mdc_readdir_pack(struct ptlrpc_request *req, __u64 offset, __u32 size, obd_id ino, int type); -void mds_getattr_pack(struct ptlrpc_request *req, int valid, int offset, +void mdc_getattr_pack(struct ptlrpc_request *req, int valid, int offset, int flags, struct mdc_op_data *data); -void mds_setattr_pack(struct ptlrpc_request *req, +void mdc_setattr_pack(struct ptlrpc_request *req, struct mdc_op_data *data, - struct iattr *iattr, void *ea, int ealen); -void mds_create_pack(struct ptlrpc_request *req, int offset, + struct iattr *iattr, void *ea, int ealen, + void *ea2, int ea2len); +void mdc_create_pack(struct ptlrpc_request *req, int offset, struct mdc_op_data *op_data, __u32 mode, __u64 rdev, __u32 uid, __u32 gid, __u64 time, const void *data, int datalen); -void mds_open_pack(struct ptlrpc_request *req, int offset, +void mdc_open_pack(struct ptlrpc_request *req, int offset, struct mdc_op_data *op_data, __u32 mode, __u64 rdev, __u32 uid, __u32 gid, __u64 time, __u32 flags, const void *data, int datalen); -void mds_unlink_pack(struct ptlrpc_request *req, int offset, +void mdc_unlink_pack(struct ptlrpc_request *req, int offset, struct mdc_op_data *data); -void mds_link_pack(struct ptlrpc_request *req, int offset, +void mdc_link_pack(struct ptlrpc_request *req, int offset, struct mdc_op_data *data); -void mds_rename_pack(struct ptlrpc_request *req, int offset, +void mdc_rename_pack(struct ptlrpc_request *req, int offset, struct mdc_op_data *data, const char *old, int oldlen, const char *new, int newlen); diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h index 0c7bf2c..c2d3d77 100644 --- a/lustre/mds/mds_internal.h +++ b/lustre/mds/mds_internal.h @@ -5,16 +5,23 @@ static inline struct mds_obd *mds_req2mds(struct ptlrpc_request *req) return &req->rq_export->exp_obd->u.mds; } +/* mds/mds_fs.c */ +struct llog_handle *mds_log_create(struct obd_device *obd); +int mds_log_close(struct llog_handle *cathandle, struct llog_handle *loghandle); +struct llog_handle *mds_log_open(struct obd_device *obd, + struct llog_cookie *logcookie); +struct llog_handle *mds_get_catalog(struct obd_device *obd); +void mds_put_catalog(struct llog_handle *cathandle); + /* mds/handler.c */ struct mds_file_data *mds_mfd_new(void); void mds_mfd_put(struct mds_file_data *mfd); void mds_mfd_destroy(struct mds_file_data *mfd); /* mds/mds_reint.c */ -void mds_commit_cb(struct obd_device *obd, __u64 last_rcvd, int error); +void mds_commit_cb(struct obd_device *, __u64 last_rcvd, void *data, int error); int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle, - struct ptlrpc_request *req, int rc, __u32 op_data, - fsfilt_cb_t cb_fn); + struct ptlrpc_request *req, int rc, __u32 op_data); /* mds/mds_lib.c */ int mds_update_unpack(struct ptlrpc_request *, int offset, diff --git a/lustre/mds/mds_lib.c b/lustre/mds/mds_lib.c index 0308e2d..a72e176 100644 --- a/lustre/mds/mds_lib.c +++ b/lustre/mds/mds_lib.c @@ -124,6 +124,14 @@ static int mds_setattr_unpack(struct ptlrpc_request *req, int offset, r->ur_eadatalen = req->rq_reqmsg->buflens[offset + 1]; } + if (req->rq_reqmsg->bufcount > offset + 2) { + r->ur_logcookies = lustre_msg_buf(req->rq_reqmsg, offset + 2,0); + if (r->ur_eadata == NULL) + RETURN (-EFAULT); + + r->ur_cookielen = req->rq_reqmsg->buflens[offset + 2]; + } + RETURN(0); } diff --git a/lustre/obdclass/simple.c b/lustre/obdclass/simple.c index 0ce54a3..4a4ae4c 100644 --- a/lustre/obdclass/simple.c +++ b/lustre/obdclass/simple.c @@ -139,7 +139,6 @@ void pop_ctxt(struct obd_run_ctxt *saved, struct obd_run_ctxt *new_ctx, current->fsgid = saved->ouc.ouc_fsgid; current->cap_effective = saved->ouc.ouc_cap; current->ngroups = saved->ngroups; - current->groups[0] = saved->ouc.ouc_suppgid1; current->groups[1] = saved->ouc.ouc_suppgid2; } diff --git a/lustre/portals/include/linux/portals_compat25.h b/lustre/portals/include/linux/portals_compat25.h index e28fbac..c5e17a9 100644 --- a/lustre/portals/include/linux/portals_compat25.h +++ b/lustre/portals/include/linux/portals_compat25.h @@ -1,13 +1,24 @@ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) || defined(CONFIG_RH_2_4_20) -# define SIGNAL_MASK_LOCK(task, flags) \ +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sighand->siglock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sighand->siglock, flags) # define RECALC_SIGPENDING recalc_sigpending() #else -# define SIGNAL_MASK_LOCK(task, flags) \ +# define SIGNAL_MASK_LOCK(task, flags) \ spin_lock_irqsave(&task->sigmask_lock, flags) -# define SIGNAL_MASK_UNLOCK(task, flags) \ +# define SIGNAL_MASK_UNLOCK(task, flags) \ spin_unlock_irqrestore(&task->sigmask_lock, flags) # define RECALC_SIGPENDING recalc_sigpending(current) #endif + +#if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt "|%d", ## a, current->thread.extern_pid) +#elif defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt "|%d", ## a, current->thread.mode.tt.extern_pid) +#else +# define THREAD_NAME(comm, fmt, a...) \ + sprintf(comm, fmt, ## a) +#endif diff --git a/lustre/portals/include/portals/list.h b/lustre/portals/include/portals/list.h index 2b63312..78a1e2d 100644 --- a/lustre/portals/include/portals/list.h +++ b/lustre/portals/include/portals/list.h @@ -1,6 +1,4 @@ #ifndef _LINUX_LIST_H -#define _LINUX_LIST_H - /* * Simple doubly linked list implementation. @@ -101,7 +99,9 @@ static inline void list_del_init(struct list_head *entry) __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); } +#endif +#ifndef list_for_each_entry /** * list_move - delete from one list and add as another's head * @list: the entry to move @@ -124,7 +124,10 @@ static inline void list_move_tail(struct list_head *list, __list_del(list->prev, list->next); list_add_tail(list, head); } +#endif +#ifndef _LINUX_LIST_H +#define _LINUX_LIST_H /** * list_empty - tests whether a list is empty * @head: the list to test. diff --git a/lustre/portals/include/portals/myrnal.h b/lustre/portals/include/portals/myrnal.h index 12b1925..13790f7 100644 --- a/lustre/portals/include/portals/myrnal.h +++ b/lustre/portals/include/portals/myrnal.h @@ -1,6 +1,3 @@ -/* -*/ - #ifndef MYRNAL_H #define MYRNAL_H diff --git a/lustre/portals/include/portals/nal.h b/lustre/portals/include/portals/nal.h index 88be63c..7cb3ab7 100644 --- a/lustre/portals/include/portals/nal.h +++ b/lustre/portals/include/portals/nal.h @@ -1,5 +1,3 @@ -/* -*/ #ifndef _NAL_H_ #define _NAL_H_ diff --git a/lustre/portals/include/portals/ppid.h b/lustre/portals/include/portals/ppid.h index 4727599..760f465 100644 --- a/lustre/portals/include/portals/ppid.h +++ b/lustre/portals/include/portals/ppid.h @@ -1,6 +1,3 @@ -/* - */ - #ifndef _INCppidh_ #define _INCppidh_ diff --git a/lustre/portals/include/portals/stringtab.h b/lustre/portals/include/portals/stringtab.h index c9683f7..33e4375 100644 --- a/lustre/portals/include/portals/stringtab.h +++ b/lustre/portals/include/portals/stringtab.h @@ -1,5 +1,3 @@ /* -*/ -/* * stringtab.h */ diff --git a/lustre/portals/portals/api-init.c b/lustre/portals/portals/api-init.c index e59c922..20a67fc 100644 --- a/lustre/portals/portals/api-init.c +++ b/lustre/portals/portals/api-init.c @@ -26,7 +26,7 @@ #include int ptl_init; -unsigned int portal_subsystem_debug = 0xfff7e3ff; +unsigned int portal_subsystem_debug = ~0; unsigned int portal_debug = ~0; unsigned int portal_printk; unsigned int portal_stack; -- 1.8.3.1