Whamcloud - gitweb
This is a bugfix for #1838. Most of the patch by A. Dilger, I only
authorgreen <green>
Thu, 23 Oct 2003 20:18:30 +0000 (20:18 +0000)
committergreen <green>
Thu, 23 Oct 2003 20:18:30 +0000 (20:18 +0000)
propagated parental time change to all operations, not only mkdir.

lustre/liblustre/file.c
lustre/liblustre/super.c
lustre/mdc/mdc_locks.c
lustre/ptlrpc/ptlrpc_module.c

index 5d4c927..49b444d 100644 (file)
@@ -68,6 +68,7 @@ void llu_prepare_mdc_op_data(struct mdc_op_data *data,
         data->name = name;
         data->namelen = namelen;
         data->mode = mode;
+        data->mod_time = CURRENT_TIME;
 }
 
 static struct inode *llu_create_node(struct inode *dir, const char *name,
@@ -103,7 +104,7 @@ static struct inode *llu_create_node(struct inode *dir, const char *name,
                 llu_prepare_mdc_op_data(&op_data, dir, NULL, name, namelen, 0);
                 rc = mdc_create(&sbi->ll_mdc_conn, &op_data,
                                 data, datalen, mode, current->fsuid, gid,
-                                time, extra, &request);
+                                extra, &request);
                 if (rc) {
                         inode = (struct inode*)rc;
                         goto out;
index a51be12..087d194 100644 (file)
@@ -517,7 +517,6 @@ static int llu_iop_setattr(struct pnode *pno,
 static int llu_mkdir2(struct inode *dir, const char *name, int len, int mode)
 {
         struct ptlrpc_request *request = NULL;
-        time_t curtime = CURRENT_TIME;
         struct llu_sb_info *sbi = llu_i2sbi(dir);
         struct llu_inode_info *lli = llu_i2info(dir);
         struct mdc_op_data op_data;
@@ -535,8 +534,7 @@ static int llu_mkdir2(struct inode *dir, const char *name, int len, int mode)
         mode |= S_IFDIR;
         llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0);
         err = mdc_create(&sbi->ll_mdc_conn, &op_data, NULL, 0, mode,
-                         current->fsuid, current->fsgid,
-                         curtime, 0, &request);
+                         current->fsuid, current->fsgid, 0, &request);
         ptlrpc_req_finished(request);
         RETURN(err);
 }
@@ -579,7 +577,7 @@ static int llu_symlink2(struct inode *dir, const char *name, int len,
         llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0);
         err = mdc_create(&sbi->ll_mdc_conn, &op_data,
                          tgt, strlen(tgt) + 1, S_IFLNK | S_IRWXUGO,
-                         current->fsuid, current->fsgid, curtime, 0, &request);
+                         current->fsuid, current->fsgid, 0, &request);
         ptlrpc_req_finished(request);
         RETURN(err);
 }
index 11b1803..70b4b6a 100644 (file)
@@ -52,13 +52,9 @@ void it_set_disposition(struct lookup_intent *it, int flag)
 }
 EXPORT_SYMBOL(it_set_disposition);
 
-static void mdc_fid2mdc_op_data(struct mdc_op_data *data,
-                            struct ll_uctxt *ctxt,
-                            struct ll_fid *f1,
-                            struct ll_fid *f2,
-                            const char *name,
-                            int namelen,
-                            int mode)
+static void mdc_fid2mdc_op_data(struct mdc_op_data *data, struct ll_uctxt *ctxt,
+                                struct ll_fid *f1, struct ll_fid *f2,
+                                const char *name, int namelen, int mode)
 {
         LASSERT(data);
         LASSERT(ctxt);
@@ -68,11 +64,12 @@ static void mdc_fid2mdc_op_data(struct mdc_op_data *data,
         data->fid1 = *f1;
         if (f2)
                 data->fid2 = *f2;
-        else 
+        else
                 memset(&data->fid2, 0, sizeof(data->fid2));
         data->name = name;
         data->namelen = namelen;
         data->create_mode = mode;
+        data->mod_time = LTIME_S(CURRENT_TIME);
 }
 
 static int it_to_lock_mode(struct lookup_intent *it)
@@ -232,8 +229,7 @@ int mdc_enqueue(struct obd_export *exp,
                 lit->opc = (__u64)it->it_op;
 
                 /* pack the intended request */
-                mdc_open_pack(req, 2, data, it->it_create_mode, 0, 
-                              LTIME_S(CURRENT_TIME),
+                mdc_open_pack(req, 2, data, it->it_create_mode, 0,
                               it->it_flags, lmm, lmmsize);
                 /* get ready for the reply */
                 reply_buffers = 3;
index c766a64..3b7ecc7 100644 (file)
@@ -203,7 +203,6 @@ EXPORT_SYMBOL(lustre_swab_ost_body);
 EXPORT_SYMBOL(lustre_swab_ost_last_id);
 EXPORT_SYMBOL(lustre_swab_ll_fid);
 EXPORT_SYMBOL(lustre_swab_mds_status_req);
-EXPORT_SYMBOL(lustre_swab_mds_fileh_body);
 EXPORT_SYMBOL(lustre_swab_mds_body);
 EXPORT_SYMBOL(lustre_swab_mds_rec_setattr);
 EXPORT_SYMBOL(lustre_swab_mds_rec_create);