X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdfilter%2Ffilter_internal.h;h=7c73619bd78aa4e69d77d667d55ccec8dc73bf4a;hb=78ed4636ff68a70c8719f845d434c9f142d32fb4;hp=91d8ef99d3a66f9ff86c1de7b024d76baecb31b8;hpb=f95393b0d0a59cf3dc2f29cffc35dcc4cc9d7728;p=fs%2Flustre-release.git diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index 91d8ef9..7c73619 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -152,7 +152,8 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry, int filter_setattr(struct obd_export *exp, struct obd_info *oinfo, struct obd_trans_info *oti); -struct dentry *filter_create_object(struct obd_device *obd, struct obdo *oa); +int filter_create(struct obd_export *exp, struct obdo *oa, + struct lov_stripe_md **ea, struct obd_trans_info *oti); struct obd_llog_group *filter_find_olg(struct obd_device *obd, int seq); @@ -243,4 +244,15 @@ void blacklist_add(uid_t uid); void blacklist_del(uid_t uid); int blacklist_display(char *buf, int bufsize); +/* sync on lock cancel is useless when we force a journal flush, + * and if we enable async journal commit, we should also turn on + * sync on lock cancel if it is not enabled already. */ +static inline void filter_slc_set(struct filter_obd *filter) +{ + if (filter->fo_syncjournal == 1) + filter->fo_sync_lock_cancel = NEVER_SYNC_ON_CANCEL; + else if (filter->fo_sync_lock_cancel == NEVER_SYNC_ON_CANCEL) + filter->fo_sync_lock_cancel = ALWAYS_SYNC_ON_CANCEL; +} + #endif /* _FILTER_INTERNAL_H */