Whamcloud - gitweb
Small start to committing MDS changes. Testing/committing in separate tree
authoradilger <adilger>
Tue, 23 Apr 2002 22:03:30 +0000 (22:03 +0000)
committeradilger <adilger>
Tue, 23 Apr 2002 22:03:30 +0000 (22:03 +0000)
to ensure they are not the cause of my problems.  This one just adds new
fields into the MDS structs (no functional change).

lustre/include/linux/lustre_mds.h
lustre/include/linux/obd.h
lustre/mds/handler.c

index 31cd39e..e82299c 100644 (file)
@@ -58,15 +58,17 @@ struct mds_update_record {
         __u64 ur_time;
 }; 
 
-#define MDS_LR_CLIENT  1024
+#define MDS_LR_CLIENT  8192
 #define MDS_LR_SIZE     128
 
+#define MDS_CLIENT_SLOTS 17
+
 #define MDS_MOUNT_RECOV 2
 
 /* Data stored per server at the head of the last_rcvd file */
 struct mds_server_data {
         __u8 msd_uuid[37];      /* server UUID */
-        __u8 uuid_padding[3];   /* in case we decide to store UUIDs as ASCII */
+        __u8 uuid_padding[3];
         __u64 msd_last_rcvd;    /* last completed transaction ID */
         __u64 msd_mount_count;  /* MDS incarnation number */
         __u8 padding[512 - 56];
@@ -81,6 +83,13 @@ struct mds_client_data {
         __u8 padding[MDS_LR_SIZE - 56];
 };
 
+/* In-memory access to client data from MDS struct */
+struct mds_client_info {
+        struct list_head mci_list;
+        struct mds_client_data *mci_mcd;
+        int mci_off;
+};
+
 /* mds/mds_reint.c  */
 int mds_reint_rec(struct mds_update_record *r, struct ptlrpc_request *req); 
 
index b1b6a06..14640fd 100644 (file)
@@ -64,6 +64,9 @@ struct filter_obd {
         struct address_space_operations *fo_aops;
 };
 
+struct mds_client_info;
+struct mds_server_data;
+
 struct mds_obd {
         struct ptlrpc_service *mds_service;
 
@@ -75,9 +78,13 @@ struct mds_obd {
         struct inode_operations *mds_iop;
         struct address_space_operations *mds_aops;
         struct mds_fs_operations *mds_fsops;
-        struct file *mds_last_rcvd;
+        struct file *mds_rcvd_filp;
+        __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 mds_server_data *mds_server_data;
 };
 
 struct ldlm_obd {
index 2920da1..744ffe2 100644 (file)
@@ -516,7 +516,7 @@ static int mds_prep(struct obd_device *obddev)
                 CERROR("cannot open/create last_rcvd file\n");
                 GOTO(err_svc, rc = PTR_ERR(f));
         }
-        mds->mds_last_rcvd = f;
+        mds->mds_rcvd_filp = f;
         pop_ctxt(&saved);
 
         /*
@@ -630,9 +630,9 @@ static int mds_cleanup(struct obd_device * obddev)
         if (!mds->mds_sb)
                 RETURN(0);
 
-        if (mds->mds_last_rcvd) {
-                int rc = filp_close(mds->mds_last_rcvd, 0);
-                mds->mds_last_rcvd = NULL;
+        if (mds->mds_rcvd_filp) {
+                int rc = filp_close(mds->mds_rcvd_filp, 0);
+                mds->mds_rcvd_filp = NULL;
 
                 if (rc)
                         CERROR("last_rcvd file won't close, rc=%d\n", rc);