X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fliblustre%2Fllite_cl.c;h=e4ed309198b4b4cedbc1ef0e3c60822c2b94f163;hp=0d857fa78ecf424f083a0880d77e03413e623bf2;hb=59f0a47800762b7833af50bff6acaa21ab08e481;hpb=3423b5b25a283cd488c570732bf2ffcb6e61a825 diff --git a/lustre/liblustre/llite_cl.c b/lustre/liblustre/llite_cl.c index 0d857fa..e4ed309 100644 --- a/lustre/liblustre/llite_cl.c +++ b/lustre/liblustre/llite_cl.c @@ -22,31 +22,21 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include -#include -#include -#include -#include +#include +#include +#include #include -#include -#include -#ifndef __CYGWIN__ -# include -#else -# include -#endif - +#include +#include +#include +#include #include - +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include - #include "llite_lib.h" /* @@ -80,7 +70,6 @@ static const struct cl_device_operations slp_cl_ops; static const struct cl_io_operations ccc_io_ops; static const struct lu_device_type_operations slp_device_type_ops; //struct lu_device_type slp_device_type; -static const struct cl_page_operations slp_page_ops; static const struct cl_page_operations slp_transient_page_ops; static const struct cl_lock_operations slp_lock_ops; @@ -91,8 +80,8 @@ static const struct cl_lock_operations slp_lock_ops; * */ -void *slp_session_key_init(const struct lu_context *ctx, - struct lu_context_key *key) +static void *slp_session_key_init(const struct lu_context *ctx, + struct lu_context_key *key) { struct slp_session *session; @@ -102,8 +91,8 @@ void *slp_session_key_init(const struct lu_context *ctx, return session; } -void slp_session_key_fini(const struct lu_context *ctx, - struct lu_context_key *key, void *data) +static void slp_session_key_fini(const struct lu_context *ctx, + struct lu_context_key *key, void *data) { struct slp_session *session = data; OBD_FREE_PTR(session); @@ -197,7 +186,7 @@ static const struct lu_device_type_operations slp_device_type_ops = { .ldto_device_fini = ccc_device_fini }; -struct lu_device_type slp_device_type = { +static struct lu_device_type slp_device_type = { .ldt_tags = LU_DEVICE_CL, .ldt_name = LUSTRE_SLP_NAME, .ldt_ops = &slp_device_type_ops, @@ -564,8 +553,7 @@ static int llu_queue_pio(const struct lu_env *env, struct cl_io *io, } static -struct llu_io_group * get_io_group(struct inode *inode, int maxpages, - struct lustre_rw_params *params) +struct llu_io_group *get_io_group(struct inode *inode, int maxpages) { struct llu_io_group *group; @@ -573,8 +561,6 @@ struct llu_io_group * get_io_group(struct inode *inode, int maxpages, if (!group) return ERR_PTR(-ENOMEM); - group->lig_params = params; - return group; } @@ -607,7 +593,6 @@ static int slp_io_start(const struct lu_env *env, const struct cl_io_slice *ios) loff_t pos; long cnt; struct llu_io_group *iogroup; - struct lustre_rw_params p = {0}; int iovidx; struct intnl_stat *st = llu_i2stat(inode); struct llu_inode_info *lli = llu_i2info(inode); @@ -624,14 +609,8 @@ static int slp_io_start(const struct lu_env *env, const struct cl_io_slice *ios) pos = io->u.ci_rd.rd.crw_pos; cnt = io->u.ci_rd.rd.crw_count; } - if (io->u.ci_wr.wr_append) { - p.lrp_lock_mode = LCK_PW; - } else { - p.lrp_brw_flags = OBD_BRW_SRVLOCK; - p.lrp_lock_mode = LCK_NL; - } - iogroup = get_io_group(inode, max_io_pages(cnt, cio->cui_nrsegs), &p); + iogroup = get_io_group(inode, max_io_pages(cnt, cio->cui_nrsegs)); if (IS_ERR(iogroup)) RETURN(PTR_ERR(iogroup));