it->it_flags = intent->int_arg2 ? *((int*)intent->int_arg2) : 0;
+ /* FIXME when use open(O_WRONLY) to create a file, MDS will
+ * delay the object creation on OST, thus no lsm will be returned.
+ * if call write() at the time, ll_extent_lock() will failed out
+ * because there will be no strip MD supplied. but O_RDWR will
+ * work fine. Here we forcely set the O_RDWR in this case, find
+ * a real fix later! FIXME
+ */
+ if (it->it_flags & O_WRONLY) {
+ it->it_flags &= ~O_WRONLY;
+ it->it_flags |= O_RDWR;
+ }
+
if (intent->int_opmask & INT_OPEN)
it->it_op |= IT_OPEN;
/*