[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lustre-cvs
Subject:    [Lustre-cvs] CVS: obd/include/linux lustre_ha.h,1.4.2.2,1.4.2.3 lustre_idl.h,1.26.2.2,1.26.2.3 lustr
From:       Phil Schwan <pschwan () users ! sourceforge ! net>
Date:       2002-04-29 21:49:05
[Download RAW message or body]

Update of /cvsroot/lustre/obd/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv28223/include/linux

Modified Files:
      Tag: ldlm_testing
	lustre_ha.h lustre_idl.h lustre_lib.h lustre_lite.h 
	lustre_mds.h lustre_net.h obd.h obd_support.h 
Log Message:
Moving the last few days' changes to the ldlm_testing branch.


Index: lustre_ha.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/lustre_ha.h,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- lustre_ha.h	24 Apr 2002 20:00:35 -0000	1.4.2.2
+++ lustre_ha.h	29 Apr 2002 21:49:03 -0000	1.4.2.3
@@ -7,14 +7,6 @@
 
 #include <linux/lustre_net.h>
 
-#define MGR_STOPPING   1
-#define MGR_RUNNING    2
-#define MGR_STOPPED    4
-#define MGR_KILLED     8
-#define MGR_EVENT      16
-#define MGR_WORKING    32
-#define MGR_SIGNAL     64
-
 #define LUSTRE_HA_NAME "ptlrpc"
 
 #define CONNMGR_CONNECT 1
@@ -36,8 +28,9 @@
 int connmgr_connect(struct recovd_obd *mgr, struct ptlrpc_connection *conn);
 int connmgr_handle(struct obd_device *dev, struct ptlrpc_service *svc,
                    struct ptlrpc_request *req);
-void connmgr_cli_fail(struct ptlrpc_client *cli);
-void connmgr_cli_manage(struct recovd_obd *mgr, struct ptlrpc_client *cli);
+void recovd_cli_fail(struct ptlrpc_client *cli);
+void recovd_cli_manage(struct recovd_obd *mgr, struct ptlrpc_client *cli);
+void recovd_cli_fixed(struct ptlrpc_client *cli);
 int recovd_setup(struct recovd_obd *mgr);
 int recovd_cleanup(struct recovd_obd *mgr);
 

Index: lustre_idl.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/lustre_idl.h,v
retrieving revision 1.26.2.2
retrieving revision 1.26.2.3
diff -u -r1.26.2.2 -r1.26.2.3
--- lustre_idl.h	24 Apr 2002 20:00:35 -0000	1.26.2.2
+++ lustre_idl.h	29 Apr 2002 21:49:03 -0000	1.26.2.3
@@ -51,6 +51,9 @@
 
         __u32 opc;
         __u32 xid;
+        __u64 last_rcvd;
+        __u64 last_committed;
+        __u64 transno;
         __u32 status;
         __u32 type;
         __u32   connid;
@@ -209,6 +212,7 @@
         __u32          ino;
         __u32          nlink;
         __u32          generation;
+        __u32          last_xid;
 };
 
 /* MDS update records */
@@ -549,6 +553,8 @@
 #define OBD_IOC_BRW_WRITE              _IOWR('f', 28, long)
 #define OBD_IOC_NAME2DEV               _IOWR('f', 29, long)
 #define OBD_IOC_NEWDEV                 _IOWR('f', 30, long)
+
+#define OBD_RECOVD_NEWCONN             _IOWR('f', 31, long)
 
 #define OBD_IOC_DEC_FS_USE_COUNT       _IO  ('f', 32      )
 

Index: lustre_lib.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/lustre_lib.h,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -r1.11 -r1.11.2.1
--- lustre_lib.h	16 Apr 2002 07:22:49 -0000	1.11
+++ lustre_lib.h	29 Apr 2002 21:49:03 -0000	1.11.2.1
@@ -45,6 +45,7 @@
 int simple_mkdir(struct dentry *dir, char *name, int mode);
 int lustre_fread(struct file *file, char *str, int len, loff_t *off);
 int lustre_fwrite(struct file *file, const char *str, int len, loff_t *off);
+int lustre_fsync(struct file *file);
 #endif
 
 #include <linux/portals_lib.h>

Index: lustre_lite.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/lustre_lite.h,v
retrieving revision 1.6.2.4
retrieving revision 1.6.2.5
diff -u -r1.6.2.4 -r1.6.2.5
--- lustre_lite.h	25 Apr 2002 06:05:58 -0000	1.6.2.4
+++ lustre_lite.h	29 Apr 2002 21:49:03 -0000	1.6.2.5
@@ -25,6 +25,7 @@
 extern kmem_cache_t *ll_file_data_slab;
 struct ll_file_data { 
         __u64 fd_mdshandle; 
+        struct ptlrpc_request *fd_req; 
 };
 
 #define LL_INLINESZ      60
