From: nikita Date: Sun, 2 Jul 2006 21:12:33 +0000 (+0000) Subject: fid_is_local(): move it back into fld module X-Git-Tag: v1_8_0_110~486^2~1497 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=891f690188eaa0dae127f0e092a2c4e8e32d58f5;p=fs%2Flustre-release.git fid_is_local(): move it back into fld module --- diff --git a/lustre/fid/fid_lib.c b/lustre/fid/fid_lib.c index 8811954..54e2558 100644 --- a/lustre/fid/fid_lib.c +++ b/lustre/fid/fid_lib.c @@ -54,27 +54,3 @@ void fid_to_le(struct lu_fid *dst, const struct lu_fid *src) } EXPORT_SYMBOL(fid_to_le); -/* - * Returns true, if fid is local to this server node. - * - * WARNING: this function is *not* guaranteed to return false if fid is - * remote: it makes an educated conservative guess only. - * - * fid_is_local() is supposed to be used in assertion checks only. - */ -int fid_is_local(struct lu_site *site, const struct lu_fid *fid) -{ - int result; - - result = 1; /* conservatively assume fid is local */ - if (site->ls_client_fld != NULL) { - struct fld_cache_entry *entry; - - entry = fld_cache_lookup(site->ls_client_fld->fld_cache, - fid_seq(fid)); - if (entry != NULL) - result = (entry->fce_mds == site->ls_node_id); - } - return result; -} -EXPORT_SYMBOL(fid_is_local); diff --git a/lustre/fld/fld_handler.c b/lustre/fld/fld_handler.c index 3da5263..c809e68 100644 --- a/lustre/fld/fld_handler.c +++ b/lustre/fld/fld_handler.c @@ -206,6 +206,31 @@ out: return 0; } +/* + * Returns true, if fid is local to this server node. + * + * WARNING: this function is *not* guaranteed to return false if fid is + * remote: it makes an educated conservative guess only. + * + * fid_is_local() is supposed to be used in assertion checks only. + */ +int fid_is_local(struct lu_site *site, const struct lu_fid *fid) +{ + int result; + + result = 1; /* conservatively assume fid is local */ + if (site->ls_client_fld != NULL) { + struct fld_cache_entry *entry; + + entry = fld_cache_lookup(site->ls_client_fld->fld_cache, + fid_seq(fid)); + if (entry != NULL) + result = (entry->fce_mds == site->ls_node_id); + } + return result; +} +EXPORT_SYMBOL(fid_is_local); + #ifdef LPROCFS static int fld_server_proc_init(struct lu_server_fld *fld)