X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fcl_object.h;h=78f0b4900b56e32b0fb0d097408c4fb20aab034a;hb=624a3ac233938153e889ae81f639cf46c0a8312b;hp=53bb5ca8b4ce54a2f8e2a11571fbf57d7a0e5bfb;hpb=9fe4b52ad2ffadf125d9b5c78bb2ff9a01725707;p=fs%2Flustre-release.git diff --git a/lustre/include/cl_object.h b/lustre/include/cl_object.h index 53bb5ca..78f0b49 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -276,6 +276,16 @@ struct cl_object_conf { * VFS inode. This is consumed by vvp. */ struct inode *coc_inode; + /** + * Validate object conf. If object is using an invalid conf, + * then invalidate it and set the new layout. + */ + bool coc_validate_only; + /** + * Invalidate the current stripe configuration due to losing + * layout lock. + */ + bool coc_invalidate; }; /** @@ -713,6 +723,8 @@ struct cl_page { * modified only internally within cl_page.c. Protected by a VM lock. */ const enum cl_page_state cp_state; + /** Protect to get and put page, see cl_page_put and cl_vmpage_page */ + cfs_spinlock_t cp_lock; /** * Linkage of pages within some group. Protected by * cl_page::cp_mutex. */ @@ -2294,11 +2306,6 @@ struct cl_io { struct cl_lockset ci_lockset; /** lock requirements, this is just a help info for sublayers. */ enum cl_io_lock_dmd ci_lockreq; - /** - * This io has held grouplock, to inform sublayers that - * don't do lockless i/o. - */ - int ci_no_srvlock; union { struct cl_rd_io { struct cl_io_rw_common rd; @@ -2342,7 +2349,29 @@ struct cl_io { struct cl_2queue ci_queue; size_t ci_nob; int ci_result; - int ci_continue; + unsigned int ci_continue:1, + /** + * This io has held grouplock, to inform sublayers that + * don't do lockless i/o. + */ + ci_no_srvlock:1, + /** + * The whole IO need to be restarted because layout has been changed + */ + ci_need_restart:1, + /** + * Ignore layout change. + * Most of the CIT_MISC operations can ignore layout change, because + * the purpose to create this kind of cl_io is to give an environment + * to run clio methods, for example: + * 1. request group lock; + * 2. flush caching pages by osc; + * 3. writepage + * 4. echo client + * So far, only direct IO and glimpse clio need restart if layout + * change during IO time. + */ + ci_ignore_layout:1; /** * Number of pages owned by this IO. For invariant checking. */ @@ -2858,6 +2887,8 @@ void cl_lock_get_trust (struct cl_lock *lock); void cl_lock_put (const struct lu_env *env, struct cl_lock *lock); void cl_lock_hold_add (const struct lu_env *env, struct cl_lock *lock, const char *scope, const void *source); +void cl_lock_hold_release(const struct lu_env *env, struct cl_lock *lock, + const char *scope, const void *source); void cl_lock_unhold (const struct lu_env *env, struct cl_lock *lock, const char *scope, const void *source); void cl_lock_release (const struct lu_env *env, struct cl_lock *lock,