@@ -47,7 +48,6 @@
         struct ptlrpc_connection *ll_mds_conn;
         struct ldlm_namespace    *ll_namespace;
 
-        struct list_head          ll_commitcbd_not_committed;
         wait_queue_head_t         ll_commitcbd_waitq;
         wait_queue_head_t         ll_commitcbd_ctl_waitq;
         int                       ll_commitcbd_flags;

Index: lustre_mds.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/lustre_mds.h,v
retrieving revision 1.31.2.3
retrieving revision 1.31.2.4
diff -u -r1.31.2.3 -r1.31.2.4
--- lustre_mds.h	24 Apr 2002 20:00:35 -0000	1.31.2.3
+++ lustre_mds.h	29 Apr 2002 21:49:03 -0000	1.31.2.4
@@ -65,33 +65,35 @@
 
 #define MDS_MOUNT_RECOV 2
 
-/* Data stored per server at the head of the last_rcvd file */
+/* Data stored per server at the head of the last_rcvd file.  In le32 order. */
 struct mds_server_data {
         __u8 msd_uuid[37];      /* server UUID */
-        __u8 uuid_padding[3];
+        __u8 uuid_padding[3];   /* unused */
         __u64 msd_last_rcvd;    /* last completed transaction ID */
         __u64 msd_mount_count;  /* MDS incarnation number */
         __u8 padding[512 - 56];
 };
 
-/* Data stored per client in the last_rcvd file */
+/* Data stored per client in the last_rcvd file.  In le32 order. */
 struct mds_client_data {
         __u8 mcd_uuid[37];      /* client UUID */
-        __u8 uuid_padding[3];   /* in case we decide to store UUIDs as ASCII */
+        __u8 uuid_padding[3];   /* unused */
         __u64 mcd_last_rcvd;    /* last completed transaction ID */
         __u64 mcd_mount_count;  /* MDS incarnation number */
-        __u8 padding[MDS_LR_SIZE - 56];
+        __u32 mcd_last_xid;     /* client RPC xid for the last transaction */
+        __u8 padding[MDS_LR_SIZE - 60];
 };
 
 /* In-memory access to client data from MDS struct */
 struct mds_client_info {
         struct list_head mci_list;
         struct mds_client_data *mci_mcd;
-        loff_t mci_off;
+        int mci_off;
 };
 
 /* mds/mds_reint.c  */
-int mds_reint_rec(struct mds_update_record *r, struct ptlrpc_request *req); 
+int mds_reint_rec(struct mds_update_record *r, struct ptlrpc_request *req);
+struct mds_client_info *mds_uuid_to_mci(struct mds_obd *mds, __u8 *uuid);
 
 /* lib/mds_updates.c */
 void mds_pack_req_body(struct ptlrpc_request *);
@@ -112,9 +114,10 @@
 /* mds/handler.c */
 struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid, struct vfsmount **mnt);
 
-/* llight/request.c */
-int mdc_connect(struct ptlrpc_client *, struct ptlrpc_connection *, 
-                struct ll_fid *rootfid, struct ptlrpc_request **);
+/* mdc/mdc_request.c */
+int mdc_connect(struct ptlrpc_client *, struct ptlrpc_connection *,
+                struct ll_fid *rootfid, __u64 *last_committed, __u64 *last_rcvd,
+                __u32 *last_xid, struct ptlrpc_request **);
 int mdc_getattr(struct ptlrpc_client *, struct ptlrpc_connection *, ino_t ino,
                 int type, unsigned long valid, struct ptlrpc_request **);
 int mdc_setattr(struct ptlrpc_client *, struct ptlrpc_connection *,
@@ -153,7 +156,8 @@
                                 loff_t *offset);
         void    (* fs_delete_inode)(struct inode *inode);
         void    (* cl_delete_inode)(struct inode *inode);
-        int     (* fs_journal_data)(struct inode *inode, struct file *file);
+        int     (* fs_journal_data)(struct file *file);
+        int     (* fs_set_last_rcvd)(struct mds_obd *mds, void *handle);
 };
 
 #define MDS_FSOP_UNLINK         1
@@ -209,11 +213,19 @@
         return mds->mds_fsops->fs_readpage(file, buf, count, offset);
 }
 
