#include <sys/fcntl.h>
#include <sys/queue.h>
+#ifdef HAVE_XTIO_H
+#include <xtio.h>
+#endif
#include <sysio.h>
#include <fs.h>
#include <mount.h>
#include <inode.h>
+#ifdef HAVE_FILE_H
#include <file.h>
+#endif
#undef LIST_HEAD
+#ifdef HAVE_LINUX_TYPES_H
#include <linux/types.h>
+#elif defined(HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_LINUX_UNISTD_H
#include <linux/unistd.h>
+#elif defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
#include <dirent.h>
#include "llite_lib.h"
{
struct llu_inode_info *lli = llu_i2info(inode);
struct llu_sb_info *sbi = llu_i2sbi(inode);
- struct ll_fid mdc_fid;
+ struct lustre_id id;
__u64 offset;
int rc = 0;
struct ptlrpc_request *request;
struct mds_body *body;
struct lookup_intent it = { .it_op = IT_READDIR };
struct mdc_op_data data;
- struct obd_device *obddev = class_exp2obd(sbi->ll_mdc_exp);
+ struct obd_device *obddev = class_exp2obd(sbi->ll_md_exp);
struct ldlm_res_id res_id =
- { .name = {lli->lli_st_ino, (__u64)lli->lli_st_generation} };
+ { .name = {id_fid(&lli->lli_id), id_group(&lli->lli_id)} };
ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_UPDATE } };
ENTRY;
rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED,
&res_id, LDLM_IBITS, &policy, LCK_PR, &lockh);
if (!rc) {
- llu_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0);
+ llu_prepare_mdc_data(&data, inode, NULL, NULL, 0, 0);
- rc = mdc_enqueue(sbi->ll_mdc_exp, LDLM_IBITS, &it, LCK_PR,
+ rc = mdc_enqueue(sbi->ll_md_exp, LDLM_IBITS, &it, LCK_PR,
&data, &lockh, NULL, 0,
ldlm_completion_ast, llu_mdc_blocking_ast,
inode);
- request = (struct ptlrpc_request *)it.d.lustre.it_data;
+ request = (struct ptlrpc_request *)LUSTRE_IT(&it)->it_data;
if (request)
ptlrpc_req_finished(request);
if (rc < 0) {
}
ldlm_lock_dump_handle(D_OTHER, &lockh);
- mdc_pack_fid(&mdc_fid, lli->lli_st_ino, lli->lli_st_generation, S_IFDIR);
+ /* FIXME-UMKA: should be here some mds num and mds id? */
+ mdc_pack_id(&id, lli->lli_st_ino, lli->lli_st_generation,
+ S_IFDIR, 0, 0);
offset = page->index << PAGE_SHIFT;
- rc = mdc_readpage(sbi->ll_mdc_exp, &mdc_fid,
- offset, page, &request);
+ rc = mdc_readpage(sbi->ll_md_exp, &id, offset, page, &request);
if (!rc) {
body = lustre_msg_buf(request->rq_repmsg, 0, sizeof (*body));
LASSERT (body != NULL); /* checked by mdc_readpage() */