LINX=page.c
llite_SOURCES = dcache.c recover.c commit_callback.c super.c rw.c
llite_SOURCES += file.c dir.c sysctl.c namei.c symlink.c $(LINX)
+llite_SOURCES += lov_pack.c
dist-hook:
list='$(LINX)'; for f in $$list; do rm -f $(distdir)/$$f; done
+lov_pack.c:
+ test -e lov_pack.c || ln -sf $(top_srcdir)/lib/lov_pack.c .
+
include $(top_srcdir)/Rules
#include <linux/obd_support.h>
#include <linux/lustre_lite.h>
#include <linux/lustre_dlm.h>
+#include <linux/obd_lov.h>
+
extern struct address_space_operations ll_aops;
/* from super.c */
struct ll_sb_info *sbi = ll_i2sbi(dir);
int gid = current->fsgid;
struct ll_inode_md md;
+ struct lov_mds_md *mds_md = NULL;
+ int mds_md_size = 0;
ENTRY;
GOTO(out, rc);
}
body = lustre_msg_buf(request->rq_repmsg, 0);
- md.md = smd;
+ if (smd != NULL) {
+ mds_md_size = sizeof (struct lov_mds_md) +
+ smd->lmd_stripe_count * sizeof(struct lov_object_id);
+ OBD_ALLOC(mds_md, mds_md_size);
+ lov_packmd(mds_md, smd);
+ } else
+ md.md = NULL;
+
} else {
request = it->it_data;
body = lustre_msg_buf(request->rq_repmsg, 1);
EXIT;
out:
+ if (mds_md != NULL)
+ OBD_FREE(mds_md, mds_md_size);
ptlrpc_free_req(request);
return inode;
}