Skip to content
Snippets Groups Projects
Commit 92aad7a3 authored by Yury Umanets's avatar Yury Umanets
Browse files

- changed name convention in cobd, thus all MD related methods have _md_...

- changed name convention in cobd, thus all MD related methods have _md_ prefix like cobd_md_getstatus(),
all data layer related have _dt_prefix and common one like cobd_connect() have no prefix at all.

- added hack to mdc_intent_lock() and cobd_md_intent_lock() to distinguish cobd case in mdc_intent_lock() and do not raise -ESTALE if obtained lock is not coherent wiht store id due to generation after switchin to cache cobd. This is dirty hack of course, but it should be for a while to pass cmobd/cobd related tests and Peter agreed it ok for now.
parent f6549dd2
No related merge requests found
This diff is collapsed.
......@@ -95,6 +95,14 @@ static inline int cleanup_group_info(void)
}
#endif /* end of groups_info stuff */
/*
* this define is from the same namespace as other lookup flags in linux, will
* be gone when COBD medium switching will be done more correct manner.
* Currently this is dirty hack and this flag is needed to let MDC layer know
* that it does not have to check if requested id is the same as receviced from
* MDS in mdc_intent_lock() --umka
*/
#define LOOKUP_COBD 4096
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
......
......@@ -602,7 +602,7 @@ int mdc_intent_lock(struct obd_export *exp, struct lustre_id *pid,
/* we have to compare all the fields but type, because MDS can
* return fid/mds/ino/gen if inode lives on another MDS -bzzz */
if (!id_equal(cid, &mds_body->id1))
if ((lookup_flags & LOOKUP_COBD) && !id_equal(cid, &mds_body->id1))
RETURN(-ESTALE);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment