Whamcloud - gitweb
merge b_orphan into b_merge, with orphan code disabled
authorpschwan <pschwan>
Fri, 4 Jul 2003 08:56:57 +0000 (08:56 +0000)
committerpschwan <pschwan>
Fri, 4 Jul 2003 08:56:57 +0000 (08:56 +0000)
20 files changed:
lnet/include/linux/portals_compat25.h
lnet/include/lnet/internal.h
lnet/include/lnet/list.h
lnet/include/lnet/myrnal.h
lnet/include/lnet/nal.h
lnet/include/lnet/ppid.h
lnet/include/lnet/stringtab.h
lnet/lnet/api-init.c
lustre/liblustre/file.c
lustre/mdc/mdc_internal.h
lustre/mds/mds_internal.h
lustre/mds/mds_lib.c
lustre/obdclass/simple.c
lustre/portals/include/linux/portals_compat25.h
lustre/portals/include/portals/list.h
lustre/portals/include/portals/myrnal.h
lustre/portals/include/portals/nal.h
lustre/portals/include/portals/ppid.h
lustre/portals/include/portals/stringtab.h
lustre/portals/portals/api-init.c

index e28fbac..c5e17a9 100644 (file)
@@ -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
index d78cad4..a70b465 100644 (file)
@@ -1,5 +1,3 @@
-/*
-*/
 #ifndef _P30_INTERNAL_H_
 #define _P30_INTERNAL_H_
 
index 2b63312..78a1e2d 100644 (file)
@@ -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.
index 12b1925..13790f7 100644 (file)
@@ -1,6 +1,3 @@
-/*
-*/
-
 #ifndef MYRNAL_H
 #define MYRNAL_H
 
index 88be63c..7cb3ab7 100644 (file)
@@ -1,5 +1,3 @@
-/*
-*/
 #ifndef _NAL_H_
 #define _NAL_H_
 
index 4727599..760f465 100644 (file)
@@ -1,6 +1,3 @@
-/*
- */
-
 #ifndef _INCppidh_
 #define _INCppidh_
 
index c9683f7..33e4375 100644 (file)
@@ -1,5 +1,3 @@
 /*
-*/
-/*
  * stringtab.h
  */
index e59c922..20a67fc 100644 (file)
@@ -26,7 +26,7 @@
 #include <portals/api-support.h>
 
 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;
index 8344af5..30bb6cc 100644 (file)
@@ -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;
 
index e39a0aa..49d85ab 100644 (file)
@@ -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);
index 0c7bf2c..c2d3d77 100644 (file)
@@ -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,
index 0308e2d..a72e176 100644 (file)
@@ -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);
 }
 
index 0ce54a3..4a4ae4c 100644 (file)
@@ -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;
         }
index e28fbac..c5e17a9 100644 (file)
@@ -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
index 2b63312..78a1e2d 100644 (file)
@@ -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.
index 4727599..760f465 100644 (file)
@@ -1,6 +1,3 @@
-/*
- */
-
 #ifndef _INCppidh_
 #define _INCppidh_
 
index e59c922..20a67fc 100644 (file)
@@ -26,7 +26,7 @@
 #include <portals/api-support.h>
 
 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;