+/* Set up callback to update mds->mds_last_committed with the current
+ * value of mds->mds_last_recieved when this transaction is on disk.
+ */
+static inline int mds_fs_set_last_rcvd(struct mds_obd *mds, void *handle)
+{
+        return mds->mds_fsops->fs_set_last_rcvd(mds, handle);
+}
+
+/* Enable data journaling on the given file */
 static inline ssize_t mds_fs_journal_data(struct mds_obd *mds,
-                                          struct inode *inode,
                                           struct file *file)
 {
-        return mds->mds_fsops->fs_journal_data(inode, file);
+        return mds->mds_fsops->fs_journal_data(file);
 }
 
 extern struct mds_fs_operations mds_ext2_fs_ops;

Index: lustre_net.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/lustre_net.h,v
retrieving revision 1.32.2.3
retrieving revision 1.32.2.4
diff -u -r1.32.2.3 -r1.32.2.4
--- lustre_net.h	29 Apr 2002 21:40:29 -0000	1.32.2.3
+++ lustre_net.h	29 Apr 2002 21:49:03 -0000	1.32.2.4
@@ -56,14 +56,20 @@
 /* default rpc ring length */
 #define RPC_RING_LENGTH    2
 
-#define SVC_STOPPING 1
-#define SVC_RUNNING  2
-#define SVC_STOPPED  4
-#define SVC_KILLED   8
-#define SVC_EVENT    16
-#define SVC_HA_EVENT 32
-#define SVC_SIGNAL   64
-
+#define SVC_KILLED 1
+#define SVC_EVENT  2
+#define SVC_SIGNAL 4
+#define SVC_RUNNING 8
+#define SVC_STOPPING 16
+#define SVC_STOPPED  32
+
+#define RECOVD_STOPPING      1     /* how cleanup tells recovd to quit */
+#define RECOVD_IDLE          2     /* normal state */
+#define RECOVD_STOPPED       4     /* after recovd has stopped */
+#define RECOVD_FAIL          8     /* RPC timeout: wakeup recovd, sets flag */
+#define RECOVD_TIMEOUT       16    /* set when recovd detects a timeout */
+#define RECOVD_UPCALL_WAIT   32    /* an upcall has been placed */
+#define RECOVD_UPCALL_ANSWER 64    /* an upcall has been answered */
 
 #define LUSTRE_CONN_NEW    1
 #define LUSTRE_CONN_CON    2
@@ -95,13 +101,18 @@
         struct obd_device *cli_obd;
         __u32 cli_request_portal;
         __u32 cli_reply_portal;
+        __u64 cli_last_rcvd;
+        __u64 cli_last_committed;
 
         struct semaphore cli_rpc_sem; /* limits outstanding requests */
 
         spinlock_t cli_lock; /* protects lists */
         struct list_head cli_sending_head;
         struct list_head cli_sent_head;
+        struct list_head cli_replied_head;
+        struct list_head cli_replay_head;
         struct list_head cli_ha_item; 
+        void (*cli_recover)(struct ptlrpc_client *); 
 
         struct recovd_obd *cli_recovd;
 };
@@ -111,13 +122,17 @@
 #define PTL_RPC_TYPE_REPLY   3
 
 /* state flags of requests */
-#define PTL_RPC_FL_INTR    1
-#define PTL_RPC_FL_REPLY   2
-#define PTL_RPC_FL_SENT    4
-#define PTL_BULK_FL_SENT   8
-#define PTL_BULK_FL_RCVD   16
-#define PTL_RPC_FL_ERR     32
-#define PTL_RPC_FL_TIMEOUT 64
+#define PTL_RPC_FL_INTR      (1 << 0)
+#define PTL_RPC_FL_REPLY     (1 << 1)
+#define PTL_RPC_FL_SENT      (1 << 2)
+#define PTL_BULK_FL_SENT     (1 << 3)
+#define PTL_BULK_FL_RCVD     (1 << 4)
+#define PTL_RPC_FL_ERR       (1 << 5)
+#define PTL_RPC_FL_TIMEOUT   (1 << 6)
+#define PTL_RPC_FL_RESEND    (1 << 7)
+#define PTL_RPC_FL_COMMITTED (1 << 8)
+#define PTL_RPC_FL_FINISHED  (1 << 9)
+#define PTL_RPC_FL_RETAIN    (1 << 10)
 
 struct ptlrpc_request { 
         int rq_type; /* one of PTL_RPC_REQUEST, PTL_RPC_REPLY, PTL_RPC_BULK */
@@ -127,17 +142,20 @@
         int rq_status;
         int rq_flags; 
         __u32 rq_connid;
+        atomic_t rq_refcount;
 
         int rq_reqlen;
         struct lustre_msg *rq_reqmsg;
 
         int rq_replen;
         struct lustre_msg *rq_repmsg;
+        __u64 rq_transno;
 
         char *rq_bulkbuf;
         int rq_bulklen;
 
         time_t rq_time;
+        time_t rq_timeout;
         //        void * rq_reply_handle;
         wait_queue_head_t rq_wait_for_rep;
 
@@ -224,12 +242,17 @@
 int ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *bulk);
 int ptlrpc_reply(struct ptlrpc_service *svc, struct ptlrpc_request *req);
 int ptlrpc_error(struct ptlrpc_service *svc, struct ptlrpc_request *req);
+void ptlrpc_resend_req(struct ptlrpc_request *request);
 int ptl_send_rpc(struct ptlrpc_request *request);
 void ptlrpc_link_svc_me(struct ptlrpc_service *service, int i);
 
 /* rpc/client.c */
-void ptlrpc_init_client(struct recovd_obd *, int req_portal, int rep_portal,
+void ptlrpc_init_client(struct recovd_obd *, 
+                        void (*recover)(struct ptlrpc_client *),
+                        int req_portal, int rep_portal,
                         struct ptlrpc_client *);
+void ptlrpc_cleanup_client(struct ptlrpc_client *cli);
+__u8 *ptlrpc_req_to_uuid(struct ptlrpc_request *req);
 struct ptlrpc_connection *ptlrpc_uuid_to_connection(char *uuid);
 int ptlrpc_queue_wait(struct ptlrpc_request *req);
 struct ptlrpc_request *ptlrpc_prep_req(struct ptlrpc_client *cl,
@@ -237,6 +260,7 @@
                                        int count, int *lengths, char **bufs);
 void ptlrpc_free_bulk(struct ptlrpc_bulk_desc *bulk);
 void ptlrpc_free_req(struct ptlrpc_request *request);
+void ptlrpc_req_finished(struct ptlrpc_request *request);
 struct ptlrpc_bulk_desc *ptlrpc_prep_bulk(struct ptlrpc_connection *);
 int ptlrpc_check_status(struct ptlrpc_request *req, int err);
 

Index: obd.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/obd.h,v
retrieving revision 1.13.2.4
retrieving revision 1.13.2.5
diff -u -r1.13.2.4 -r1.13.2.5
--- obd.h	25 Apr 2002 06:05:58 -0000	1.13.2.4
+++ obd.h	29 Apr 2002 21:49:03 -0000	1.13.2.5
@@ -79,11 +79,12 @@
         struct address_space_operations *mds_aops;
         struct mds_fs_operations *mds_fsops;
         struct file *mds_rcvd_filp;
+        __u64 mds_last_committed;
         __u64 mds_last_rcvd;
         __u64 mds_mount_count;
         struct ll_fid mds_rootfid;
         int mds_client_count;
-        struct mds_client_info *mds_client_info;
+        struct list_head mds_client_info;
         struct mds_server_data *mds_server_data;
 };
 
@@ -111,9 +112,10 @@
         struct ptlrpc_service *recovd_service;
         struct ptlrpc_client  *recovd_client;
         __u32                  recovd_flags; 
+        __u32                  recovd_wakeup_flag; 
         spinlock_t             recovd_lock;
-        struct list_head      recovd_connections_lh; /* connections managed by the mgr */
-        struct list_head      recovd_troubled_lh; /* connections in trouble */
+        struct list_head      recovd_clients_lh; /* clients managed  */
+        struct list_head      recovd_troubled_lh; /* clients in trouble */
         wait_queue_head_t     recovd_recovery_waitq;
         wait_queue_head_t     recovd_ctl_waitq;
         wait_queue_head_t     recovd_waitq;

Index: obd_support.h
===================================================================
RCS file: /cvsroot/lustre/obd/include/linux/obd_support.h,v
retrieving revision 1.49.2.3
retrieving revision 1.49.2.4
diff -u -r1.49.2.3 -r1.49.2.4
--- obd_support.h	24 Apr 2002 20:00:37 -0000	1.49.2.3
+++ obd_support.h	29 Apr 2002 21:49:03 -0000	1.49.2.4
@@ -94,6 +94,8 @@
         if (OBD_FAIL_CHECK(id)) {                                            \
                 CERROR("obd_fail_loc=%x, fail operation rc=%d\n", id, ret);  \
                 obd_fail_loc |= OBD_FAILED;                                  \
+                if ((id) & OBD_FAIL_ONCE)                                    \
+                        obd_fail_loc |= OBD_FAIL_ONCE;                       \
                 RETURN(ret);                                                 \
         }                                                                    \
 } while(0)


_______________________________________________
Lustre-cvs mailing list
Lustre-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lustre-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic