}
body = lustre_msg_buf(req->rq_repmsg, 0, sizeof(*body));
-
- if (body->flags & S_APPEND)
- flags |= EXT3_APPEND_FL;
- if (body->flags & S_IMMUTABLE)
- flags |= EXT3_IMMUTABLE_FL;
- if (body->flags & S_NOATIME)
- flags |= EXT3_NOATIME_FL;
-
+
+ /*Now the ext3 will be packed directly back to client,
+ *no need convert here*/
+ flags = body->flags;
ptlrpc_req_finished (req);
RETURN(put_user(flags, (int *)arg));
MODULES := mdd
mdd-objs := mdd_handler.o mdd_lov.o
+EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs
+
@INCLUDE_RULES@
#define DEBUG_SUBSYSTEM S_MDS
#include <linux/module.h>
+#include <linux/jbd.h>
#include <obd.h>
#include <obd_class.h>
#include <obd_support.h>
#include <lprocfs_status.h>
+#include <linux/ldiskfs_fs.h>
#include <lu_object.h>
#include <md_object.h>
#include <dt_object.h>
struct dt_object *next = mdd_object_child(obj);
LASSERT(lu_object_exists(mdd2lu_obj(obj)));
return next->do_ops->do_attr_get(ctxt, next, la);
-
}
static void mdd_flags_xlate(struct mdd_object *obj, __u32 flags)
{
- obj->mod_flags = 0;
- if (flags & S_APPEND)
+ obj->mod_flags &= ~(APPEND_OBJ|IMMUTE_OBJ);
+
+ if (flags & LUSTRE_APPEND_FL)
obj->mod_flags |= APPEND_OBJ;
- if (flags & S_IMMUTABLE)
+ if (flags & LUSTRE_IMMUTABLE_FL)
obj->mod_flags |= IMMUTE_OBJ;
}
IMMUTE_OBJ = 1 << 2
};
+#define LUSTRE_APPEND_FL LDISKFS_APPEND_FL
+#define LUSTRE_IMMUTABLE_FL LDISKFS_IMMUTABLE_FL
+
struct mdd_object {
struct md_object mod_obj;
/* open count */
#define DEBUG_SUBSYSTEM S_MDS
#include <linux/module.h>
-#include <linux/fs.h>
/* LUSTRE_VERSION_CODE */
#include <lustre_ver.h>
struct inode *inode, const struct lu_attr *attr)
{
__u64 bits;
-
+ int rc = 0;
+
bits = attr->la_valid;
LASSERT(!(bits & LA_TYPE)); /* Huh? You want too much. */
(attr->la_flags & LDISKFS_FL_USER_MODIFIABLE);
}
mark_inode_dirty(inode);
- return 0;
+ return rc;
}
/*
attr->la_blocks = inode->i_blocks;
attr->la_uid = inode->i_uid;
attr->la_gid = inode->i_gid;
- attr->la_flags = inode->i_flags;
+ attr->la_flags = LDISKFS_I(inode)->i_flags;
attr->la_nlink = inode->i_nlink;
attr->la_rdev = inode->i_rdev;
attr->la_blksize = inode->i_blksize;