From: yury Date: Thu, 27 Jan 2005 09:21:55 +0000 (+0000) Subject: - removed optimization related to fid's updating on clients. X-Git-Tag: 1.3.4~166 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d54f170e33042230d42f45d5bc72581306082637;p=fs%2Flustre-release.git - removed optimization related to fid's updating on clients. --- diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h index a85861b..c9b3335 100644 --- a/lustre/include/linux/lustre_lib.h +++ b/lustre/include/linux/lustre_lib.h @@ -73,17 +73,12 @@ (unsigned long)(id)->li_stc.u.e3s.l3s_ino, \ (unsigned long)(id)->li_stc.u.e3s.l3s_gen -/* - * this flag is set in ->it->it_int_flags to show, that inode exists on client - * and no fid fetching flags needs to be set in server request. - */ -#define LL_IT_EXIST (1 << 0) - /* target.c */ struct ptlrpc_request; struct recovd_data; struct recovd_obd; struct obd_export; + #include #include #include diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 912c513..fad03f2 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -265,14 +265,6 @@ int ll_revalidate_it(struct dentry *de, int flags, struct nameidata *nd, ll_frob_intent(&it, &lookup_it); LASSERT(it != NULL); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - /* - * to show, that client already has inode and it needs to revalidate, - * all fields but fid. mdc_intent_lock() will use this flag. - */ - it->d.lustre.it_int_flags |= LL_IT_EXIST; -#endif - if (it->it_op == IT_GETATTR) { /* We need to check for LOOKUP lock as well */ rc = md_intent_lock(exp, &pid, de->d_name.name, diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 8b89be9..60ff51e 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -514,26 +514,14 @@ int mdc_intent_lock(struct obd_export *exp, struct lustre_id *pid, mdc_id2mdc_data(op_data, pid, cid, name, len, 0); -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) /* - * This is optimization. Now fid will not be obtained from - * server if client inode already exists. This flag is set in - * ll_revalidate_it() if it finds that passed dentry contains - * inode. + * if we get inode by name (ll_lookup_it() case), we + * always should ask for fid, as we will not be able to + * take locks, revalidate dentry, etc. later with + * invalid fid in inode. */ - if (!(it->d.lustre.it_int_flags && LL_IT_EXIST)) { -#endif - /* - * if we get inode by name (ll_lookup_it() case), we - * always should ask for fid, as we will not be able to - * take locks, revalidate dentry, etc. later with - * invalid fid in inode. - */ - if (cid == NULL && name != NULL) - op_data->valid |= OBD_MD_FID; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - } -#endif + if (cid == NULL && name != NULL) + op_data->valid |= OBD_MD_FID; rc = mdc_enqueue(exp, LDLM_IBITS, it, it_to_lock_mode(it), op_data, &lockh, lmm, lmmsize,