Whamcloud - gitweb
b=2029
authorphil <phil>
Fri, 24 Oct 2003 18:35:08 +0000 (18:35 +0000)
committerphil <phil>
Fri, 24 Oct 2003 18:35:08 +0000 (18:35 +0000)
r=adilger
- abstracts multiple copies of code into mds_open_by_fid
- abstract some conditions and transaction mechanisms into mds_create_objects
- as a temporary measure, take the inode-reuse lock in mds_open
- fixes a bug introduced by pre-creation, where two MDS threads could
  race to create objects on the same inode; fixed by moving the i_sem
  out of fsfilt_get_md and around the entire operation

lustre/mds/mds_internal.h
lustre/mds/mds_unlink_open.c

index 472c49e..1c3aa7f 100644 (file)
@@ -87,6 +87,8 @@ extern struct lvfs_callback_ops mds_lvfs_ops;
 extern int mds_iocontrol(unsigned int cmd, struct obd_export *exp,
                          int len, void *karg, void *uarg);
 #ifdef __KERNEL__
+int mds_pack_md(struct obd_device *, struct lustre_msg *, int offset,
+                struct mds_body *, struct inode *, int lock);
 void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode);
 void mds_pack_inode2body(struct mds_body *body, struct inode *inode);
 #endif
index 6fb4ba1..6116010 100644 (file)
@@ -190,7 +190,7 @@ static int mds_unlink(struct obd_device *obd, struct dentry *dchild,
         LASSERT(body != NULL);
 
         mds_pack_inode2body(body, inode);
-        mds_pack_md(obd, req->rq_repmsg, 1, body, inode);
+        mds_pack_md(obd, req->rq_repmsg, 1, body, inode, 1);
 
         handle = fsfilt_start(obd, pending_dir, FSFILT_OP_UNLINK_LOG, NULL);
         if (IS_ERR(handle)) {