lustre: update to 2.11 support
Subsystems (2)
PATCH 64/151 lustre: clio: introduce CIT_GLIMPSE for glimpse
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
It turned out that it's better to have a standaline I/O context for glimpse request. In that case, it's easier for glimpse to try a new mirror if the current one is out of access.
Another problem in this patch is to zero cl_io data structure if the I/O starts from OSC layer.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: d8638fd870ec ("LU-9771 clio: introduce CIT_GLIMPSE for glimpse")
Reviewed-on: https://review.whamcloud.com/29082
--- fs/lustre/include/cl_object.h | 6 ++++-- fs/lustre/llite/glimpse.c | 16 +++++++++------- fs/lustre/llite/vvp_io.c | 4 ++++ fs/lustre/lov/lov_io.c | 12 ++++++++++++ fs/lustre/obdclass/cl_io.c | 2 ++ fs/lustre/osc/osc_cache.c | 4 ++-- fs/lustre/osc/osc_internal.h | 8 ++++++++ fs/lustre/osc/osc_lock.c | 2 +- fs/lustre/osc/osc_page.c | 2 +- 9 files changed, 43 insertions(+), 13 deletions(-)
fs/lustre/include/cl_object.h +4 -2
@@ -1367,6 +1367,10 @@ enum cl_io_type {*/ CIT_FSYNC ,/** +* glimpse. An io context to acquire glimpse lock. +*/ + CIT_GLIMPSE, +/** * Miscellaneous io. This is used for occasional io activity that * doesn't fit into other types. Currently this is used for: *
@@ -1377,8 +1381,6 @@ enum cl_io_type {* - VM induced page write-out. An io context for writing page out * for memory cleansing; * -* - glimpse. An io context to acquire glimpse lock. -* * - grouplock. An io context to acquire group lock. * * CIT_MISC io is used simply as a context in which locks and pages
fs/lustre/llite/glimpse.c +9 -7
@@ -189,10 +189,13 @@ int __cl_glimpse_size(struct inode *inode, int agl)u16 refcheck; result =cl_io_get (inode, &env, &io, &refcheck); -if (result >0 ) { -again: +if (result <=0 ) +return result; + + do { + io->ci_need_restart = 0; io->ci_verify_layout = 1; - result =cl_io_init (env, io,CIT_MISC , io->ci_obj); + result = cl_io_init(env, io, CIT_GLIMPSE, io->ci_obj); if (result > 0) /* * nothing to do for this io. This currently happens
@@ -205,9 +208,8 @@ int __cl_glimpse_size(struct inode *inode, int agl)OBD_FAIL_TIMEOUT (OBD_FAIL_GLIMPSE_DELAY ,2 );cl_io_fini (env, io); -if (unlikely (io->ci_need_restart)) - goto again; -cl_env_put (env, &refcheck); - } + }while (unlikely (io->ci_need_restart)); + +cl_env_put (env, &refcheck);return result; }
fs/lustre/llite/vvp_io.c +4 -0
@@ -1352,6 +1352,9 @@ static int vvp_io_read_ahead(const struct lu_env *env, .cio_start = vvp_io_fsync_start, .cio_fini = vvp_io_fini }, + [CIT_GLIMPSE] = { + .cio_fini = vvp_io_fini + }, [CIT_MISC] = { .cio_fini = vvp_io_fini },
@@ -1425,5 +1428,6 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj, PFID(lu_object_fid(&obj->co_lu)), result); } + io->ci_result = result <0 ? result :0 ;return result; }
fs/lustre/lov/lov_io.c +12 -0
@@ -256,6 +256,7 @@ static int lov_io_slice_init(struct lov_io *lio, struct lov_object *obj,break ; } +case CIT_GLIMPSE :case CIT_MISC : lio->lis_pos =0 ; lio->lis_endpos =OBD_OBJECT_EOF ;
@@ -362,6 +363,8 @@ static void lov_io_sub_inherit(struct lov_io_sub *sub, struct lov_io *lio, io->u.ci_ladvise.li_flags = parent->u.ci_ladvise.li_flags;break ; } +case CIT_GLIMPSE : +case CIT_MISC :default :break ; }
@@ -972,6 +975,9 @@ static void lov_io_fsync_end(const struct lu_env *env, .cio_start = lov_io_start, .cio_end = lov_io_end }, + [CIT_GLIMPSE] = { + .cio_fini = lov_io_fini, + }, [CIT_MISC] = { .cio_fini = lov_io_fini }
@@ -1046,6 +1052,9 @@ static void lov_empty_impossible(const struct lu_env *env, [CIT_LADVISE ] = { .cio_fini = lov_empty_io_fini }, + [CIT_GLIMPSE ] = { + .cio_fini = lov_empty_io_fini + }, [CIT_MISC ] = { .cio_fini = lov_empty_io_fini }
@@ -1084,7 +1093,9 @@ int lov_io_init_empty(const struct lu_env *env, struct cl_object *obj,switch (io->ci_type) {default :LBUG (); +break ;case CIT_MISC : +case CIT_GLIMPSE :case CIT_READ : result =0 ;break ;
@@ -1128,6 +1139,7 @@ int lov_io_init_released(const struct lu_env *env, struct cl_object *obj, result = -EOPNOTSUPP ;break ;case CIT_MISC : +case CIT_GLIMPSE :case CIT_FSYNC :case CIT_LADVISE :case CIT_DATA_VERSION :
fs/lustre/obdclass/cl_io.c +2 -0
@@ -124,6 +124,8 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io)LASSERT (ergo (io->ci_ignore_layout || !io->ci_verify_layout, !io->ci_need_restart));break ; +case CIT_GLIMPSE : +break ;case CIT_LADVISE :break ;default :
fs/lustre/osc/osc_cache.c +2 -2
@@ -1005,7 +1005,7 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index,if (IS_ERR (env))return PTR_ERR (env); - io = &osc_env_info (env)->oti_io; + io =osc_env_thread_io (env); io->ci_obj =cl_object_top (osc2cl (obj)); io->ci_ignore_layout =1 ; rc =cl_io_init (env, io,CIT_MISC , io->ci_obj);
@@ -3180,7 +3180,7 @@ int osc_lock_discard_pages(const struct lu_env *env, struct osc_object *osc, pgoff_t start, pgoff_t end, bool discard) { struct osc_thread_info *info = osc_env_info(env); -struct cl_io *io = &info->oti_io; +struct cl_io *io =osc_env_thread_io (env);osc_page_gang_cbt cb;int result;
fs/lustre/osc/osc_internal.h +8 -0
@@ -89,6 +89,14 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,extern struct lu_device_type osc_device_type; +static inline struct cl_io *osc_env_thread_io (const struct lu_env *env) +{ +struct cl_io *io = &osc_env_info (env)->oti_io; + +memset (io,0 ,sizeof (*io)); +return io; +} +static inline int osc_is_object (const struct lu_object *obj) {return obj->lo_dev->ld_type == &osc_device_type;
fs/lustre/osc/osc_lock.c +1 -1
@@ -618,7 +618,7 @@ static unsigned long osc_lock_weight(const struct lu_env *env,struct osc_object *oscobj, struct ldlm_extent *extent) { - struct cl_io *io = &osc_env_info(env)->oti_io; + struct cl_io *io = osc_env_thread_io(env);struct cl_object *obj =cl_object_top (&oscobj->oo_cl);pgoff_t page_index;int result;
fs/lustre/osc/osc_page.c +1 -1
@@ -560,7 +560,7 @@ long osc_lru_shrink(const struct lu_env *env, struct client_obd *cli, } pvec = (struct cl_page **)osc_env_info (env)->oti_pvec; - io = &osc_env_info (env)->oti_io; + io =osc_env_thread_io (env);spin_lock (&cli->cl_lru_list_lock);if (force)
Signature · 1 line
1.8.3.1
PATCH 65/151 lustre: flr: add infrastructure to create a new mirror
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
This patch adds the initial code to support file level redundancy phase 1. Details about the implementation can be read at
http://wiki.lustre.org/File_Level_Replication_High_Level_Design.
Add the definitions for FLR support to the UAPI headers. These values are also placed in RPC packets to send to the servers. We expand both enum mds_op_bias and enum lu_xattr_flags with the 'MERGE' values that cover the FLR support.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: b879bbc27db5 ("LU-9771 flr: add infrastructure to create a new mirror")
Reviewed-on: https://review.whamcloud.com/29083
--- fs/lustre/include/lu_object.h | 3 ++- fs/lustre/llite/file.c | 38 +++++++++++++++++---------- fs/lustre/lov/lov_ea.c | 1 + fs/lustre/lov/lov_internal.h | 3 ++- fs/lustre/lov/lov_pack.c | 1 + fs/lustre/mdc/mdc_lib.c | 3 +-- fs/lustre/mdc/mdc_request.c | 3 ++- fs/lustre/ptlrpc/pack_generic.c | 1 + fs/lustre/ptlrpc/wiretest.c | 18 +++++++++++-- include/uapi/linux/lustre/lustre_idl.h | 4 +++ include/uapi/linux/lustre/lustre_user.h | 46 ++++++++++++++++++++++++++++++++- 11 files changed, 99 insertions(+), 22 deletions(-)
fs/lustre/include/lu_object.h +2 -1
@@ -864,7 +864,8 @@ struct lu_rdpg {enum lu_xattr_flags {LU_XATTR_REPLACE = (1 <<0 ), -LU_XATTR_CREATE = (1 <<1 ) +LU_XATTR_CREATE =BIT (1 ), +LU_XATTR_MERGE =BIT (2 ), };/** @} helpers */
fs/lustre/llite/file.c +24 -14
@@ -147,9 +147,10 @@ static int ll_close_inode_openhandle(struct inode *inode,ll_prepare_close (inode, op_data, och);switch (bias) { +case MDS_CLOSE_LAYOUT_MERGE :case MDS_CLOSE_LAYOUT_SWAP :LASSERT (data); - op_data->op_bias |=MDS_CLOSE_LAYOUT_SWAP ; + op_data->op_bias |= bias; op_data->op_data_version =0 ; op_data->op_lease_handle = och->och_lease_handle; op_data->op_fid2 = *ll_inode2fid (data);
@@ -175,8 +176,7 @@ static int ll_close_inode_openhandle(struct inode *inode, md_exp->exp_obd->obd_name, PFID(&lli->lli_fid), rc); } -if (op_data->op_bias & (MDS_HSM_RELEASE |MDS_CLOSE_LAYOUT_SWAP ) && - !rc) { +if (rc ==0 && (op_data->op_bias & bias)) {struct mdt_body *body; body =req_capsule_server_get (&req->rq_pill, &RMF_MDT_BODY );
@@ -948,10 +948,12 @@ static int ll_check_swap_layouts_validity(struct inode *inode1, }static int ll_swap_layouts_close (struct obd_client_handle *och, -struct inode *inode,struct inode *inode2) +struct inode *inode,struct inode *inode2, +int intent) {const struct lu_fid *fid1 =ll_inode2fid (inode);const struct lu_fid *fid2; +enum mds_op_bias bias;int rc; CDEBUG(D_INODE, "%s: biased close of file " DFID "\n",
@@ -970,13 +972,24 @@ static int ll_swap_layouts_close(struct obd_client_handle *och, goto out_free_och; } +switch (intent) { +case SWAP_LAYOUTS_CLOSE : + bias =MDS_CLOSE_LAYOUT_SWAP ; +break ; +case MERGE_LAYOUTS_CLOSE : + bias =MDS_CLOSE_LAYOUT_MERGE ; +break ; +default : + rc = -EOPNOTSUPP ; + goto out_free_och; + } +/* -* Close the file and swap layouts between inode & inode2. +* Close the file and {swap,merge} layouts between inode & inode2. * NB: lease lock handle is released in mdc_close_layout_swap_pack() * because we still need it to pack l_remote_handle to MDT. */ - rc =ll_close_inode_openhandle (inode, och,MDS_CLOSE_LAYOUT_SWAP , - inode2); + rc =ll_close_inode_openhandle (inode, och, bias, inode2); och =NULL ;/* freed in ll_close_inode_openhandle() */
@@ -2557,6 +2570,7 @@ int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd,case LL_IOC_LOV_SWAP_LAYOUTS : {struct file *file2;struct lustre_swap_layouts lsl; +u64 intent;if (copy_from_user (&lsl, (char __user *)arg,sizeof (struct lustre_swap_layouts )))
@@ -2575,16 +2589,12 @@ int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd, goto out; } -if (lsl.sl_flags &SWAP_LAYOUTS_CLOSE ) { + intent = lsl.sl_flags &INTENT_LAYOUTS_CLOSE ; +if (intent) {struct obd_client_handle *och =NULL ;struct ll_inode_info *lli;struct inode *inode2; -if (lsl.sl_flags !=SWAP_LAYOUTS_CLOSE ) { - rc = -EINVAL ; - goto out; - } - lli =ll_i2info (inode);mutex_lock (&lli->lli_och_mutex);if (fd->fd_lease_och) {
@@ -2597,7 +2607,7 @@ int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd, goto out; } inode2 =file_inode (file2); - rc =ll_swap_layouts_close (och, inode, inode2); + rc =ll_swap_layouts_close (och, inode, inode2, intent); }else { rc =ll_swap_layouts (file, file2, &lsl); }
fs/lustre/lov/lov_ea.c +1 -0
@@ -446,6 +446,7 @@ static int lsm_verify_comp_md_v1(struct lov_comp_md_v1 *lcm, lsm->lsm_magic =le32_to_cpu (lcm->lcm_magic); lsm->lsm_layout_gen =le32_to_cpu (lcm->lcm_layout_gen); lsm->lsm_entry_count = entry_count; + lsm->lsm_mirror_count =le16_to_cpu (lcm->lcm_mirror_count); lsm->lsm_flags =le16_to_cpu (lcm->lcm_flags); lsm->lsm_is_released = true; lsm->lsm_maxbytes =LLONG_MIN ;
fs/lustre/lov/lov_internal.h +2 -1
@@ -88,7 +88,8 @@ struct lov_stripe_md {u32 lsm_layout_gen;u16 lsm_flags;bool lsm_is_released; -u32 lsm_entry_count; +u16 lsm_mirror_count; +u16 lsm_entry_count;struct lov_stripe_md_entry *lsm_entries[]; };
fs/lustre/lov/lov_pack.c +1 -0
@@ -186,6 +186,7 @@ ssize_t lov_lsm_pack(const struct lov_stripe_md *lsm, void *buf, lcmv1->lcm_size =cpu_to_le32 (lmm_size); lcmv1->lcm_layout_gen =cpu_to_le32 (lsm->lsm_layout_gen); lcmv1->lcm_flags =cpu_to_le16 (lsm->lsm_flags); + lcmv1->lcm_mirror_count =cpu_to_le16 (lsm->lsm_mirror_count); lcmv1->lcm_entry_count =cpu_to_le16 (lsm->lsm_entry_count); offset =sizeof (*lcmv1) +sizeof (*lcme) * lsm->lsm_entry_count;
fs/lustre/mdc/mdc_lib.c +1 -2
@@ -431,8 +431,7 @@ static void mdc_intent_close_pack(struct ptlrpc_request *req,struct close_data *data;struct ldlm_lock *lock; -if (!(bias & (MDS_HSM_RELEASE |MDS_CLOSE_LAYOUT_SWAP | -MDS_RENAME_MIGRATE ))) +if (!(bias & (MDS_CLOSE_INTENT |MDS_RENAME_MIGRATE )))return ; data =req_capsule_client_get (&req->rq_pill, &RMF_CLOSE_DATA );
fs/lustre/mdc/mdc_request.c +2 -1
@@ -776,7 +776,8 @@ static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,/* save the errcode and proceed to close */ saved_rc = rc; } - }else if (op_data->op_bias &MDS_CLOSE_LAYOUT_SWAP ) { + }else if (op_data->op_bias & (MDS_CLOSE_LAYOUT_SWAP | +MDS_CLOSE_LAYOUT_MERGE )) { req_fmt = &RQF_MDS_INTENT_CLOSE ; }else { req_fmt = &RQF_MDS_CLOSE ;
fs/lustre/ptlrpc/pack_generic.c +1 -0
@@ -2018,6 +2018,7 @@ void lustre_swab_lov_comp_md_v1(struct lov_comp_md_v1 *lum)__swab32s (&lum->lcm_layout_gen);__swab16s (&lum->lcm_flags);__swab16s (&lum->lcm_entry_count); +__swab16s (&lum->lcm_mirror_count); BUILD_BUG_ON(offsetof(typeof(*lum), lcm_padding1) == 0); BUILD_BUG_ON(offsetof(typeof(*lum), lcm_padding2) == 0);
fs/lustre/ptlrpc/wiretest.c +16 -2
@@ -1513,6 +1513,8 @@ void lustre_assert_wire_constants(void) (long long)(int)sizeof(((struct lov_comp_md_entry_v1 *)0)->lcme_padding));LASSERTF (LCME_FL_INIT ==0x00000010UL ,"found 0x%.8xUL\n" , (unsigned int )LCME_FL_INIT ); +LASSERTF (LCME_FL_NEG ==0x80000000UL ,"found 0x%.8xUL\n" , + (unsigned int )LCME_FL_NEG );/* Checks for struct lov_comp_md_v1 */ LASSERTF((int)sizeof(struct lov_comp_md_v1) == 32, "found %lld\n",
@@ -1537,9 +1539,13 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct lov_comp_md_v1, lcm_entry_count));LASSERTF ((int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_entry_count) ==2 ,"found %lld\n" , (long long )(int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_entry_count)); -LASSERTF ((int )offsetof(struct lov_comp_md_v1 , lcm_padding1) ==16 ,"found %lld\n" , +LASSERTF ((int )offsetof(struct lov_comp_md_v1 , lcm_mirror_count) ==16 ,"found %lld\n" , + (long long )(int )offsetof(struct lov_comp_md_v1 , lcm_mirror_count)); +LASSERTF ((int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_mirror_count) ==2 ,"found %lld\n" , + (long long )(int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_mirror_count)); +LASSERTF ((int )offsetof(struct lov_comp_md_v1 , lcm_padding1) ==18 ,"found %lld\n" , (long long )(int )offsetof(struct lov_comp_md_v1 , lcm_padding1)); -LASSERTF ((int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_padding1) ==8 ,"found %lld\n" , +LASSERTF ((int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_padding1) ==6 ,"found %lld\n" , (long long )(int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_padding1));LASSERTF ((int )offsetof(struct lov_comp_md_v1 , lcm_padding2) ==24 ,"found %lld\n" , (long long )(int )offsetof(struct lov_comp_md_v1 , lcm_padding2));
@@ -1550,6 +1556,14 @@ void lustre_assert_wire_constants(void)LASSERTF ((int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_entries[0 ]) ==48 ,"found %lld\n" , (long long )(int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_entries[0 ]));BUILD_BUG_ON (LOV_MAGIC_COMP_V1 != (0x0BD60000 |0x0BD0 )); +LASSERTF (LCM_FL_NOT_FLR ==0 ,"found %lld\n" , + (long long )LCM_FL_NOT_FLR ); +LASSERTF (LCM_FL_RDONLY ==1 ,"found %lld\n" , + (long long )LCM_FL_RDONLY ); +LASSERTF (LCM_FL_WRITE_PENDING ==2 ,"found %lld\n" , + (long long )LCM_FL_WRITE_PENDING ); +LASSERTF (LCM_FL_SYNC_PENDING ==3 ,"found %lld\n" , + (long long )LCM_FL_SYNC_PENDING );/* Checks for struct lmv_mds_md_v1 */ LASSERTF((int)sizeof(struct lmv_mds_md_v1) == 56, "found %lld\n",
include/uapi/linux/lustre/lustre_idl.h +4 -0
@@ -1686,8 +1686,12 @@ enum mds_op_bias {MDS_HSM_RELEASE =1 <<12 ,MDS_RENAME_MIGRATE =1 <<13 ,MDS_CLOSE_LAYOUT_SWAP =1 <<14 , + MDS_CLOSE_LAYOUT_MERGE = 1 << 15, }; +#define MDS_CLOSE_INTENT (MDS_HSM_RELEASE | MDS_CLOSE_LAYOUT_SWAP | \ + MDS_CLOSE_LAYOUT_MERGE) +/* instance of mdt_reint_rec */ struct mdt_rec_create { __u32 cr_opcode;
include/uapi/linux/lustre/lustre_user.h +45 -1
74 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 66/151 lustre: clio: no glimpse for data immutable file
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
When merging a layout to an existing file as a mirror, client will report the size and blocks to the MDT, which will be set to the MDT object. In that case, if the MDT discovers a mirrored file in READ_ONLY state, it will report the size and blocks. Clients should take this advantage and skip glimpse.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: ce61bcac8661 ("LU-9771 clio: no glimpse for data immutable file")
Reviewed-on: https://review.whamcloud.com/29084
--- fs/lustre/llite/file.c | 5 +++++ fs/lustre/lov/lov_io.c | 22 ++++++++++++++++------ include/uapi/linux/lustre/lustre_idl.h | 1 + include/uapi/linux/lustre/lustre_user.h | 11 +++++++++++ 4 files changed, 33 insertions(+), 6 deletions(-)
fs/lustre/llite/file.c +5 -0
@@ -148,6 +148,11 @@ static int ll_close_inode_openhandle(struct inode *inode,ll_prepare_close (inode, op_data, och);switch (bias) {case MDS_CLOSE_LAYOUT_MERGE : +/* merge blocks from the victim inode */ + op_data->op_attr_blocks += ((struct inode *)data)->i_blocks; + op_data->op_attr.ia_valid |=ATTR_SIZE ; + op_data->op_xvalid |=OP_XVALID_BLOCKS ; +/* fallthrough */ case MDS_CLOSE_LAYOUT_SWAP :LASSERT (data); op_data->op_bias |= bias;
fs/lustre/lov/lov_io.c +16 -6
@@ -257,6 +257,13 @@ static int lov_io_slice_init(struct lov_io *lio, struct lov_object *obj, }case CIT_GLIMPSE : + lio->lis_pos =0 ; + lio->lis_endpos =OBD_OBJECT_EOF ; + +if ((obj->lo_lsm->lsm_flags &LCM_FL_FLR_MASK ) ==LCM_FL_RDONLY ) +return 1 ;/* SoM is accurate, no need glimpse */ +break ; +case CIT_MISC : lio->lis_pos =0 ; lio->lis_endpos =OBD_OBJECT_EOF ;
@@ -1068,18 +1075,21 @@ int lov_io_init_composite(const struct lu_env *env, struct cl_object *obj, {struct lov_io *lio =lov_env_io (env);struct lov_object *lov =cl2lov (obj); +int result;INIT_LIST_HEAD (&lio->lis_active); - io->ci_result =lov_io_slice_init (lio, lov, io); -if (io->ci_result) -return io->ci_result; + result =lov_io_slice_init (lio, lov, io); +if (result) + goto out; - io->ci_result =lov_io_subio_init (env, lio, io); -if (io->ci_result ==0 ) { + result =lov_io_subio_init (env, lio, io); +if (!result) {cl_io_slice_add (io, &lio->lis_cl, obj, &lov_io_ops);atomic_inc (&lov->lo_active_ios); } -return io->ci_result; +out: + io->ci_result = result <0 ? result :0 ; +return result; } int lov_io_init_empty(const struct lu_env *env, struct cl_object *obj,
include/uapi/linux/lustre/lustre_idl.h +1 -0
@@ -1015,6 +1015,7 @@ struct lov_mds_md_v1 { /* LOV EA mds/wire data (little-endian) */#define XATTR_SECURITY_PREFIX "security."#define XATTR_LUSTRE_PREFIX "lustre." +#define XATTR_NAME_SOM "trusted.som"#define XATTR_NAME_LOV "trusted.lov"#define XATTR_NAME_LMA "trusted.lma"#define XATTR_NAME_LMV "trusted.lmv"
include/uapi/linux/lustre/lustre_user.h +11 -0
@@ -201,6 +201,17 @@ struct lustre_mdt_attrs {*/ #define LMA_OLD_SIZE (sizeof(struct lustre_mdt_attrs) + 5 * sizeof(__u64)) +enum { +LSOM_FL_VALID =1 <<0 , +}; + +struct lustre_som_attrs { +__u16 lsa_valid; +__u16 lsa_reserved[3 ]; +__u64 lsa_size; +__u64 lsa_blocks; +}; +/** * OST object IDentifier. */
Signature · 1 line
1.8.3.1
PATCH 67/151 lustre: flr: read support for flr
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
Avoid stale mirrors to read;
If preferred mirror is inaccessible, try next one, ndelay RPC is implemented to make the error-out quick. ndelay RPC has rq_no_delay bit set that can be applied to brw and lock RPC.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 526dbd3d8723 ("LU-9971 flr: read support for flr")
Reviewed-on: https://review.whamcloud.com/29085
--- fs/lustre/include/cl_object.h | 22 +++- fs/lustre/include/lustre_dlm_flags.h | 7 ++ fs/lustre/include/lustre_osc.h | 6 +- fs/lustre/include/obd_support.h | 3 + fs/lustre/ldlm/ldlm_request.c | 9 ++ fs/lustre/llite/file.c | 14 +++ fs/lustre/llite/glimpse.c | 12 ++- fs/lustre/llite/rw.c | 28 ++++- fs/lustre/llite/vvp_internal.h | 1 + fs/lustre/llite/vvp_io.c | 55 +++++++--- fs/lustre/llite/vvp_page.c | 9 +- fs/lustre/lov/lov_cl_internal.h | 186 +++++++++++++++++++++++++++------ fs/lustre/lov/lov_io.c | 183 ++++++++++++++++++++++++++++---- fs/lustre/lov/lov_lock.c | 15 +-- fs/lustre/lov/lov_object.c | 147 +++++++++++++++++++++----- fs/lustre/lov/lov_page.c | 2 +- fs/lustre/obdclass/cl_io.c | 14 ++- fs/lustre/osc/osc_cache.c | 8 +- fs/lustre/osc/osc_io.c | 9 +- fs/lustre/osc/osc_lock.c | 4 + fs/lustre/osc/osc_request.c | 15 ++- include/uapi/linux/lustre/lustre_idl.h | 4 + 22 files changed, 623 insertions(+), 130 deletions(-)
fs/lustre/include/cl_object.h +18 -4
@@ -1871,7 +1871,20 @@ struct cl_io {*/ ci_noatime:1, /* Tell sublayers not to expand LDLM locks requested for this IO */ - ci_lock_no_expand:1; + ci_lock_no_expand:1, +/** +* Set if non-delay RPC should be used for this IO. +* +* If this file has multiple mirrors, and if the OSTs of the current +* mirror is inaccessible, non-delay RPC would error out quickly so +* that the upper layer can try to access the next mirror. +*/ + ci_ndelay:1; +/** +* How many times the read has retried before this one. +* Set by the top level and consumed by the LOV. +*/ +unsigned int ci_ndelay_tried;/** * Number of pages owned by this IO. For invariant checking. */
@@ -2336,9 +2349,8 @@ static inline int cl_io_is_trunc(const struct cl_io *io)do { \typeof (foo_io) __foo_io = (foo_io); \ \ - BUILD_BUG_ON(offsetof(typeof(*__foo_io), base) != 0); \ -memset (&__foo_io->base +1 ,0 , \ -sizeof (*__foo_io) -sizeof (__foo_io->base)); \ +memset (&__foo_io->base,0 , \ + sizeof(*__foo_io) - offsetof(typeof(*__foo_io), base)); \ }while (0 )/** @} cl_io */
@@ -2385,6 +2397,8 @@ void cl_page_list_del(const struct lu_env *env, struct cl_page_list *plist, struct cl_page *page);void cl_page_list_disown (const struct lu_env *env,struct cl_io *io,struct cl_page_list *plist); +void cl_page_list_discard (const struct lu_env *env, +struct cl_io *io,struct cl_page_list *plist);void cl_page_list_fini (const struct lu_env *env,struct cl_page_list *plist);void cl_2queue_init (struct cl_2queue *queue);
fs/lustre/include/lustre_dlm_flags.h +7 -0
@@ -391,6 +391,13 @@#define ldlm_set_excl (_l) LDLM_SET_FLAG((_l), 1ULL << 55)#define ldlm_clear_excl (_l) LDLM_CLEAR_FLAG((_l), 1ULL << 55) +/** +* This flags means to use non-delay RPC to send dlm request RPC. +*/ +#define LDLM_FL_NDELAY 0x0400000000000000ULL/* bit 58 */ +#define ldlm_is_ndelay (_l) LDLM_TEST_FLAG((_l), 1ULL << 58) +#define ldlm_set_ndelay (_l) LDLM_SET_FLAG((_l), 1ULL << 58) +/** l_flags bits marked as "ast" bits */ #define LDLM_FL_AST_MASK (LDLM_FL_FLOCK_DEADLOCK |\ LDLM_FL_DISCARD_DATA)
fs/lustre/include/lustre_osc.h +4 -2
@@ -587,7 +587,7 @@ int osc_teardown_async_page(const struct lu_env *env, struct osc_object *obj,int osc_flush_async_page (const struct lu_env *env,struct cl_io *io,struct osc_page *ops);int osc_queue_sync_pages (const struct lu_env *env,struct osc_object *obj, -struct list_head *list,int cmd,int brw_flags); +struct list_head *list,int brw_flags);int osc_cache_truncate_start (const struct lu_env *env,struct osc_object *obj,u64 size,struct osc_extent **extp);void osc_cache_truncate_end (const struct lu_env *env,struct osc_extent *ext);
@@ -927,7 +927,9 @@ struct osc_extent {/* this extent should be written back asap. set if one of pages is * called by page WB daemon, or sync write or reading requests. */ - oe_urgent:1 ; + oe_urgent:1 , +/* Non-delay RPC should be used for this extent. */ + oe_ndelay:1;/* how many grants allocated for this extent. * Grant allocated for this extent. There is no grant allocated * for reading extents and sync write extents.
fs/lustre/include/obd_support.h +3 -0
@@ -474,6 +474,9 @@/* LMV */ #define OBD_FAIL_UNKNOWN_LMV_STRIPE 0x1901 +/* FLR */ +#define OBD_FAIL_FLR_GLIMPSE_IMMUTABLE 0x1A00 +/* Assign references to moved code to reduce code changes */ #define OBD_FAIL_PRECHECK (id) CFS_FAIL_PRECHECK(id)#define OBD_FAIL_CHECK (id) CFS_FAIL_CHECK(id)
fs/lustre/ldlm/ldlm_request.c +9 -0
@@ -748,6 +748,15 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, DLM_LOCKREQ_OFF, len, (int)sizeof(*body)); } +if (*flags &LDLM_FL_NDELAY ) { +DEBUG_REQ (D_DLMTRACE , req,"enque lock with no delay\n" ); + req->rq_no_resend = req->rq_no_delay =1 ; +/* probably set a shorter timeout value and handle ETIMEDOUT +* in osc_lock_upcall() correctly +*/ +/* lustre_msg_set_timeout(req, req->rq_timeout / 2); */ + } +/* Dump lock data into the request buffer */ body =req_capsule_client_get (&req->rq_pill, &RMF_DLM_REQ );ldlm_lock2desc (lock, &body->lock_desc);
fs/lustre/llite/file.c +14 -0
@@ -1155,6 +1155,11 @@ static void ll_io_init(struct cl_io *io, const struct file *file, int write) } io->ci_noatime =file_is_noatime (file); + +/* FLR: only use non-delay I/O for read as there is only one +* available mirror for write. +*/ + io->ci_ndelay = !write; } static ssize_t
@@ -1169,6 +1174,7 @@ static void ll_io_init(struct cl_io *io, const struct file *file, int write)struct cl_io *io;ssize_t result =0 ;int rc =0 ; +unsigned int retried =0 ;CDEBUG (D_VFSTRACE ,"file: %pD, type: %d ppos: %llu, count: %zu\n" , file, iot, *ppos, count);
@@ -1176,6 +1182,7 @@ static void ll_io_init(struct cl_io *io, const struct file *file, int write) restart: io =vvp_env_thread_io (env);ll_io_init (io, file, iot ==CIT_WRITE ); + io->ci_ndelay_tried = retried;if (cl_io_rw_init (env, io, iot, *ppos, count) ==0 ) {struct vvp_io *vio =vvp_env_io (env);
@@ -1232,12 +1239,19 @@ static void ll_io_init(struct cl_io *io, const struct file *file, int write) out:cl_io_fini (env, io); +CDEBUG (D_VFSTRACE , +"%s: %d io complete with rc: %d, result: %zd, restart: %d\n" , + file->f_path.dentry->d_name.name, + iot, rc, result, io->ci_need_restart); +if ((!rc || rc == -ENODATA ) && count >0 && io->ci_need_restart) {CDEBUG (D_VFSTRACE ,"%s: restart %s from %lld, count:%zu, result: %zd\n" ,file_dentry (file)->d_name.name, iot ==CIT_READ ?"read" :"write" , *ppos, count, result); +/* preserve the tried count for FLR */ + retried = io->ci_ndelay_tried; goto restart; }
fs/lustre/llite/glimpse.c +8 -4
@@ -187,24 +187,28 @@ int __cl_glimpse_size(struct inode *inode, int agl)struct cl_io *io =NULL ;int result;u16 refcheck; +int retried =0 ; result =cl_io_get (inode, &env, &io, &refcheck);if (result <=0 )return result; do { - io->ci_need_restart = 0; - io->ci_verify_layout = 1; + io->ci_ndelay_tried = retried++; + io->ci_ndelay = io->ci_verify_layout = 1; result = cl_io_init(env, io, CIT_GLIMPSE, io->ci_obj); - if (result > 0) + if (result > 0) { /* * nothing to do for this io. This currently happens * when stripe sub-object's are not yet created. */ result = io->ci_result; - else if (result == 0) + } else if (result == 0) { result = cl_glimpse_lock(env, io, inode, io->ci_obj, agl); + if (!agl && result == -EWOULDBLOCK) + io->ci_need_restart = 1; + } OBD_FAIL_TIMEOUT(OBD_FAIL_GLIMPSE_DELAY, 2); cl_io_fini(env, io);
fs/lustre/llite/rw.c +27 -1
@@ -1100,8 +1100,9 @@ static int ll_io_read_page(const struct lu_env *env, struct cl_io *io,struct inode *inode =vvp_object_inode (page->cp_obj);struct ll_file_data *fd =LUSTRE_FPRIVATE (file);struct ll_readahead_state *ras = &fd->fd_ras; -struct cl_2queue *queue = &io->ci_queue; +struct cl_2queue *queue = &io->ci_queue;struct ll_sb_info *sbi =ll_i2sbi (inode); +struct cl_sync_io *anchor =NULL ;struct vvp_page *vpg;bool uptodate;int rc =0 ;
@@ -1128,6 +1129,10 @@ static int ll_io_read_page(const struct lu_env *env, struct cl_io *io,cl_page_export (env, page,1 );cl_page_disown (env, io, page); }else { + anchor = &vvp_env_info (env)->vti_anchor; +cl_sync_io_init (anchor,1 ); + page->cp_sync_io = anchor; +cl_page_list_add (&queue->c2_qin, page); }
@@ -1148,6 +1153,27 @@ static int ll_io_read_page(const struct lu_env *env, struct cl_io *io,if (!rc)task_io_account_read (PAGE_SIZE * count); } +if (anchor && !cl_page_is_owned (page, io)) {/* have sent */ + rc =cl_sync_io_wait (env, anchor,0 ); + +cl_page_assume (env, io, page); +cl_page_list_del (env, &queue->c2_qout, page); + +if (!PageUptodate (cl_page_vmpage (page))) { +/* Failed to read a mirror, discard this page so that +* new page can be created with new mirror. +* +* TODO: this is not needed after page reinit +* route is implemented +*/ +cl_page_discard (env, io, page); + } +cl_page_disown (env, io, page); + } + +/* TODO: discard all pages until page reinit route is implemented */ +cl_page_list_discard (env, io, &queue->c2_qin); +/* * Unlock unsent pages in case of error. */
fs/lustre/llite/vvp_internal.h +1 -0
@@ -127,6 +127,7 @@ struct vvp_thread_info {struct cl_lock_descr vti_descr;struct cl_io vti_io;struct cl_attr vti_attr; +struct cl_sync_io vti_anchor; };static inline struct vvp_thread_info *vvp_env_info (const struct lu_env *env)
fs/lustre/llite/vvp_io.c +41 -14
101 lines not on this page · raw message
fs/lustre/llite/vvp_page.c +8 -1
@@ -267,8 +267,15 @@ static void vvp_page_completion_read(const struct lu_env *env,if (ioret ==0 ) {if (!vpg->vpg_defer_uptodate)cl_page_export (env, page,1 ); - }else { + }else if (vpg->vpg_defer_uptodate) { vpg->vpg_defer_uptodate =0 ; +if (ioret == -EWOULDBLOCK ) { +/* mirror read failed, it needs to destroy the page +* because subpage would be from wrong osc when trying +* to read from a new mirror +*/ +generic_error_remove_page (vmpage->mapping, vmpage); + } }if (!page->cp_sync_io)
fs/lustre/lov/lov_cl_internal.h +153 -33
240 lines not on this page · raw message
fs/lustre/lov/lov_io.c +162 -21
291 lines not on this page · raw message
fs/lustre/lov/lov_lock.c +2 -13
@@ -131,15 +131,9 @@ static struct lov_lock *lov_lock_sub_init(const struct lu_env *env, ext.e_end = cl_offset(obj, lock->cll_descr.cld_end + 1); nr = 0; - for (index = lov_lsm_entry(lov->lo_lsm, ext.e_start); - index >= 0 && index < lov->lo_lsm->lsm_entry_count; index++) { + lov_foreach_io_layout(index, lov_env_io(env), &ext) { struct lov_layout_raid0 *r0 = lov_r0(lov, index); - /* assume lsm entries are sorted. */ - if (!lu_extent_is_overlapped(&ext, - &lov_lse(lov, index)->lsme_extent)) - break; - for (i = 0; i < r0->lo_nr; i++) { if (likely(r0->lo_sub[i]) && /* spare layout */ lov_stripe_intersects(lov->lo_lsm, index, i,
@@ -160,14 +154,9 @@ static struct lov_lock *lov_lock_sub_init(const struct lu_env *env, lovlck->lls_nr = nr; nr =0 ; -for (index =lov_lsm_entry (lov->lo_lsm, ext.e_start); - index >=0 && index < lov->lo_lsm->lsm_entry_count; index++) { + lov_foreach_io_layout(index, lov_env_io(env), &ext) {struct lov_layout_raid0 *r0 =lov_r0 (lov, index); -/* assume lsm entries are sorted. */ -if (!lu_extent_is_overlapped (&ext, - &lov_lse (lov, index)->lsme_extent)) -break ;for (i =0 ; i < r0->lo_nr; ++i) {struct lov_lock_sub *lls = &lovlck->lls_sub[nr];struct cl_lock_descr *descr = &lls->sub_lock.cll_descr;
fs/lustre/lov/lov_object.c +122 -25
260 lines not on this page · raw message
fs/lustre/lov/lov_page.c +1 -1
@@ -82,7 +82,7 @@ int lov_page_init_composite(const struct lu_env *env, struct cl_object *obj,int rc; offset =cl_offset (obj, index); - entry =lov_lsm_entry (loo->lo_lsm, offset); + entry =lov_io_layout_at (lio, offset);if (entry <0 || !lsm_entry_inited (loo->lo_lsm, entry)) {/* non-existing layout component */ lov_page_init_empty (env, obj, page, index);
fs/lustre/obdclass/cl_io.c +12 -2
@@ -191,6 +191,9 @@ int cl_io_init(const struct lu_env *env, struct cl_io *io, {LASSERT (obj ==cl_object_top (obj)); +/* clear I/O restart from previous instance */ + io->ci_need_restart =0 ; +return __cl_io_init (env, io, iot, obj); }EXPORT_SYMBOL (cl_io_init);
@@ -722,6 +725,12 @@ int cl_io_loop(const struct lu_env *env, struct cl_io *io) }cl_io_iter_fini (env, io); }while (result ==0 && io->ci_continue); + +if (result == -EWOULDBLOCK && io->ci_ndelay) { + io->ci_need_restart =1 ; + result =0 ; + } +if (result ==0 ) result = io->ci_result;return result <0 ? result :0 ;
@@ -917,8 +926,8 @@ static void cl_page_list_assume(const struct lu_env *env,/** * Discards all pages in a queue. */ -static void cl_page_list_discard (const struct lu_env *env,struct cl_io *io, -struct cl_page_list *plist) +void cl_page_list_discard (const struct lu_env *env,struct cl_io *io, +struct cl_page_list *plist) {struct cl_page *page;
@@ -926,6 +935,7 @@ static void cl_page_list_discard(const struct lu_env *env, struct cl_io *io,cl_page_list_for_each (page, plist)cl_page_discard (env, io, page); } +EXPORT_SYMBOL (cl_page_list_discard);/** * Initialize dual page queue.
fs/lustre/osc/osc_cache.c +5 -3
@@ -1916,6 +1916,7 @@ static int try_to_add_extent_for_io(struct client_obd *cli,if (tmp->oe_srvlock != ext->oe_srvlock || !tmp->oe_grants != !ext->oe_grants || + tmp->oe_ndelay != ext->oe_ndelay || tmp->oe_no_merge || ext->oe_no_merge)return 0 ;
@@ -2604,7 +2605,7 @@ int osc_flush_async_page(const struct lu_env *env, struct cl_io *io, }int osc_queue_sync_pages (const struct lu_env *env,struct osc_object *obj, -struct list_head *list,int cmd,int brw_flags) +struct list_head *list,int brw_flags) {struct client_obd *cli =osc_cli (obj);struct osc_extent *ext;
@@ -2642,7 +2643,7 @@ int osc_queue_sync_pages(const struct lu_env *env, struct osc_object *obj,return -ENOMEM ; } - ext->oe_rw = !!(cmd &OBD_BRW_READ ); + ext->oe_rw = !!(brw_flags &OBD_BRW_READ ); ext->oe_sync =1 ; ext->oe_no_merge = !can_merge; ext->oe_urgent =1 ;
@@ -2651,6 +2652,7 @@ int osc_queue_sync_pages(const struct lu_env *env, struct osc_object *obj, ext->oe_max_end = end; ext->oe_obj = obj; ext->oe_srvlock = !!(brw_flags &OBD_BRW_SRVLOCK ); + ext->oe_ndelay = !!(brw_flags &OBD_BRW_NDELAY ); ext->oe_nr_pages = page_count; ext->oe_mppr = mppr;list_splice_init (list, &ext->oe_pages);
@@ -2658,7 +2660,7 @@ int osc_queue_sync_pages(const struct lu_env *env, struct osc_object *obj,osc_object_lock (obj);/* Reuse the initial refcount for RPC, don't drop it */ osc_extent_state_set (ext,OES_LOCK_DONE ); -if (cmd &OBD_BRW_WRITE ) { +if (!ext->oe_rw) {/* write */ list_add_tail (&ext->oe_link, &obj->oo_urgent_exts);osc_update_pending (obj,OBD_BRW_WRITE , page_count); }else {
fs/lustre/osc/osc_io.c +5 -4
@@ -120,7 +120,6 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,struct cl_page_list *qout = &queue->c2_qout;unsigned int queued =0 ;int result =0 ; -int cmd;int brw_flags;unsigned int max_pages;
@@ -132,8 +131,10 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios, cli =osc_cli (osc); max_pages = cli->cl_max_pages_per_rpc; - cmd = crt ==CRT_WRITE ?OBD_BRW_WRITE :OBD_BRW_READ ; brw_flags =osc_io_srvlock (cl2osc_io (env, ios)) ?OBD_BRW_SRVLOCK :0 ; + brw_flags |= crt ==CRT_WRITE ?OBD_BRW_WRITE :OBD_BRW_READ ; +if (crt ==CRT_READ && ios->cis_io->ci_ndelay) + brw_flags |=OBD_BRW_NDELAY ;/* * NOTE: here @page is a top-level page. This is done to avoid
@@ -187,7 +188,7 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,if (++queued == max_pages) { queued =0 ; - result =osc_queue_sync_pages (env, osc, &list, cmd, + result =osc_queue_sync_pages (env, osc, &list, brw_flags);if (result <0 )break ;
@@ -195,7 +196,7 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios, }if (queued >0 ) - result =osc_queue_sync_pages (env, osc, &list, cmd, brw_flags); + result =osc_queue_sync_pages (env, osc, &list, brw_flags);/* Update c/mtime for sync write. LU-7310 */ if (crt ==CRT_WRITE && qout->pl_nr >0 && !result) {
fs/lustre/osc/osc_lock.c +4 -0
@@ -301,6 +301,8 @@ static int osc_lock_upcall(void *cookie, struct lustre_handle *lockh, NULL, &oscl->ols_lvb);/* Hide the error. */ rc =0 ; + }else if (rc <0 && oscl->ols_flags &LDLM_FL_NDELAY ) { + rc = -EWOULDBLOCK ; }if (oscl->ols_owner)
@@ -1167,6 +1169,8 @@ int osc_lock_init(const struct lu_env *env, oscl->ols_flags |=LDLM_FL_BLOCK_GRANTED ; oscl->ols_glimpse =1 ; } +if (io->ci_ndelay &&cl_object_same (io->ci_obj, obj)) + oscl->ols_flags |=LDLM_FL_NDELAY ;osc_lock_build_einfo (env, lock,cl2osc (obj), &oscl->ols_einfo);cl_lock_slice_add (lock, &oscl->ols_cl, obj, &osc_lock_ops);
fs/lustre/osc/osc_request.c +13 -2
@@ -1790,7 +1790,7 @@ static int brw_interpret(const struct lu_env *env,/* When server return -EINPROGRESS, client should always retry * regardless of the number of times the bulk was resent already. */ -if (osc_recoverable_error (rc)) { +if (osc_recoverable_error (rc) && !req->rq_no_delay) {if (req->rq_import_generation != req->rq_import->imp_generation) { CDEBUG(D_HA,
@@ -1872,7 +1872,8 @@ static int brw_interpret(const struct lu_env *env,list_for_each_entry_safe (ext, tmp, &aa->aa_exts, oe_link) {list_del_init (&ext->oe_link); -osc_extent_finish (env, ext,1 , rc); +osc_extent_finish (env, ext,1 , + rc && req->rq_no_delay ? -EWOULDBLOCK : rc); }LASSERT (list_empty (&aa->aa_exts));LASSERT (list_empty (&aa->aa_oaps));
@@ -1942,6 +1943,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,int page_count =0 ;bool soft_sync = false;int grant =0 ; +bool ndelay = false;int i;int rc;struct ost_body *body;
@@ -1999,6 +2001,8 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,LASSERT (oap->oap_page_off + oap->oap_count ==PAGE_SIZE ); } +if (ext->oe_ndelay) + ndelay = true; }/* first page in the list */
@@ -2027,6 +2031,13 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, req->rq_memalloc = mem_tight !=0 ; oap->oap_request =ptlrpc_request_addref (req); +if (ndelay) { + req->rq_no_resend = req->rq_no_delay =1 ; +/* probably set a shorter timeout value. +* to handle ETIMEDOUT in brw_interpret() correctly. +*/ +/* lustre_msg_set_timeout(req, req->rq_timeout / 2); */ + }/* Need to update the timestamps after the request is built in case * we race with setattr (locally or in queue at OST). If OST gets
include/uapi/linux/lustre/lustre_idl.h +4 -0
@@ -1181,6 +1181,10 @@ struct hsm_state_set {#define OBD_BRW_READ 0x01#define OBD_BRW_WRITE 0x02#define OBD_BRW_RWMASK (OBD_BRW_READ | OBD_BRW_WRITE) +#define OBD_BRW_NDELAY 0x04/* Non-delay RPC should be issued for +* this page. Non-delay RPCs have bit +* rq_no_delay set. +*/ #define OBD_BRW_SYNC 0x08/* this page is a part of synchronous * transfer and is not accounted in * the grant.
Signature · 1 line
1.8.3.1
PATCH 68/151 lustre: lov: rework write intent on componect instantiation
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
It's revised to do in the I/O initialization.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 47a07d5e7933 ("LU-9971 lov: rework write intent on componect instantiation")
Reviewed-on: https://review.whamcloud.com/29086
--- fs/lustre/include/cl_object.h | 4 ++++ fs/lustre/llite/vvp_io.c | 25 +++++------------------ fs/lustre/lov/lov_io.c | 46 +++++++++++++++++++++++++++++-------------- 3 files changed, 40 insertions(+), 35 deletions(-)
fs/lustre/include/cl_object.h +4 -0
@@ -1889,6 +1889,10 @@ struct cl_io {* Number of pages owned by this IO. For invariant checking. */ unsigned int ci_owned_nr; +/** +* Range of write intent. Valid if ci_need_write_intent is set. +*/ +struct lu_extent ci_write_intent; };/** @} cl_io */
fs/lustre/llite/vvp_io.c +5 -20
@@ -347,32 +347,17 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)* RPC. */ if (io->ci_need_write_intent) { -loff_t end =OBD_OBJECT_EOF ; -loff_t start =0 ; - io->ci_need_write_intent =0 ;LASSERT (io->ci_type ==CIT_WRITE ||cl_io_is_trunc (io) ||cl_io_is_mkwrite (io)); -if (io->ci_type ==CIT_WRITE ) { -if (!cl_io_is_append (io)) { - start = io->u.ci_rw.crw_pos; - end = start + io->u.ci_rw.crw_count; - } - }else if (cl_io_is_trunc (io)) { - end = io->u.ci_setattr.sa_attr.lvb_size; - }else {/* mkwrite */ -pgoff_t index = io->u.ci_fault.ft_index; - - start =cl_offset (io->ci_obj, index); - end =cl_offset (io->ci_obj, index +1 ); - } - -CDEBUG (D_VFSTRACE ,DFID " type %d [%llx, %llx)\n" , +CDEBUG (D_VFSTRACE ,DFID " write layout, type %u " DEXT "\n" ,PFID (lu_object_fid (&obj->co_lu)), io->ci_type, - start, end); - rc =ll_layout_write_intent (inode, start, end); +PEXT (&io->ci_write_intent)); + + rc =ll_layout_write_intent (inode, io->ci_write_intent.e_start, + io->ci_write_intent.e_end); io->ci_result = rc;if (!rc) io->ci_need_restart =1 ;
fs/lustre/lov/lov_io.c +31 -15
82 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 69/151 lustre: ptlrpc: use lu_extent in layout_intent
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
This way it will be easier to check and print the extent of layout.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: c1f450270dda ("LU-9971 ptlrpc: use lu_extent in layout_intent")
Reviewed-on: https://review.whamcloud.com/29087
--- include/uapi/linux/lustre/lustre_idl.h | 3 +-- include/uapi/linux/lustre/lustre_user.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
include/uapi/linux/lustre/lustre_idl.h +1 -2
@@ -2825,8 +2825,7 @@ enum {struct layout_intent {__u32 li_opc;/* intent operation for enqueue, read, write etc */ __u32 li_flags; -__u64 li_start; -__u64 li_end; +struct lu_extent li_extent; } __packed;/**
include/uapi/linux/lustre/lustre_user.h +1 -1
@@ -426,7 +426,7 @@ struct lu_extent {__u64 e_end; }; -#define DEXT "[ %#llx , %#llx )" +#define DEXT "[%#llx, %#llx)"#define PEXT (ext) (ext)->e_start, (ext)->e_end static inline bool lu_extent_is_overlapped(struct lu_extent *e1,
Signature · 1 line
1.8.3.1
PATCH 69/151 lustre: ptlrpc: use lu_extent in layout_intent
Quoted 8 lines · James Simmons
From: Jinshan Xiong <[email protected]>
This way it will be easier to check and print the extent of layout.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit:c1f450270dda("LU-9971 ptlrpc: uselu_extentinlayout_intent")Signed-off-by Jinshan Xiong <[email protected]>
Quoted 8 lines
Reviewed-on: https://review.whamcloud.com/29087
Reviewed-by Lai Siyao <[email protected]>Reviewed-by Bobi Jam <[email protected]>Signed-off-by James Simmons <[email protected]>--- include/uapi/linux/lustre/lustre_idl.h | 3 +-- include/uapi/linux/lustre/lustre_user.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
hi James,
most of this patch is missing - it seems to have been merged into the next patch by mistake.
I'm walking through patches checking that code still compiles after each patch, and this one doesn't.
NeilBrown
Quoted 30 lines
include/uapi/linux/lustre/lustre_idl.h +1
-2@@ -2825,8 +2825,7 @@ enum {struct layout_intent {__u32 li_opc;/* intent operation for enqueue, read, write etc */ __u32 li_flags; -__u64 li_start; -__u64 li_end; +struct lu_extent li_extent; } __packed;/** include/uapi/linux/lustre/lustre_user.h +1
-1@@ -426,7 +426,7 @@ struct lu_extent {__u64 e_end; }; -#define DEXT "[ %#llx , %#llx )" +#define DEXT "[%#llx, %#llx)"#define PEXT (ext) (ext)->e_start, (ext)->e_end static inline bool lu_extent_is_overlapped(struct lu_extent *e1,Signature · 1 line
1.8.3.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20191001/3609628f/attachment.sig>
PATCH 69/151 lustre: ptlrpc: use lu_extent in layout_intent
Quoted 19 lines
Quoted 9 lines
From: Jinshan Xiong <[email protected]>
This way it will be easier to check and print the extent of layout.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit:c1f450270dda("LU-9971 ptlrpc: uselu_extentinlayout_intent")Signed-off-by Jinshan Xiong <[email protected]>Quoted 8 lines
Reviewed-on: https://review.whamcloud.com/29087
Reviewed-by Lai Siyao <[email protected]>Reviewed-by Bobi Jam <[email protected]>Signed-off-by James Simmons <[email protected]>--- include/uapi/linux/lustre/lustre_idl.h | 3 +-- include/uapi/linux/lustre/lustre_user.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
Quoted 7 lines
hi James,
most of this patch is missing - it seems to have been merged into the next patch by mistake.
I'm walking through patches checking that code still compiles after each patch, and this one doesn't.NeilBrown
Ugh. My tree is on a NFS partition so some times when I apply a patch while on one node the entire change doesn't show up on another node. Do you need me to resend the patch?
Quoted 31 lines
Quoted 30 lines
include/uapi/linux/lustre/lustre_idl.h +1
-2@@ -2825,8 +2825,7 @@ enum {struct layout_intent {__u32 li_opc;/* intent operation for enqueue, read, write etc */ __u32 li_flags; -__u64 li_start; -__u64 li_end; +struct lu_extent li_extent; } __packed;/** include/uapi/linux/lustre/lustre_user.h +1
-1@@ -426,7 +426,7 @@ struct lu_extent {__u64 e_end; }; -#define DEXT "[ %#llx , %#llx )" +#define DEXT "[%#llx, %#llx)"#define PEXT (ext) (ext)->e_start, (ext)->e_end static inline bool lu_extent_is_overlapped(struct lu_extent *e1,Signature · 1 line
1.8.3.1
PATCH 69/151 lustre: ptlrpc: use lu_extent in layout_intent
Quoted 24 lines · James Simmons
Quoted 24 lines
Quoted 8 lines
From: Jinshan Xiong <[email protected]>
This way it will be easier to check and print the extent of layout.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit:c1f450270dda("LU-9971 ptlrpc: uselu_extentinlayout_intent")Signed-off-by Jinshan Xiong <[email protected]>Quoted 8 lines
Reviewed-on: https://review.whamcloud.com/29087
Reviewed-by Lai Siyao <[email protected]>Reviewed-by Bobi Jam <[email protected]>Signed-off-by James Simmons <[email protected]>--- include/uapi/linux/lustre/lustre_idl.h | 3 +-- include/uapi/linux/lustre/lustre_user.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)hi James,
most of this patch is missing - it seems to have been merged into the next patch by mistake.
I'm walking through patches checking that code still compiles after each patch, and this one doesn't.
Quoted 5 lines
Quoted 1 line
NeilBrown
Ugh. My tree is on a NFS partition so some times when I apply a patch while on one node the entire change doesn't show up on another node. Do you need me to resend the patch?
No thanks - I've fixed it up in my tree.
Thanks,
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20191002/78e3fd46/attachment.sig>
PATCH 69/151 lustre: ptlrpc: use lu_extent in layout_intent
In reply to James SimmonsQuoted 2 lines
Ugh. My tree is on a NFS partition so some times when I apply a patch
while on one node the entire change doesn't show up on another node.
Well, shoot. Surely you should move your tree(s) to Lustre! (
-Cory
PATCH 70/151 lustre: flr: Send write intent RPC to mdt
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
When a mirrored file is going to be written, the client needs to send a write intent RPC to the MDT. The MDT will pick a mirror as primary and mark the others as stale. The new md operation moo_layout_change() is introduced for this purpose. The MDT also transfers the latest layout version to the OST objects via do_attr_set().
Once OSTs receive the setattr RPC for layout version change, it will set the update layout version into extended attribute XATTR_NAME_FID.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 10da8afb2786 ("LU-9771 flr: Send write intent RPC to mdt")
Reviewed-on: https://review.whamcloud.com/29091
--- fs/lustre/include/cl_object.h | 8 ++- fs/lustre/include/lustre_osc.h | 7 +- fs/lustre/include/obd.h | 5 +- fs/lustre/include/obd_support.h | 2 + fs/lustre/llite/file.c | 4 +- fs/lustre/llite/vvp_object.c | 7 ++ fs/lustre/lov/lov_cl_internal.h | 3 + fs/lustre/lov/lov_io.c | 121 +++++++++++++++++++++++++++++--- fs/lustre/lov/lov_object.c | 4 +- fs/lustre/lov/lov_page.c | 5 +- fs/lustre/osc/osc_cache.c | 9 ++- fs/lustre/osc/osc_io.c | 10 ++- fs/lustre/osc/osc_request.c | 12 +++- fs/lustre/ptlrpc/pack_generic.c | 11 ++- fs/lustre/ptlrpc/wiretest.c | 20 +++--- include/uapi/linux/lustre/lustre_idl.h | 6 +- include/uapi/linux/lustre/lustre_user.h | 10 ++- 17 files changed, 202 insertions(+), 42 deletions(-)
fs/lustre/include/cl_object.h +6 -2
@@ -1775,6 +1775,8 @@ 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; +/** layout version when this IO occurs */ +u32 ci_layout_version; union { struct cl_rd_io { struct cl_io_rw_common rd;
@@ -1850,8 +1852,10 @@ struct cl_io {*/ ci_ignore_layout:1 ,/** -* Need MDS intervention to complete a write. This usually means the -* corresponding component is not initialized for the writing extent. +* Need MDS intervention to complete a write. +* Write intent is required for the following cases: +* 1. component being written is not initialized, or +* 2. the mirrored files are NOT in WRITE_PENDING state. */ ci_need_write_intent:1,/**
fs/lustre/include/lustre_osc.h +5 -2
@@ -586,8 +586,9 @@ int osc_teardown_async_page(const struct lu_env *env, struct osc_object *obj, struct osc_page *ops);int osc_flush_async_page (const struct lu_env *env,struct cl_io *io,struct osc_page *ops); -int osc_queue_sync_pages (const struct lu_env *env,struct osc_object *obj, -struct list_head *list,int brw_flags); +int osc_queue_sync_pages (const struct lu_env *env,const struct cl_io *io, +struct osc_object *obj,struct list_head *list, +int brw_flags);int osc_cache_truncate_start (const struct lu_env *env,struct osc_object *obj,u64 size,struct osc_extent **extp);void osc_cache_truncate_end (const struct lu_env *env,struct osc_extent *ext);
@@ -968,6 +969,8 @@ struct osc_extent {int oe_rc;/* max pages per rpc when this extent was created */ unsigned int oe_mppr; +/* FLR: layout version when this osc_extent is publised */ +u32 oe_layout_version; };/* @} osc */
fs/lustre/include/obd.h +3 -2
@@ -687,9 +687,10 @@ static inline int it_to_lock_mode(struct lookup_intent *it)/* CREAT needs to be tested before open (both could be set) */ if (it->it_op &IT_CREAT )return LCK_CW ; -else if (it->it_op & (IT_GETATTR |IT_OPEN |IT_LOOKUP | -IT_LAYOUT )) +else if (it->it_op & (IT_GETATTR |IT_OPEN |IT_LOOKUP ))return LCK_CR ; +else if (it->it_op &IT_LAYOUT ) +return (it->it_flags &FMODE_WRITE ) ?LCK_EX :LCK_CR ;else if (it->it_op &IT_READDIR )return LCK_PR ;else if (it->it_op &IT_GETXATTR )
fs/lustre/include/obd_support.h +2 -0
@@ -476,6 +476,8 @@/* FLR */ #define OBD_FAIL_FLR_GLIMPSE_IMMUTABLE 0x1A00 +#define OBD_FAIL_FLR_LV_DELAY 0x1A01 +#define OBD_FAIL_FLR_LV_INC 0x1A02/* Assign references to moved code to reduce code changes */ #define OBD_FAIL_PRECHECK (id) CFS_FAIL_PRECHECK(id)
fs/lustre/llite/file.c +2 -2
@@ -4206,8 +4206,8 @@ int ll_layout_write_intent(struct inode *inode, u64 start, u64 end) {struct layout_intent intent = { .li_opc =LAYOUT_INTENT_WRITE , - .li_start = start, - .li_end = end, + .li_extent.e_start = start, + .li_extent.e_end = end, };int rc;
fs/lustre/llite/vvp_object.c +7 -0
@@ -165,6 +165,13 @@ static int vvp_prune(const struct lu_env *env, struct cl_object *obj) }truncate_inode_pages (inode->i_mapping,0 ); +if (inode->i_mapping->nrpages) { +CDEBUG (D_VFSTRACE ,DFID ": still has %lu pages remaining\n" , +PFID (lu_object_fid (&obj->co_lu)), + inode->i_mapping->nrpages); +return -EIO ; + } +return 0 ; }
fs/lustre/lov/lov_cl_internal.h +3 -0
@@ -230,6 +230,7 @@ struct lov_layout_entry {struct lov_mirror_entry {unsigned short lre_mirror_id;unsigned short lre_preferred:1 , + lre_stale:1 ,/* set if any components is stale */ lre_valid:1 ;/* set if at least one of components * in this mirror is valid */
@@ -438,6 +439,8 @@ struct lov_page {struct cl_page_slice lps_cl;/** layout_entry + stripe index, composed using lov_comp_index() */ unsigned int lps_index; +/* the layout gen when this page was created */ +u32 lps_layout_gen; };/*
fs/lustre/lov/lov_io.c +113 -8
181 lines not on this page · raw message
fs/lustre/lov/lov_object.c +3 -1
@@ -675,6 +675,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev,if (i >0 ) {if (mirror_id == lre->lre_mirror_id) { lre->lre_valid |= lle->lle_valid; + lre->lre_stale |= !lle->lle_valid; lre->lre_end = i;continue ; }
@@ -696,6 +697,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, lre->lre_preferred = (lle->lle_lsme->lsme_flags &LCME_FL_PREFERRED ); lre->lre_valid = lle->lle_valid; + lre->lre_stale = !lle->lle_valid; }/* sanity check for FLR */
@@ -737,7 +739,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, i =0 ; lov_foreach_mirror_entry(lov, lre) { i++; -if (!lre->lre_valid) +if (lre->lre_stale)continue ; mirror_count++;/* valid mirror */
fs/lustre/lov/lov_page.c +3 -2
@@ -57,8 +57,8 @@ static int lov_comp_page_print(const struct lu_env *env,struct lov_page *lp =cl2lov_page (slice);return (*printer)(env, cookie, -LUSTRE_LOV_NAME "-page@%p, comp index: %x\n" , - lp, lp->lps_index); +LUSTRE_LOV_NAME "-page@%p, comp index: %x, gen: %u\n" , + lp, lp->lps_index, lp->lps_layout_gen); }static const struct cl_page_operations lov_comp_page_ops = {
@@ -96,6 +96,7 @@ int lov_page_init_composite(const struct lu_env *env, struct cl_object *obj,LASSERT (rc ==0 ); lpg->lps_index =lov_comp_index (entry, stripe); + lpg->lps_layout_gen = loo->lo_lsm->lsm_layout_gen;cl_page_slice_add (page, &lpg->lps_cl, obj, index, &lov_comp_page_ops); sub =lov_sub_get (env, lio, lpg->lps_index);
fs/lustre/osc/osc_cache.c +7 -2
@@ -2479,6 +2479,9 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io, ++ext->oe_nr_pages;list_add_tail (&oap->oap_pending_item, &ext->oe_pages);osc_object_unlock (osc); + +if (!ext->oe_layout_version) + ext->oe_layout_version = io->ci_layout_version; }return rc;
@@ -2604,8 +2607,9 @@ int osc_flush_async_page(const struct lu_env *env, struct cl_io *io,return rc; } -int osc_queue_sync_pages (const struct lu_env *env,struct osc_object *obj, -struct list_head *list,int brw_flags) +int osc_queue_sync_pages (const struct lu_env *env,const struct cl_io *io, +struct osc_object *obj,struct list_head *list, +int brw_flags) {struct client_obd *cli =osc_cli (obj);struct osc_extent *ext;
@@ -2656,6 +2660,7 @@ int osc_queue_sync_pages(const struct lu_env *env, struct osc_object *obj, ext->oe_nr_pages = page_count; ext->oe_mppr = mppr;list_splice_init (list, &ext->oe_pages); + ext->oe_layout_version = io->ci_layout_version;osc_object_lock (obj);/* Reuse the initial refcount for RPC, don't drop it */
fs/lustre/osc/osc_io.c +8 -2
@@ -188,7 +188,7 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,if (++queued == max_pages) { queued =0 ; - result =osc_queue_sync_pages (env, osc, &list, + result =osc_queue_sync_pages (env, io, osc, &list, brw_flags);if (result <0 )break ;
@@ -196,7 +196,7 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios, }if (queued >0 ) - result =osc_queue_sync_pages (env, osc, &list, brw_flags); + result =osc_queue_sync_pages (env, io, osc, &list, brw_flags);/* Update c/mtime for sync write. LU-7310 */ if (crt ==CRT_WRITE && qout->pl_nr >0 && !result) {
@@ -558,6 +558,12 @@ static int osc_io_setattr_start(const struct lu_env *env, oa->o_flags =OBD_FL_SRVLOCK ; oa->o_valid |=OBD_MD_FLFLAGS ; } + +if (io->ci_layout_version >0 ) { +/* verify layout version */ + oa->o_valid |=OBD_MD_LAYOUT_VERSION ; + oa->o_layout_version = io->ci_layout_version; + } }else {LASSERT (oio->oi_lockless ==0 ); }
fs/lustre/osc/osc_request.c +11 -1
@@ -1944,6 +1944,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,bool soft_sync = false;int grant =0 ;bool ndelay = false; +u32 layout_version =0 ;int i;int rc;struct ost_body *body;
@@ -1957,6 +1958,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, mem_tight |= ext->oe_memalloc; grant += ext->oe_grants; page_count += ext->oe_nr_pages; + layout_version =max (layout_version, ext->oe_layout_version);if (!obj) obj = ext->oe_obj; }
@@ -2016,8 +2018,16 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, crattr->cra_oa = oa;cl_req_attr_set (env,osc2cl (obj), crattr); -if (cmd ==OBD_BRW_WRITE ) +if (cmd ==OBD_BRW_WRITE ) { oa->o_grant_used = grant; +if (layout_version >0 ) { +CDEBUG (D_LAYOUT ,DFID ": write with layout version %u\n" , +PFID (&oa->o_oi.oi_fid), layout_version); + + oa->o_layout_version = layout_version; + oa->o_valid |=OBD_MD_LAYOUT_VERSION ; + } + }sort_brw_pages (pga, page_count); rc =osc_brw_prep_request (cmd, cli, oa, page_count, pga, &req,1 ,0 );
fs/lustre/ptlrpc/pack_generic.c +8 -3
@@ -1619,7 +1619,7 @@ static void lustre_swab_obdo(struct obdo *o)__swab32s (&o->o_stripe_idx);__swab32s (&o->o_parent_ver);lustre_swab_ost_layout (&o->o_layout); - BUILD_BUG_ON(offsetof(typeof(*o), o_padding_3) == 0); +__swab32s (&o->o_layout_version);__swab32s (&o->o_uid_h);__swab32s (&o->o_gid_h);__swab64s (&o->o_data_version);
@@ -2374,12 +2374,17 @@ void lustre_swab_hsm_user_item(struct hsm_user_item *hui)lustre_swab_hsm_extent (&hui->hui_extent); } +void lustre_swab_lu_extent (struct lu_extent *le) +{ +__swab64s (&le->e_start); +__swab64s (&le->e_end); +} +void lustre_swab_layout_intent (struct layout_intent *li) {__swab32s (&li->li_opc);__swab32s (&li->li_flags); -__swab64s (&li->li_start); -__swab64s (&li->li_end); +lustre_swab_lu_extent (&li->li_extent); }void lustre_swab_hsm_progress_kernel (struct hsm_progress_kernel *hpk)
fs/lustre/ptlrpc/wiretest.c +8 -12
@@ -1247,10 +1247,10 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct obdo, o_layout));LASSERTF ((int )sizeof (((struct obdo *)0 )->o_layout) ==28 ,"found %lld\n" , (long long )(int )sizeof (((struct obdo *)0 )->o_layout)); -LASSERTF ((int )offsetof(struct obdo , o_padding_3) ==164 ,"found %lld\n" , - (long long )(int )offsetof(struct obdo , o_padding_3)); -LASSERTF ((int )sizeof (((struct obdo *)0 )->o_padding_3) ==4 ,"found %lld\n" , - (long long )(int )sizeof (((struct obdo *)0 )->o_padding_3)); +LASSERTF ((int )offsetof(struct obdo , o_layout_version) ==164 ,"found %lld\n" , + (long long )(int )offsetof(struct obdo , o_layout_version)); +LASSERTF ((int )sizeof (((struct obdo *)0 )->o_layout_version) ==4 ,"found %lld\n" , + (long long )(int )sizeof (((struct obdo *)0 )->o_layout_version));LASSERTF ((int )offsetof(struct obdo , o_uid_h) ==168 ,"found %lld\n" , (long long )(int )offsetof(struct obdo , o_uid_h)); LASSERTF((int)sizeof(((struct obdo *)0)->o_uid_h) == 4, "found %lld\n",
@@ -4049,14 +4049,10 @@ void lustre_assert_wire_constants(void) (long long)(int)offsetof(struct layout_intent, li_flags));LASSERTF ((int )sizeof (((struct layout_intent *)0 )->li_flags) ==4 ,"found %lld\n" , (long long )(int )sizeof (((struct layout_intent *)0 )->li_flags)); -LASSERTF ((int )offsetof(struct layout_intent , li_start) ==8 ,"found %lld\n" , - (long long )(int )offsetof(struct layout_intent , li_start)); -LASSERTF ((int )sizeof (((struct layout_intent *)0 )->li_start) ==8 ,"found %lld\n" , - (long long )(int )sizeof (((struct layout_intent *)0 )->li_start)); -LASSERTF ((int )offsetof(struct layout_intent , li_end) ==16 ,"found %lld\n" , - (long long )(int )offsetof(struct layout_intent , li_end)); -LASSERTF ((int )sizeof (((struct layout_intent *)0 )->li_end) ==8 ,"found %lld\n" , - (long long )(int )sizeof (((struct layout_intent *)0 )->li_end)); +LASSERTF ((int )offsetof(struct layout_intent , li_extent) ==8 ,"found %lld\n" , + (long long )(int )offsetof(struct layout_intent , li_extent)); +LASSERTF ((int )sizeof (((struct layout_intent *)0 )->li_extent) ==16 ,"found %lld\n" , + (long long )(int )sizeof (((struct layout_intent *)0 )->li_extent));LASSERTF (LAYOUT_INTENT_ACCESS ==0 ,"found %lld\n" , (long long )LAYOUT_INTENT_ACCESS ); LASSERTF(LAYOUT_INTENT_READ == 1, "found %lld\n",
include/uapi/linux/lustre/lustre_idl.h +4 -2
@@ -1092,7 +1092,9 @@ static inline __u32 lov_mds_md_size(__u16 stripes, __u32 lmm_magic)#define OBD_MD_DOM_SIZE (0x00001000ULL)/* Data-on-MDT component size */ #define OBD_MD_FLNLINK (0x00002000ULL)/* link count */ #define OBD_MD_FLGENER (0x00004000ULL)/* generation number */ -/*#define OBD_MD_FLINLINE (0x00008000ULL) inline data. used until 1.6.5 */ +#define OBD_MD_LAYOUT_VERSION (0x00008000ULL)/* layout version for +* OST objects +*/ #define OBD_MD_FLRDEV (0x00010000ULL)/* device number */ #define OBD_MD_FLEASIZE (0x00020000ULL)/* extended attribute data */ #define OBD_MD_LINKNAME (0x00040000ULL)/* symbolic link target */
@@ -2675,7 +2677,7 @@ struct obdo {* sizeof(ost_layout) + sizeof(__u32) == sizeof(llog_cookie). */ struct ost_layout o_layout; -__u32 o_padding_3; +__u32 o_layout_version;__u32 o_uid_h;__u32 o_gid_h;
include/uapi/linux/lustre/lustre_user.h +9 -1
@@ -453,6 +453,11 @@ enum lov_comp_md_entry_flags {#define LCME_KNOWN_FLAGS (LCME_FL_NEG | LCME_FL_INIT) +/* the highest bit in obdo::o_layout_version is used to mark if the file is +* being resynced. +*/ +#define LU_LAYOUT_RESYNC LCME_FL_NEG +/* lcme_id can be specified as certain flags, and the first * bit of lcme_id is used to indicate that the ID is representing * certain LCME_FL_* but not a real ID. Which implies we can have
@@ -834,6 +839,8 @@ enum changelog_rec_type {CL_MTIME =17 ,/* Precedence: setattr > mtime > ctime > atime */ CL_CTIME =18 ,CL_ATIME =19 , +CL_FLRW =21 ,/* FLR: file was firstly written */ +CL_RESYNC =22 ,/* FLR: file was resync-ed */ CL_LAST };
@@ -842,7 +849,8 @@ static inline const char *changelog_type2str(int type)static const char *changelog_str[] = {"MARK" ,"CREAT" ,"MKDIR" ,"HLINK" ,"SLINK" ,"MKNOD" ,"UNLNK" ,"RMDIR" ,"RENME" ,"RNMTO" ,"OPEN" ,"CLOSE" ,"LYOUT" ,"TRUNC" , -"SATTR" ,"XATTR" ,"HSM" ,"MTIME" ,"CTIME" ,"ATIME" , +"SATTR" ,"XATTR" ,"HSM" ,"MTIME" ,"CTIME" ,"ATIME" ,"" , +"FLRW" ,"RESYNC" , };if (type >=0 && type <CL_LAST )
Signature · 1 line
1.8.3.1
PATCH 71/151 lustre: flr: extend DATA_VERSION API to read layout version
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
The API is extended to fetch layout version from ost objects.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: cdbe35c08c66 ("LU-9771 flr: extend DATA_VERSION API to read layout version")
Reviewed-on: https://review.whamcloud.com/29092
--- fs/lustre/include/cl_object.h | 1 + fs/lustre/llite/file.c | 52 +++++++++++++++++++++------------ fs/lustre/lov/lov_io.c | 8 +++-- fs/lustre/osc/osc_io.c | 11 +++++-- include/uapi/linux/lustre/lustre_user.h | 11 ++++--- 5 files changed, 56 insertions(+), 27 deletions(-)
fs/lustre/include/cl_object.h +1 -0
@@ -1798,6 +1798,7 @@ struct cl_io { } ci_setattr;struct cl_data_version_io {u64 dv_data_version; +u32 dv_layout_version;int dv_flags; } ci_data_version;struct cl_fault_io {
fs/lustre/llite/file.c +34 -18
90 lines not on this page · raw message
fs/lustre/lov/lov_io.c +6 -2
@@ -844,13 +844,17 @@ static void lov_io_end(const struct lu_env *env, const struct cl_io_slice *ios) {struct lov_io *lio =cl2lov_io (env, ios);struct cl_io *parent = lio->lis_cl.cis_io; +struct cl_data_version_io *pdv = &parent->u.ci_data_version;struct lov_io_sub *sub;list_for_each_entry (sub, &lio->lis_active, sub_linkage) { +struct cl_data_version_io *sdv = &sub->sub_io.u.ci_data_version; +lov_io_end_wrapper (sub->sub_env, &sub->sub_io); - parent->u.ci_data_version.dv_data_version += - sub->sub_io.u.ci_data_version.dv_data_version; + pdv->dv_data_version += sdv->dv_data_version; +if (pdv->dv_layout_version > sdv->dv_layout_version) + pdv->dv_layout_version = sdv->dv_layout_version;if (!parent->ci_result) parent->ci_result = sub->sub_io.ci_result;
fs/lustre/osc/osc_io.c +8 -3
@@ -714,11 +714,16 @@ static void osc_io_data_version_end(const struct lu_env *env,if (cbargs->opc_rc) { slice->cis_io->ci_result = cbargs->opc_rc; - }else if (!(oio->oi_oa.o_valid &OBD_MD_FLDATAVERSION )) { - slice->cis_io->ci_result = -EOPNOTSUPP ; }else { - dv->dv_data_version = oio->oi_oa.o_data_version; slice->cis_io->ci_result =0 ; +if (!(oio->oi_oa.o_valid & + (OBD_MD_LAYOUT_VERSION |OBD_MD_FLDATAVERSION ))) + slice->cis_io->ci_result = -ENOTSUPP ; + +if (oio->oi_oa.o_valid &OBD_MD_LAYOUT_VERSION ) + dv->dv_layout_version = oio->oi_oa.o_layout_version; +if (oio->oi_oa.o_valid &OBD_MD_FLDATAVERSION ) + dv->dv_data_version = oio->oi_oa.o_data_version; } }
include/uapi/linux/lustre/lustre_user.h +7 -4
@@ -1132,12 +1132,15 @@ enum changelog_message_type {/********* Misc **********/ struct ioc_data_version { -__u64 idv_version; -__u64 idv_flags;/* See LL_DV_xxx */ +__u64 idv_version; +__u32 idv_layout_version;/* FLR: layout version for OST objects */ +__u32 idv_flags;/* enum ioc_data_version_flags */ }; -#define LL_DV_RD_FLUSH (1 << 0)/* Flush dirty pages from clients */ -#define LL_DV_WR_FLUSH (1 << 1)/* Flush all caching pages from clients */ +enum ioc_data_version_flags { +LL_DV_RD_FLUSH = (1 <<0 ),/* Flush dirty pages from clients */ +LL_DV_WR_FLUSH = (1 <<1 ),/* Flush all caching pages from clients */ +};#ifndef offsetof# define offsetof (typ, memb) ((unsigned long)((char *)&(((typ *)0)->memb)))
Signature · 1 line
1.8.3.1
PATCH 72/151 lustre: lov: skip empty pages in lov_io_submit()
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
empty page doesn't have corresponding bottem half so it should be completed in the LOV layer.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: ec7eb7a932b7 ("LU-9771 lov: skip empty pages in lov_io_submit()")
Reviewed-on: https://review.whamcloud.com/29094
--- fs/lustre/lov/lov_cl_internal.h | 1 + fs/lustre/lov/lov_io.c | 26 +++++++++++++------------- fs/lustre/lov/lov_page.c | 8 ++++++++ 3 files changed, 22 insertions(+), 13 deletions(-)
fs/lustre/lov/lov_cl_internal.h +1 -0
@@ -651,6 +651,7 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env, struct lu_device *dev);struct lov_stripe_md *lov_lsm_addref (struct lov_object *lov); +bool lov_page_is_empty (const struct cl_page *page);int lov_lsm_entry (const struct lov_stripe_md *lsm,u64 offset);int lov_io_layout_at (struct lov_io *lio,u64 offset);
fs/lustre/lov/lov_io.c +13 -13
@@ -990,24 +990,20 @@ static int lov_io_submit(const struct lu_env *env,int index;int rc =0 ; -if (lio->lis_nr_subios ==1 ) { -int idx = lio->lis_single_subio_index; - - sub =lov_sub_get (env, lio, idx); -LASSERT (!IS_ERR (sub)); -LASSERT (sub == &lio->lis_single_subio); - rc =cl_io_submit_rw (sub->sub_env, &sub->sub_io, - crt, queue); -return rc; - } -cl_page_list_init (plist);while (qin->pl_nr >0 ) {struct cl_2queue *cl2q = &lov_env_info (env)->lti_cl2q; -cl_2queue_init (cl2q); - page =cl_page_list_first (qin); +if (lov_page_is_empty (page)) { +cl_page_list_move (&queue->c2_qout, qin, page); + +cl_page_prep (env, ios->cis_io, page, crt); +cl_page_completion (env, page, crt,0 ); +continue ; + } + +cl_2queue_init (cl2q);cl_page_list_move (&cl2q->c2_qin, qin, page); index =lov_page_index (page);
@@ -1055,6 +1051,8 @@ static int lov_io_commit_async(const struct lu_env *env,if (lio->lis_nr_subios ==1 ) {int idx = lio->lis_single_subio_index; +LASSERT (!lov_page_is_empty (cl_page_list_first (queue))); + sub =lov_sub_get (env, lio, idx);LASSERT (!IS_ERR (sub));LASSERT (sub == &lio->lis_single_subio);
@@ -1070,6 +1068,8 @@ static int lov_io_commit_async(const struct lu_env *env,LASSERT (plist->pl_nr ==0 ); page =cl_page_list_first (queue); +LASSERT (!lov_page_is_empty (page)); +cl_page_list_move (plist, queue, page); index =lov_page_index (page);
fs/lustre/lov/lov_page.c +8 -0
@@ -136,6 +136,7 @@ int lov_page_init_empty(const struct lu_env *env, struct cl_object *obj,struct lov_page *lpg =cl_object_page_slice (obj, page);void *addr; + lpg->lps_index = ~0 ;cl_page_slice_add (page, &lpg->lps_cl, obj, index, &lov_empty_page_ops); addr =kmap (page->cp_vmpage);memset (addr,0 ,cl_page_size (obj));
@@ -144,4 +145,11 @@ int lov_page_init_empty(const struct lu_env *env, struct cl_object *obj,return 0 ; } +bool lov_page_is_empty (const struct cl_page *page) +{ +const struct cl_page_slice *slice =cl_page_at (page, &lov_device_type); + +LASSERT (slice); +return slice->cpl_ops == &lov_empty_page_ops; +}/** @} lov */
Signature · 1 line
1.8.3.1
PATCH 73/151 lustre: mdc: don't assert on name pack
In reply to James SimmonsFrom: Lai Siyao <[email protected]>
For old version of MDTs which don't support ATTRFID, open will pack dentry name in the request, but this name may change if there is concurrent rename, as a result an assertion will be triggerred.
It's inconvenient to copy name in advance or take dentry lock in the call chain, so It's better to remove this assert, which is safe.
WC-bug-id: https://jira.whamcloud.com/browse/LU-5024
Lustre-commit: dd9d7cc845df ("LU-5024 mdc: don't assert on name pack")
Reviewed-on: https://review.whamcloud.com/29161
--- fs/lustre/mdc/mdc_lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/lustre/mdc/mdc_lib.c +5 -1
@@ -107,7 +107,11 @@ static void mdc_pack_name(struct ptlrpc_request *req, cpy_len =strlcpy (buf, name, buf_size); -LASSERT (cpy_len == name_len &&lu_name_is_valid_2 (buf, cpy_len)); +LASSERT (lu_name_is_valid_2 (buf, cpy_len)); +if (cpy_len != name_len) +CDEBUG (D_DENTRY ,"%s: %s len %zd != %zd, concurrent rename?\n" , + req->rq_export->exp_obd->obd_name, buf, name_len, + cpy_len); } void mdc_file_secctx_pack(struct ptlrpc_request *req, const char *secctx_name,
Signature · 1 line
1.8.3.1
PATCH 74/151 lustre: flr: mirror read and write
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
Support to perform I/O to designated mirror.
Create a new LL_IOC_FLR_SET_MIRROR kernel side so user land applications can set the mirror id.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 5d7c4fa61ce7 ("LU-9771 flr: mirror read and write")
Reviewed-on: https://review.whamcloud.com/29095
--- fs/lustre/include/cl_object.h | 4 ++++ fs/lustre/llite/file.c | 34 +++++++++++++++++++++++++++++++++ fs/lustre/llite/lcommon_cl.c | 3 +++ fs/lustre/llite/llite_internal.h | 5 +++++ fs/lustre/lov/lov_io.c | 27 +++++++++++++++++++++++++- include/uapi/linux/lustre/lustre_user.h | 2 +- 6 files changed, 73 insertions(+), 2 deletions(-)
fs/lustre/include/cl_object.h +4 -0
@@ -1891,6 +1891,10 @@ struct cl_io {*/ unsigned int ci_ndelay_tried;/** +* Designated mirror index for this I/O. +*/ +unsigned int ci_designated_mirror; +/** * Number of pages owned by this IO. For invariant checking. */ unsigned int ci_owned_nr;
fs/lustre/llite/file.c +34 -0
@@ -1104,6 +1104,28 @@ int ll_merge_attr(const struct lu_env *env, struct inode *inode)return rc; } +/** +* Set designated mirror for I/O. +* +* So far only read, write, and truncated can support to issue I/O to +* designated mirror. +*/ +void ll_io_set_mirror (struct cl_io *io,const struct file *file) +{ +struct ll_file_data *fd =LUSTRE_FPRIVATE (file); + +/* FLR: disable non-delay for designated mirror I/O because obviously +* only one mirror is available +*/ +if (fd->fd_designated_mirror >0 ) { + io->ci_ndelay =0 ; + io->ci_designated_mirror = fd->fd_designated_mirror; + } + +CDEBUG (D_VFSTRACE ,"%s: desiginated mirror: %d\n" , + file->f_path.dentry->d_name.name, io->ci_designated_mirror); +} +static bool file_is_noatime (const struct file *file) {const struct vfsmount *mnt = file->f_path.mnt;
@@ -1160,6 +1182,8 @@ static void ll_io_init(struct cl_io *io, const struct file *file, int write)* available mirror for write. */ io->ci_ndelay = !write; + +ll_io_set_mirror (io, file); } static ssize_t
@@ -2976,6 +3000,16 @@ int ll_ioctl_fssetxattr(struct inode *inode, unsigned int cmd,kfree (k_ladvise_hdr);return rc; } +case LL_IOC_FLR_SET_MIRROR : { +/* mirror I/O must be direct to avoid polluting page cache +* by stale data. +*/ +if (!(file->f_flags &O_DIRECT )) +return -EINVAL ; + + fd->fd_designated_mirror = (u32 )arg; +return 0 ; + }case FS_IOC_FSGETXATTR :return ll_ioctl_fsgetxattr (inode, cmd, arg);case FS_IOC_FSSETXATTR :
fs/lustre/llite/lcommon_cl.c +3 -0
@@ -103,6 +103,9 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr, io->u.ci_setattr.sa_xvalid = xvalid; io->u.ci_setattr.sa_parent_fid =lu_object_fid (&obj->co_lu); +if (attr->ia_valid &ATTR_FILE ) +ll_io_set_mirror (io, attr->ia_file); + again:if (cl_io_init (env, io,CIT_SETATTR , io->ci_obj) ==0 ) {struct vvp_io *vio =vvp_env_io (env);
fs/lustre/llite/llite_internal.h +5 -0
@@ -653,6 +653,10 @@ struct ll_file_data {*/ bool fd_write_failed;bool ll_lock_no_expand; +/* Used by mirrored file to lead IOs to a specific mirror, usually +* for mirror resync. 0 means default. +*/ +u32 fd_designated_mirror;rwlock_t fd_lock;/* protect lcc list */ struct list_head fd_lccs;/* list of ll_cl_context */ };
@@ -840,6 +844,7 @@ int ll_dir_getstripe(struct inode *inode, void **lmmp, int *lmm_size,int ll_data_version (struct inode *inode,u64 *data_version,int flags);int ll_hsm_release (struct inode *inode);int ll_hsm_state_set (struct inode *inode,struct hsm_state_set *hss); +void ll_io_set_mirror (struct cl_io *io,const struct file *file);/* llite/dcache.c */
fs/lustre/lov/lov_io.c +26 -1
@@ -299,6 +299,27 @@ static int lov_io_mirror_init(struct lov_io *lio, struct lov_object *obj,return 0 ; } +/* find the corresponding mirror for designated mirror IO */ +if (io->ci_designated_mirror >0 ) { +struct lov_mirror_entry *entry; + +LASSERT (!io->ci_ndelay); + + index =0 ; + lio->lis_mirror_index =-1 ; + lov_foreach_mirror_entry(obj, entry) { +if (entry->lre_mirror_id == + io->ci_designated_mirror) { + lio->lis_mirror_index = index; +break ; + } + + index++; + } + +return (lio->lis_mirror_index <0 ) ? -EINVAL :0 ; + } + result =lov_io_mirror_write_intent (lio, obj, io);if (result)return result;
@@ -998,7 +1019,11 @@ static int lov_io_submit(const struct lu_env *env,if (lov_page_is_empty (page)) {cl_page_list_move (&queue->c2_qout, qin, page); -cl_page_prep (env, ios->cis_io, page, crt); +/* it could only be mirror read to get here therefore +* the pages will be transient. We don't care about +* the return code of cl_page_prep() at all. +*/ + (void )cl_page_prep (env, ios->cis_io, page, crt);cl_page_completion (env, page, crt,0 );continue ; }
include/uapi/linux/lustre/lustre_user.h +1 -1
@@ -276,7 +276,7 @@ struct ll_futimes_3 {#define LL_IOC_GET_CONNECT_FLAGS _IOWR('f', 174, __u64 *)#define LL_IOC_GET_MDTIDX _IOR('f', 175, int)#define LL_IOC_FUTIMES_3 _IOWR('f', 176, struct ll_futimes_3) - +#define LL_IOC_FLR_SET_MIRROR _IOW('f', 177, long)/* lustre_ioctl.h 177-210 */ #define LL_IOC_HSM_STATE_GET _IOR('f', 211, struct hsm_user_state)#define LL_IOC_HSM_STATE_SET _IOW('f', 212, struct hsm_state_set)
Signature · 1 line
1.8.3.1
PATCH 75/151 lustre: flr: resync support and test tool
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
A tool to resync mirrored file after writing.
It extends the Lustre lease API to support taking file lease and then sending the MDS_REINT_RESYNC RPC to the MDT so that it can increase the file's layout version; then the client will start copying the contents from valid mirror to stale mirrors. At the end of resync, the copying client will release the lease and revalidate stale mirrors.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 5999c0b881e8 ("LU-9771 flr: resync support and test tool")
Reviewed-on: https://review.whamcloud.com/29096
--- fs/lustre/include/lprocfs_status.h | 1 + fs/lustre/include/lustre_req_layout.h | 1 + fs/lustre/include/lustre_swab.h | 1 + fs/lustre/include/obd.h | 2 + fs/lustre/include/obd_class.h | 15 ++ fs/lustre/llite/file.c | 289 ++++++++++++++++++++++++-------- fs/lustre/llite/llite_internal.h | 8 +- fs/lustre/llite/rw26.c | 10 ++ fs/lustre/lmv/lmv_obd.c | 21 +++ fs/lustre/lov/lov_io.c | 70 +++++++- fs/lustre/mdc/mdc_internal.h | 1 + fs/lustre/mdc/mdc_lib.c | 16 ++ fs/lustre/mdc/mdc_reint.c | 52 ++++++ fs/lustre/mdc/mdc_request.c | 38 +++-- fs/lustre/osc/osc_io.c | 3 + fs/lustre/ptlrpc/layout.c | 16 +- fs/lustre/ptlrpc/lproc_ptlrpc.c | 1 + fs/lustre/ptlrpc/pack_generic.c | 13 ++ fs/lustre/ptlrpc/wiretest.c | 94 ++++++++++- include/uapi/linux/lustre/lustre_idl.h | 47 +++++- include/uapi/linux/lustre/lustre_user.h | 35 +++- 21 files changed, 630 insertions(+), 104 deletions(-)
fs/lustre/include/lprocfs_status.h +1 -0
@@ -334,6 +334,7 @@ enum {MDS_REINT_RENAME ,MDS_REINT_OPEN ,MDS_REINT_SETXATTR , +MDS_REINT_RESYNC ,BRW_READ_BYTES ,BRW_WRITE_BYTES ,EXTRA_LAST_OPC
fs/lustre/include/lustre_req_layout.h +1 -0
@@ -163,6 +163,7 @@ void req_capsule_shrink(struct req_capsule *pill,extern struct req_format RQF_MDS_QUOTACTL ;extern struct req_format RQF_MDS_SWAP_LAYOUTS ;extern struct req_format RQF_MDS_REINT_MIGRATE ; +extern struct req_format RQF_MDS_REINT_RESYNC ;/* MDS hsm formats */ extern struct req_format RQF_MDS_HSM_STATE_GET ;extern struct req_format RQF_MDS_HSM_STATE_SET ;
fs/lustre/include/lustre_swab.h +1 -0
@@ -99,6 +99,7 @@ void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,void lustre_swab_hsm_request (struct hsm_request *hr);void lustre_swab_swap_layouts (struct mdc_swap_layouts *msl);void lustre_swab_close_data (struct close_data *data); +void lustre_swab_close_data_resync_done (struct close_data_resync_done *resync);void lustre_swab_lmv_user_md (struct lmv_user_md *lum);void lustre_swab_ladvise (struct lu_ladvise *ladvise);void lustre_swab_ladvise_hdr (struct ladvise_hdr *ladvise_hdr);
fs/lustre/include/obd.h +2 -0
@@ -931,6 +931,8 @@ struct obd_client_handle {struct cl_attr ;struct md_ops { +int (*file_resync)(struct obd_export *exp,struct md_op_data *data); +int (*get_root)(struct obd_export *exp,const char *fileset,struct lu_fid *fid);int (*null_inode)(struct obd_export *,const struct lu_fid *);
fs/lustre/include/obd_class.h +15 -0
@@ -1349,6 +1349,21 @@ static inline int md_fsync(struct obd_export *exp, const struct lu_fid *fid,return MDP (exp->exp_obd, fsync)(exp, fid, request); } +/* FLR: resync mirrored files. */ +static inline int md_file_resync (struct obd_export *exp, +struct md_op_data *data) +{ +int rc; + + rc =exp_check_ops (exp); +if (rc) +return rc; + + rc =MDP (exp->exp_obd, file_resync)(exp, data); + +return rc; +} + static inline int md_read_page(struct obd_export *exp, struct md_op_data *op_data, struct md_callback *cb_op,
fs/lustre/llite/file.c +220 -69
338 lines not on this page · raw message
fs/lustre/llite/llite_internal.h +6 -2
@@ -653,12 +653,16 @@ struct ll_file_data {*/ bool fd_write_failed;bool ll_lock_no_expand; +rwlock_t fd_lock;/* protect lcc list */ +struct list_head fd_lccs;/* list of ll_cl_context */ /* Used by mirrored file to lead IOs to a specific mirror, usually * for mirror resync. 0 means default. */ u32 fd_designated_mirror; -rwlock_t fd_lock;/* protect lcc list */ -struct list_head fd_lccs;/* list of ll_cl_context */ +/* The layout version when resync starts. Resync I/O should carry this +* layout version for verification to OST objects +*/ +u32 fd_layout_version; };void llite_tunables_unregister (void );
fs/lustre/llite/rw26.c +10 -0
@@ -443,6 +443,16 @@ static int ll_write_begin(struct file *file, struct address_space *mapping, env = lcc->lcc_env; io = lcc->lcc_io; +if (file->f_flags &O_DIRECT && io->ci_designated_mirror >0 ) { +/* direct IO failed because it couldn't clean up cached pages, +* this causes a problem for mirror write because the cached +* page may belong to another mirror, which will result in +* problem submitting the I/O. +*/ + result = -EBUSY ; + goto out; + } +/* To avoid deadlock, try to lock page first. */ vmpage =grab_cache_page_nowait (mapping, index);if (unlikely (!vmpage ||PageDirty (vmpage) ||PageWriteback (vmpage))) {
fs/lustre/lmv/lmv_obd.c +21 -0
@@ -2139,6 +2139,26 @@ static struct lu_dirent *stripe_dirent_next(struct lmv_dir_ctxt *ctxt,return ent; } +static int lmv_file_resync (struct obd_export *exp,struct md_op_data *data) +{ +struct obd_device *obd = exp->exp_obd; +struct lmv_obd *lmv = &obd->u.lmv; +struct lmv_tgt_desc *tgt; +int rc; + + rc =lmv_check_connect (obd); +if (rc !=0 ) +return rc; + + tgt =lmv_find_target (lmv, &data->op_fid1); +if (IS_ERR (tgt)) +return PTR_ERR (tgt); + + data->op_flags |=MF_MDC_CANCEL_FID1 ; + rc =md_file_resync (tgt->ltd_exp, data); +return rc; +} +/** * Get dirent with the closest hash for striped directory *
@@ -3120,6 +3140,7 @@ static int lmv_merge_attr(struct obd_export *exp, .setattr = lmv_setattr, .setxattr = lmv_setxattr, .fsync = lmv_fsync, + .file_resync = lmv_file_resync, .read_page = lmv_read_page, .unlink = lmv_unlink, .init_ea_size = lmv_init_ea_size,
fs/lustre/lov/lov_io.c +62 -8
128 lines not on this page · raw message
fs/lustre/mdc/mdc_internal.h +1 -0
@@ -116,6 +116,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, void *ea, size_t ealen, struct ptlrpc_request **request);int mdc_unlink (struct obd_export *exp,struct md_op_data *op_data,struct ptlrpc_request **request); +int mdc_file_resync (struct obd_export *exp,struct md_op_data *data);int mdc_cancel_unused (struct obd_export *exp,const struct lu_fid *fid,union ldlm_policy_data *policy,enum ldlm_mode mode,enum ldlm_cancel_flags flags,void *opaque);
fs/lustre/mdc/mdc_lib.c +16 -0
@@ -450,6 +450,22 @@ static void mdc_intent_close_pack(struct ptlrpc_request *req, data->cd_data_version = op_data->op_data_version; data->cd_fid = op_data->op_fid2; + +if (bias &MDS_CLOSE_RESYNC_DONE ) { +struct close_data_resync_done *sync = &data->cd_resync; + +BUILD_BUG_ON (sizeof (data->cd_resync) >sizeof (data->cd_reserved)); + sync->resync_count = op_data->op_data_size /sizeof (u32); +if (sync->resync_count <=INLINE_RESYNC_ARRAY_SIZE ) { +memcpy (sync->resync_ids_inline, op_data->op_data, + op_data->op_data_size); + }else { +size_t count = sync->resync_count; + +memcpy (req_capsule_client_get (&req->rq_pill, &RMF_U32 ), + op_data->op_data, count *sizeof (u32)); + } + } } void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
fs/lustre/mdc/mdc_reint.c +52 -0
55 lines not on this page · raw message
fs/lustre/mdc/mdc_request.c +27 -11
@@ -762,23 +762,34 @@ static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,struct obd_device *obd =class_exp2obd (exp);struct ptlrpc_request *req;struct req_format *req_fmt; +size_t u32_count =0 ;int rc;int saved_rc =0 ; -if (op_data->op_bias &MDS_HSM_RELEASE ) { +CDEBUG (D_INODE ,"%s: " DFID " file closed with intent: %x\n" , + exp->exp_obd->obd_name,PFID (&op_data->op_fid1), + op_data->op_bias); + +if (op_data->op_bias &MDS_CLOSE_INTENT ) { req_fmt = &RQF_MDS_INTENT_CLOSE ; +if (op_data->op_bias &MDS_HSM_RELEASE ) { +/* allocate a FID for volatile file */ + rc =mdc_fid_alloc (NULL , exp, &op_data->op_fid2, + op_data); +if (rc <0 ) { +CERROR ("%s: " DFID " allocating FID: rc = %d\n" , + obd->obd_name,PFID (&op_data->op_fid1), + rc); +/* save the errcode and proceed to close */ + saved_rc = rc; + } + } +if (op_data->op_bias &MDS_CLOSE_RESYNC_DONE ) { +size_t count = op_data->op_data_size /sizeof (u32); -/* allocate a FID for volatile file */ - rc =mdc_fid_alloc (NULL , exp, &op_data->op_fid2, op_data); -if (rc <0 ) { -CERROR ("%s: " DFID " failed to allocate FID: %d\n" , - obd->obd_name,PFID (&op_data->op_fid1), rc); -/* save the errcode and proceed to close */ - saved_rc = rc; +if (count >INLINE_RESYNC_ARRAY_SIZE ) + u32_count = count; } - }else if (op_data->op_bias & (MDS_CLOSE_LAYOUT_SWAP | -MDS_CLOSE_LAYOUT_MERGE )) { - req_fmt = &RQF_MDS_INTENT_CLOSE ; }else { req_fmt = &RQF_MDS_CLOSE ; }
@@ -818,6 +829,10 @@ static int mdc_close(struct obd_export *exp, struct md_op_data *op_data, goto out; } +if (u32_count >0 ) +req_capsule_set_size (&req->rq_pill, &RMF_U32 ,RCL_CLIENT , + u32_count *sizeof (u32)); + rc =ptlrpc_request_pack (req,LUSTRE_MDS_VERSION ,MDS_CLOSE );if (rc) {ptlrpc_request_free (req);
@@ -2627,6 +2642,7 @@ int mdc_process_config(struct obd_device *obd, u32 len, void *buf) .setxattr = mdc_setxattr, .getxattr = mdc_getxattr, .fsync = mdc_fsync, + .file_resync = mdc_file_resync, .read_page = mdc_read_page, .unlink = mdc_unlink, .cancel_unused = mdc_cancel_unused,
fs/lustre/osc/osc_io.c +3 -0
@@ -296,6 +296,9 @@ int osc_io_commit_async(const struct lu_env *env, opg =osc_cl_page_osc (page, osc); oap = &opg->ops_oap; +LASSERTF (osc == oap->oap_obj, +"obj mismatch: %p / %p\n" , osc, oap->oap_obj); +if (!list_empty (&oap->oap_rpc_item)) {CDEBUG (D_CACHE ,"Busy oap %p page %p for submit.\n" , oap, opg);
fs/lustre/ptlrpc/layout.c +14 -2
@@ -121,7 +121,8 @@ &RMF_MDT_EPOCH , &RMF_REC_REINT , &RMF_CAPA1 , - &RMF_CLOSE_DATA + &RMF_CLOSE_DATA , + &RMF_U32 }; static const struct req_msg_field *obd_statfs_server[] = {
@@ -298,6 +299,12 @@ &RMF_DLM_REQ }; +static const struct req_msg_field *mds_reint_resync[] = { + &RMF_PTLRPC_BODY , + &RMF_REC_REINT , + &RMF_DLM_REQ +}; +static const struct req_msg_field *mdt_swap_layouts[] = { &RMF_PTLRPC_BODY , &RMF_MDT_BODY ,
@@ -713,6 +720,7 @@ &RQF_MDS_REINT_MIGRATE , &RQF_MDS_REINT_SETATTR , &RQF_MDS_REINT_SETXATTR , + &RQF_MDS_REINT_RESYNC , &RQF_MDS_QUOTACTL , &RQF_MDS_HSM_PROGRESS , &RQF_MDS_HSM_CT_REGISTER,
@@ -842,7 +850,7 @@ struct req_msg_field RMF_MGS_CONFIG_RES =EXPORT_SYMBOL (RMF_MGS_CONFIG_RES );struct req_msg_field RMF_U32 = -DEFINE_MSGF ("generic u32" ,0 , +DEFINE_MSGF ("generic u32" ,RMF_F_STRUCT_ARRAY ,sizeof (u32), lustre_swab_generic_32s,NULL );EXPORT_SYMBOL (RMF_U32 );
@@ -1343,6 +1351,10 @@ struct req_format RQF_MDS_REINT_SETXATTR = mds_reint_setxattr_client, mdt_body_only);EXPORT_SYMBOL (RQF_MDS_REINT_SETXATTR ); +struct req_format RQF_MDS_REINT_RESYNC = +DEFINE_REQ_FMT0 ("MDS_REINT_RESYNC" , mds_reint_resync, mdt_body_only); +EXPORT_SYMBOL (RQF_MDS_REINT_RESYNC ); +struct req_format RQF_MDS_CONNECT =DEFINE_REQ_FMT0 ("MDS_CONNECT" , obd_connect_client, obd_connect_server);
fs/lustre/ptlrpc/lproc_ptlrpc.c +1 -0
@@ -149,6 +149,7 @@ { MDS_REINT_RENAME, "mds_reint_rename" }, { MDS_REINT_OPEN, "mds_reint_open" }, { MDS_REINT_SETXATTR, "mds_reint_setxattr" }, + { MDS_REINT_RESYNC, "mds_reint_resync" }, { BRW_READ_BYTES, "read_bytes" }, { BRW_WRITE_BYTES, "write_bytes" }, };
fs/lustre/ptlrpc/pack_generic.c +13 -0
@@ -2418,6 +2418,19 @@ void lustre_swab_close_data(struct close_data *cd)__swab64s (&cd->cd_data_version); } +void lustre_swab_close_data_resync_done (struct close_data_resync_done *resync) +{ +int i; + +__swab32s (&resync->resync_count); +/* after swab, resync_count must in CPU endian */ +if (resync->resync_count <=INLINE_RESYNC_ARRAY_SIZE ) { +for (i =0 ; i < resync->resync_count; i++) +__swab32s (&resync->resync_ids_inline[i]); + } +} +EXPORT_SYMBOL (lustre_swab_close_data_resync_done); +void lustre_swab_ladvise (struct lu_ladvise *ladvise) {swab16s (&ladvise->lla_advice);
fs/lustre/ptlrpc/wiretest.c +93 -1
106 lines not on this page · raw message
include/uapi/linux/lustre/lustre_idl.h +44 -3
88 lines not on this page · raw message
include/uapi/linux/lustre/lustre_user.h +27 -8
@@ -238,6 +238,31 @@ struct ll_futimes_3 { };/* +* Maximum number of mirrors currently implemented. +*/ +#define LUSTRE_MIRROR_COUNT_MAX 16 + +/* Lease types for use as arg and return of LL_IOC_{GET,SET}_LEASE ioctl. */ +enum ll_lease_mode { +LL_LEASE_RDLCK =0x01 , +LL_LEASE_WRLCK =0x02 , +LL_LEASE_UNLCK =0x04 , +}; + +enum ll_lease_flags { +LL_LEASE_RESYNC =0x1 , +LL_LEASE_RESYNC_DONE =0x2 , +}; + +#define IOC_IDS_MAX 4096 +struct ll_ioc_lease { +__u32 lil_mode; +__u32 lil_flags; +__u32 lil_count; +__u32 lil_ids[0 ]; +}; + +/* * The ioctl naming rules: * LL_* - works on the currently opened filehandle instead of parent dir * *_OBD_* - gets data for both OSC or MDC (LOV, LMV indirectly)
@@ -294,7 +319,8 @@ struct ll_futimes_3 {#define LL_IOC_LMV_SETSTRIPE _IOWR('f', 240, struct lmv_user_md)#define LL_IOC_LMV_GETSTRIPE _IOWR('f', 241, struct lmv_user_md) -#define LL_IOC_SET_LEASE _IOWR('f', 243, long) +#define LL_IOC_SET_LEASE _IOWR('f', 243, struct ll_ioc_lease) +#define LL_IOC_SET_LEASE_OLD _IOWR('f', 243, long)#define LL_IOC_GET_LEASE _IO('f', 244)#define LL_IOC_HSM_IMPORT _IOWR('f', 245, struct hsm_user_import)#define LL_IOC_LMV_SET_DEFAULT_STRIPE _IOWR('f', 246, struct lmv_user_md)
@@ -303,13 +329,6 @@ struct ll_futimes_3 {#define LL_IOC_GETPARENT _IOWR('f', 249, struct getparent)#define LL_IOC_LADVISE _IOR('f', 250, struct llapi_lu_ladvise) -/* Lease types for use as arg and return of LL_IOC_{GET,SET}_LEASE ioctl. */ -enum ll_lease_type { -LL_LEASE_RDLCK =0x1 , -LL_LEASE_WRLCK =0x2 , -LL_LEASE_UNLCK =0x4 , -}; -#define LL_STATFS_LMV 1#define LL_STATFS_LOV 2#define LL_STATFS_NODELAY 4
Signature · 1 line
1.8.3.1
PATCH 76/151 lustre: flr: randomize mirror pick
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
Pick mirror randomly for read on client side and write on the MDT.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: c4c8cd23f9a3 ("LU-9771 flr: randomize mirror pick")
Reviewed-on: https://review.whamcloud.com/29097
--- fs/lustre/include/obd_support.h | 1 + fs/lustre/llite/lcommon_cl.c | 4 ++++ fs/lustre/lov/lov_object.c | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+)
fs/lustre/include/obd_support.h +1 -0
@@ -478,6 +478,7 @@#define OBD_FAIL_FLR_GLIMPSE_IMMUTABLE 0x1A00#define OBD_FAIL_FLR_LV_DELAY 0x1A01#define OBD_FAIL_FLR_LV_INC 0x1A02 +#define OBD_FAIL_FLR_RANDOM_PICK_MIRROR 0x1A03/* Assign references to moved code to reduce code changes */ #define OBD_FAIL_PRECHECK (id) CFS_FAIL_PRECHECK(id)
fs/lustre/llite/lcommon_cl.c +4 -0
@@ -188,6 +188,10 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md) } }else { result =cl_conf_set (env, lli->lli_clob, &conf); +if (result == -EBUSY ) { +/* ignore the error since I/O will handle it later */ + result =0 ; + } }cl_env_put (env, &refcheck);
fs/lustre/lov/lov_object.c +19 -0
@@ -756,6 +756,25 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, goto out; } +if (OBD_FAIL_CHECK (OBD_FAIL_FLR_RANDOM_PICK_MIRROR )) { +unsigned int seq; + +get_random_bytes (&seq,sizeof (seq)); + seq %= mirror_count; + + i =0 ; + lov_foreach_mirror_entry(lov, lre) { + i++; +if (lre->lre_stale) +continue ; + +if (!seq--) { + comp->lo_preferred_mirror = i -1 ; +break ; + } + } + } +LASSERT (comp->lo_preferred_mirror >=0 ); out:
Signature · 1 line
1.8.3.1
PATCH 77/151 lustre: flr: instantiate component for truncate
In reply to James SimmonsFrom: Bobi Jam <[email protected]>
layout intent for truncate IO needs stale components for non primary mirror overlapping [trunc_size, eof), while needs to instantiate components overlapping [0, trunc_size).
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 173981742e69 ("LU-9771 flr: instantiate component for truncate")
Reviewed-on: https://review.whamcloud.com/29099
--- fs/lustre/llite/file.c | 27 +++++++++++++++------------ fs/lustre/llite/lcommon_cl.c | 2 +- fs/lustre/llite/llite_internal.h | 3 ++- fs/lustre/llite/vvp_io.c | 8 ++++++-- fs/lustre/lov/lov_io.c | 6 +++--- include/uapi/linux/lustre/lustre_idl.h | 2 +- 6 files changed, 28 insertions(+), 20 deletions(-)
fs/lustre/llite/file.c +15 -12
@@ -1723,6 +1723,10 @@ static int ll_lov_setstripe(struct inode *inode, struct file *file,struct cl_layout cl = { .cl_is_composite = false, }; +struct lu_extent ext = { + .e_start =0 , + .e_end =OBD_OBJECT_EOF , + };struct lu_env *env;u16 refcheck;
@@ -1732,7 +1736,8 @@ static int ll_lov_setstripe(struct inode *inode, struct file *file, rc =cl_object_layout_get (env, obj, &cl);if (!rc && cl.cl_is_composite) - rc =ll_layout_write_intent (inode,0 ,OBD_OBJECT_EOF ); + rc =ll_layout_write_intent (inode,LAYOUT_INTENT_WRITE , + &ext);cl_env_put (env, &refcheck);if (rc)
@@ -4396,25 +4401,23 @@ int ll_layout_refresh(struct inode *inode, u32 *gen)* Issue layout intent RPC indicating where in a file an IO is about to write. * * @inode: file inode. -* @start: start offset of fille in bytes where an IO is about to -* write. -* @end: exclusive end offset in bytes of the write range. +* @ext: write range with start offset of fille in bytes where +* an IO is about to write, and exclusive end offset in +* bytes. * * Returns: 0 on success * < 0 error code */ -int ll_layout_write_intent (struct inode *inode,u64 start,u64 end) +int ll_layout_write_intent (struct inode *inode,enum layout_intent_opc opc, +struct lu_extent *ext) {struct layout_intent intent = { - .li_opc =LAYOUT_INTENT_WRITE , - .li_extent.e_start = start, - .li_extent.e_end = end, + .li_opc = opc, + .li_extent.e_start = ext->e_start, + .li_extent.e_end = ext->e_end, }; -int rc; - rc =ll_layout_intent (inode, &intent); - -return rc; +return ll_layout_intent (inode, &intent); }/**
fs/lustre/llite/lcommon_cl.c +1 -1
@@ -103,10 +103,10 @@ int cl_setattr_ost(struct cl_object *obj, const struct iattr *attr, io->u.ci_setattr.sa_xvalid = xvalid; io->u.ci_setattr.sa_parent_fid =lu_object_fid (&obj->co_lu); +again:if (attr->ia_valid &ATTR_FILE )ll_io_set_mirror (io, attr->ia_file); -again:if (cl_io_init (env, io,CIT_SETATTR , io->ci_obj) ==0 ) {struct vvp_io *vio =vvp_env_io (env);
fs/lustre/llite/llite_internal.h +2 -1
@@ -1332,7 +1332,8 @@ static inline void d_lustre_revalidate(struct dentry *dentry)int ll_layout_conf (struct inode *inode,const struct cl_object_conf *conf);int ll_layout_refresh (struct inode *inode,u32 *gen);int ll_layout_restore (struct inode *inode,loff_t start,u64 length); -int ll_layout_write_intent (struct inode *inode,u64 start,u64 end); +int ll_layout_write_intent (struct inode *inode,enum layout_intent_opc opc, +struct lu_extent *ext);int ll_xattr_init (void );void ll_xattr_fini (void );
fs/lustre/llite/vvp_io.c +6 -2
@@ -347,6 +347,8 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)* RPC. */ if (io->ci_need_write_intent) { +enum layout_intent_opc opc =LAYOUT_INTENT_WRITE ; + io->ci_need_write_intent =0 ; LASSERT(io->ci_type == CIT_WRITE ||
@@ -356,8 +358,10 @@ static void vvp_io_fini(const struct lu_env *env, const struct cl_io_slice *ios)PFID (lu_object_fid (&obj->co_lu)), io->ci_type, PEXT(&io->ci_write_intent)); - rc =ll_layout_write_intent (inode, io->ci_write_intent.e_start, - io->ci_write_intent.e_end); +if (cl_io_is_trunc (io)) + opc =LAYOUT_INTENT_TRUNC ; + + rc =ll_layout_write_intent (inode, opc, &io->ci_write_intent); io->ci_result = rc;if (!rc) io->ci_need_restart =1 ;
fs/lustre/lov/lov_io.c +3 -3
@@ -538,9 +538,10 @@ static int lov_io_slice_init(struct lov_io *lio, struct lov_object *obj, goto out; } - ext.e_start = lio->lis_pos; - ext.e_end = lio->lis_endpos; + io->ci_write_intent.e_start = lio->lis_pos; + io->ci_write_intent.e_end = lio->lis_endpos; + ext = io->ci_write_intent;/* for truncate, it only needs to instantiate the components * before the truncated size. */
@@ -553,7 +554,6 @@ static int lov_io_slice_init(struct lov_io *lio, struct lov_object *obj, lov_foreach_io_layout(index, lio, &ext) {if (!lsm_entry_inited (obj->lo_lsm, index)) { io->ci_need_write_intent =1 ; - io->ci_write_intent = ext;break ; } }
include/uapi/linux/lustre/lustre_idl.h +1 -1
@@ -2845,7 +2845,7 @@ struct getparent {char gp_name[0 ];/**< zero-terminated link name */ } __packed; -enum { +enum layout_intent_opc {LAYOUT_INTENT_ACCESS =0 ,/** generic access */ LAYOUT_INTENT_READ =1 ,/** not used */ LAYOUT_INTENT_WRITE =2 ,/** write file, for comp layout */
Signature · 1 line
1.8.3.1
PATCH 78/151 lustre: hsm: don't release with wrong size
In reply to James SimmonsFrom: Alexander Boyko <[email protected]>
The result of ll_merge_attr operation was ignored during ll_hsm_release. For this case the released file could have the wrong size on MDS, like
File: ?released.file?
Size: 0 Blocks: 0 IO Block: 4194304 regular empty file
WC-bug-id: https://jira.whamcloud.com/browse/LU-10271
Lustre-commit: 09b457fffc8a ("LU-10271 hsm: don't release with wrong size")
Reviewed-on: https://review.whamcloud.com/30240
--- fs/lustre/include/obd_support.h | 1 + fs/lustre/llite/file.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
fs/lustre/include/obd_support.h +1 -0
@@ -384,6 +384,7 @@#define OBD_FAIL_MDC_RPCS_SEM 0x804#define OBD_FAIL_MDC_LIGHTWEIGHT 0x805#define OBD_FAIL_MDC_CLOSE 0x806 +#define OBD_FAIL_MDC_MERGE 0x807#define OBD_FAIL_MGS 0x900#define OBD_FAIL_MGS_ALL_REQUEST_NET 0x901
fs/lustre/llite/file.c +11 -2
@@ -1133,7 +1133,10 @@ int ll_merge_attr(const struct lu_env *env, struct inode *inode) ctime = inode->i_ctime.tv_sec;cl_object_attr_lock (obj); - rc =cl_object_attr_get (env, obj, attr); +if (OBD_FAIL_CHECK (OBD_FAIL_MDC_MERGE )) + rc = -EINVAL ; +else + rc =cl_object_attr_get (env, obj, attr);cl_object_attr_unlock (obj);if (rc !=0 ) {
@@ -2050,9 +2053,15 @@ int ll_hsm_release(struct inode *inode) goto out; } -ll_merge_attr (env, inode); + rc =ll_merge_attr (env, inode);cl_env_put (env, &refcheck); +/* If error happen, we have the wrong size for a file. +* Don't release it. +*/ +if (rc !=0 ) + goto out; +/* Release the file. * NB: lease lock handle is released in mdc_hsm_release_pack() because * we still need it to pack l_remote_handle to MDT.
Signature · 1 line
1.8.3.1
PATCH 79/151 lustre: mdc: Add an additional set of 64 changelog flags
In reply to James SimmonsFrom: Matthew Sanderson <[email protected]>
This adds a new changelog extension containing 64 additional flag bits, to be used for future changelog extensions.
The presence of the extension is signalled using the last remaining unused changelog flag bit.
The new extension is present in all changelog records by default, but will be removed from records read by legacy changelog consumers.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9727
Lustre-commit: 08ffb6f1428f ("LU-9727 mdc: Add an additional set of 64 changelog flags")
Reviewed-on: https://review.whamcloud.com/28045
--- fs/lustre/mdc/mdc_changelog.c | 5 +- include/uapi/linux/lustre/lustre_idl.h | 3 +- include/uapi/linux/lustre/lustre_user.h | 119 +++++++++++++++++++++++++++----- 3 files changed, 106 insertions(+), 21 deletions(-)
fs/lustre/mdc/mdc_changelog.c +4 -1
@@ -231,7 +231,10 @@ static int chlg_load(void *args) goto err_out; } - rc =llog_init_handle (NULL , llh,LLOG_F_IS_CAT |LLOG_F_EXT_JOBID , + rc =llog_init_handle (NULL , llh, +LLOG_F_IS_CAT | +LLOG_F_EXT_JOBID | +LLOG_F_EXT_EXTRA_FLAGS ,NULL );if (rc) { CERROR("%s: fail to init llog handle: rc = %d\n",
include/uapi/linux/lustre/lustre_idl.h +2 -1
@@ -2577,6 +2577,7 @@ enum llog_flag {LLOG_F_IS_PLAIN =0x4 ,LLOG_F_EXT_JOBID =0x8 ,LLOG_F_IS_FIXSIZE =0x10 , + LLOG_F_EXT_EXTRA_FLAGS = 0x20,/* * Note: Flags covered by LLOG_F_EXT_MASK will be inherited from
@@ -2584,7 +2585,7 @@ enum llog_flag {* because the catlog record is usually fixed size, but its plain * log record can be variable */ - LLOG_F_EXT_MASK = LLOG_F_EXT_JOBID, + LLOG_F_EXT_MASK = LLOG_F_EXT_JOBID | LLOG_F_EXT_EXTRA_FLAGS, };/* On-disk header structure of each log object, stored in little endian order */
include/uapi/linux/lustre/lustre_user.h +100 -19
215 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 80/151 lustre: ldlm: assume OBD_CONNECT_IBITS
In reply to James SimmonsFrom: "John L. Hammond" <[email protected]>
Clients and MDSs have supported and required OBD_CONNECT_IBITS since before 1.6 so remove obsolete code to handle clients that do not support this flag.
WC-bug-id: https://jira.whamcloud.com/browse/LU-8402
Lustre-commit: c7a833830de6 ("LU-8402 ldlm: assume OBD_CONNECT_IBITS")
Reviewed-on: https://review.whamcloud.com/30009
--- fs/lustre/ldlm/ldlm_request.c | 17 +++++++++-------- fs/lustre/ptlrpc/import.c | 10 ---------- include/uapi/linux/lustre/lustre_idl.h | 4 ++-- 3 files changed, 11 insertions(+), 20 deletions(-)
fs/lustre/ldlm/ldlm_request.c +9 -8
@@ -445,14 +445,15 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, }LDLM_DEBUG (lock,"client-side enqueue, new resource" ); } -if (with_policy) -if (!(type ==LDLM_IBITS && - !(exp_connect_flags (exp) &OBD_CONNECT_IBITS ))) -/* We assume lock type cannot change on server*/ -ldlm_convert_policy_to_local (exp, - lock->l_resource->lr_type, - &reply->lock_desc.l_policy_data, - &lock->l_policy_data); + +if (with_policy) { +/* We assume lock type cannot change on server*/ +ldlm_convert_policy_to_local (exp, + lock->l_resource->lr_type, + &reply->lock_desc.l_policy_data, + &lock->l_policy_data); + } +if (type !=LDLM_PLAIN )LDLM_DEBUG (lock,"client-side enqueue, new policy data" );
fs/lustre/ptlrpc/import.c +0 -10
@@ -754,16 +754,6 @@ static int ptlrpc_connect_set_flags(struct obd_import *imp,struct client_obd *cli = &imp->imp_obd->u.cli;static bool warned; -if ((imp->imp_connect_flags_orig &OBD_CONNECT_IBITS ) && - !(ocd->ocd_connect_flags &OBD_CONNECT_IBITS )) { -LCONSOLE_WARN ("%s: MDS %s does not support ibits lock, either very old or invalid: requested %#llx, replied %#llx\n" , - imp->imp_obd->obd_name, - imp->imp_connection->c_remote_uuid.uuid, - imp->imp_connect_flags_orig, - ocd->ocd_connect_flags); -return -EPROTO ; - } -spin_lock (&imp->imp_lock);list_del (&imp->imp_conn_current->oic_item);list_add (&imp->imp_conn_current->oic_item, &imp->imp_conn_list);
include/uapi/linux/lustre/lustre_idl.h +2 -2
@@ -702,7 +702,7 @@ struct ptlrpc_body_v2 {#define OBD_CONNECT_LARGE_ACL 0x200ULL/* more than 32 ACL entries */ #define OBD_CONNECT_TRUNCLOCK 0x400ULL/*locks on server for punch */ #define OBD_CONNECT_TRANSNO 0x800ULL/*replay sends init transno */ -#define OBD_CONNECT_IBITS 0x1000ULL/*support for inodebits locks*/ +#define OBD_CONNECT_IBITS 0x1000ULL/* not checked in 2.11+ */ #define OBD_CONNECT_JOIN 0x2000ULL/*files can be concatenated. *We do not support JOIN FILE *anymore, reserve this flags
@@ -809,7 +809,7 @@ struct ptlrpc_body_v2 { (!!((ocd)->ocd_connect_flags & OBD_CONNECT_##flg)) /* Features required for this version of the client to work with server */ -#define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_IBITS | OBD_CONNECT_FID | \ +#define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_FID | \ OBD_CONNECT_FULL20)/* This structure is used for both request and reply.
Signature · 1 line
1.8.3.1
PATCH 81/151 lustre: llite: assume OBD_CONNECT_ATTRFID
In reply to James SimmonsFrom: "John L. Hammond" <[email protected]>
OBD_CONNECT_ATTRFID has been supported by MDSs since before 1.6 so add it to the client side required flags and remove some code to handle servers that do not support it.
WC-bug-id: https://jira.whamcloud.com/browse/LU-8402
Lustre-commit: deaef32d1fd6 ("LU-8402 llite: assume OBD_CONNECT_ATTRFID")
Reviewed-on: https://review.whamcloud.com/30010
--- fs/lustre/llite/file.c | 112 +++++++++++---------------------- include/uapi/linux/lustre/lustre_idl.h | 1 + 2 files changed, 39 insertions(+), 74 deletions(-)
fs/lustre/llite/file.c +38 -74
@@ -3733,10 +3733,15 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc)return rc; } -static int __ll_inode_revalidate (struct dentry *dentry,u64 ibits) +static int __ll_inode_revalidate (struct dentry *dentry, +enum ldlm_intent_flags op) {struct inode *inode =d_inode (dentry); +struct lookup_intent oit = { + .it_op = op, + };struct ptlrpc_request *req =NULL ; +struct md_op_data *op_data;struct obd_export *exp;int rc =0 ;
@@ -3745,79 +3750,40 @@ static int __ll_inode_revalidate(struct dentry *dentry, u64 ibits) exp =ll_i2mdexp (inode); -/* XXX: Enable OBD_CONNECT_ATTRFID to reduce unnecessary getattr RPC. -* But under CMD case, it caused some lock issues, should be fixed -* with new CMD ibits lock. See bug 12718 -*/ -if (exp_connect_flags (exp) &OBD_CONNECT_ATTRFID ) { -struct lookup_intent oit = { .it_op =IT_GETATTR }; -struct md_op_data *op_data; - -if (ibits ==MDS_INODELOCK_LOOKUP ) - oit.it_op =IT_LOOKUP ; - -/* Call getattr by fid, so do not provide name at all. */ - op_data =ll_prep_md_op_data (NULL , inode, - inode,NULL ,0 ,0 , -LUSTRE_OPC_ANY ,NULL ); -if (IS_ERR (op_data)) -return PTR_ERR (op_data); - - rc =md_intent_lock (exp, op_data, &oit, &req, - &ll_md_blocking_ast,0 ); -ll_finish_md_op_data (op_data); -if (rc <0 ) { - rc =ll_inode_revalidate_fini (inode, rc); - goto out; - } - - rc =ll_revalidate_it_finish (req, &oit, inode); -if (rc !=0 ) { -ll_intent_release (&oit); - goto out; - } - -/* Unlinked? Unhash dentry, so it is not picked up later by -* do_lookup() -> ll_revalidate_it(). We cannot use d_drop -* here to preserve get_cwd functionality on 2.6. -* Bug 10503 -*/ -if (!d_inode (dentry)->i_nlink) { -spin_lock (&inode->i_lock); -d_lustre_invalidate (dentry,0 ); -spin_unlock (&inode->i_lock); - } - -ll_lookup_finish_locks (&oit, inode); - }else if (!ll_have_md_lock (d_inode (dentry), &ibits,LCK_MINMODE )) { -struct ll_sb_info *sbi =ll_i2sbi (d_inode (dentry)); -u64 valid =OBD_MD_FLGETATTR ; -struct md_op_data *op_data; -int ealen =0 ; - -if (S_ISREG (inode->i_mode)) { - rc =ll_get_default_mdsize (sbi, &ealen); -if (rc) -return rc; - valid |=OBD_MD_FLEASIZE |OBD_MD_FLMODEASIZE ; - } +/* Call getattr by fid, so do not provide name at all. */ + op_data =ll_prep_md_op_data (NULL ,d_inode (dentry),d_inode (dentry), +NULL ,0 ,0 ,LUSTRE_OPC_ANY ,NULL ); +if (IS_ERR (op_data)) +return PTR_ERR (op_data); - op_data =ll_prep_md_op_data (NULL , inode,NULL ,NULL , -0 , ealen,LUSTRE_OPC_ANY , -NULL ); -if (IS_ERR (op_data)) -return PTR_ERR (op_data); + rc =md_intent_lock (exp, op_data, &oit, &req, &ll_md_blocking_ast,0 ); +ll_finish_md_op_data (op_data); +if (rc <0 ) { + rc =ll_inode_revalidate_fini (inode, rc); + goto out; + } - op_data->op_valid = valid; - rc =md_getattr (sbi->ll_md_exp, op_data, &req); -ll_finish_md_op_data (op_data); -if (rc) -return ll_inode_revalidate_fini (inode, rc); + rc =ll_revalidate_it_finish (req, &oit, inode); +if (rc !=0 ) { +ll_intent_release (&oit); + goto out; + } - rc =ll_prep_inode (&inode, req,NULL ,NULL ); +/* Unlinked? Unhash dentry, so it is not picked up later by +* do_lookup() -> ll_revalidate_it(). We cannot use d_drop +* here to preserve get_cwd functionality on 2.6. +* Bug 10503 +*/ +if (!d_inode (dentry)->i_nlink) { +spin_lock (&inode->i_lock); +d_lustre_invalidate (dentry,0 ); +spin_unlock (&inode->i_lock); } + +ll_lookup_finish_locks (&oit, inode); out:ptlrpc_req_finished (req); +return rc; }
@@ -3843,12 +3809,12 @@ static int ll_merge_md_attr(struct inode *inode)return 0 ; } -static int ll_inode_revalidate (struct dentry *dentry,u64 ibits) +static int ll_inode_revalidate (struct dentry *dentry,enum ldlm_intent_flags op) {struct inode *inode =d_inode (dentry);int rc; - rc =__ll_inode_revalidate (dentry, ibits); + rc =__ll_inode_revalidate (dentry, op);if (rc !=0 )return rc;
@@ -3888,8 +3854,7 @@ int ll_getattr(const struct path *path, struct kstat *stat,struct ll_inode_info *lli =ll_i2info (inode);int res; - res =ll_inode_revalidate (path->dentry, -MDS_INODELOCK_UPDATE |MDS_INODELOCK_LOOKUP ); + res =ll_inode_revalidate (path->dentry,IT_GETATTR );ll_stats_ops_tally (sbi,LPROC_LL_GETATTR ,1 );if (res)
@@ -3983,8 +3948,7 @@ int ll_inode_permission(struct inode *inode, int mask)*/ if (is_root_inode (inode)) { - rc =__ll_inode_revalidate (inode->i_sb->s_root, -MDS_INODELOCK_LOOKUP ); + rc =__ll_inode_revalidate (inode->i_sb->s_root,IT_LOOKUP );if (rc)return rc; }
include/uapi/linux/lustre/lustre_idl.h +1 -0
@@ -810,6 +810,7 @@ struct ptlrpc_body_v2 {/* Features required for this version of the client to work with server */ #define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_FID | \ + OBD_CONNECT_ATTRFID | \ OBD_CONNECT_FULL20)/* This structure is used for both request and reply.
Signature · 1 line
1.8.3.1
PATCH 82/151 lustre: llite: simplify ll_inode_revalidate()
In reply to James SimmonsFrom: "John L. Hammond" <[email protected]>
ll_inode_revalidate() is only called by ll_getattr() so move the contents of ll_inode_revalidate() to ll_getattr() and rename __ll_inode_revalidate() to ll_inode_revalidate().
WC-bug-id: https://jira.whamcloud.com/browse/LU-8402
Lustre-commit: a430c3376c6b ("LU-8402 llite: simplify ll_inode_revalidate()")
Reviewed-on: https://review.whamcloud.com/30036
--- fs/lustre/llite/file.c | 75 +++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 44 deletions(-)
fs/lustre/llite/file.c +31 -44
@@ -3733,26 +3733,23 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc)return rc; } -static int __ll_inode_revalidate (struct dentry *dentry, -enum ldlm_intent_flags op) +static int ll_inode_revalidate (struct dentry *dentry,enum ldlm_intent_flags op) {struct inode *inode =d_inode (dentry); +struct obd_export *exp =ll_i2mdexp (inode);struct lookup_intent oit = { .it_op = op, };struct ptlrpc_request *req =NULL ;struct md_op_data *op_data; -struct obd_export *exp;int rc =0 ;CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p),name=%pd\n" ,PFID (ll_inode2fid (inode)), inode, dentry); - exp =ll_i2mdexp (inode); -/* Call getattr by fid, so do not provide name at all. */ - op_data =ll_prep_md_op_data (NULL ,d_inode (dentry),d_inode (dentry), -NULL ,0 ,0 ,LUSTRE_OPC_ANY ,NULL ); + op_data =ll_prep_md_op_data (NULL , inode, inode,NULL ,0 ,0 , +LUSTRE_OPC_ANY ,NULL );if (IS_ERR (op_data))return PTR_ERR (op_data);
@@ -3809,30 +3806,21 @@ static int ll_merge_md_attr(struct inode *inode)return 0 ; } -static int ll_inode_revalidate (struct dentry *dentry,enum ldlm_intent_flags op) +int ll_getattr (const struct path *path,struct kstat *stat, +u32 request_mask,unsigned int flags) { -struct inode *inode =d_inode (dentry); +struct inode *inode =d_inode (path->dentry); +struct ll_sb_info *sbi =ll_i2sbi (inode); +struct ll_inode_info *lli =ll_i2info (inode);int rc; - rc =__ll_inode_revalidate (dentry, op); -if (rc !=0 ) -return rc; - -/* if object isn't regular file, don't validate size */ -if (!S_ISREG (inode->i_mode)) { -if (S_ISDIR (inode->i_mode) && -ll_i2info (inode)->lli_lsm_md) { - rc =ll_merge_md_attr (inode); -if (rc) -return rc; - } +ll_stats_ops_tally (sbi,LPROC_LL_GETATTR ,1 ); - inode->i_atime.tv_sec =ll_i2info (inode)->lli_atime; - inode->i_mtime.tv_sec =ll_i2info (inode)->lli_mtime; - inode->i_ctime.tv_sec =ll_i2info (inode)->lli_ctime; - }else { -struct ll_inode_info *lli =ll_i2info (inode); + rc =ll_inode_revalidate (path->dentry,IT_GETATTR ); +if (rc <0 ) +return rc; +if (S_ISREG (inode->i_mode)) {/* In case of restore, the MDT has the right size and has * already send it back without granting the layout lock, * inode is up-to-date so glimpse is useless.
@@ -3840,25 +3828,24 @@ static int ll_inode_revalidate(struct dentry *dentry, enum ldlm_intent_flags op)* restore the MDT holds the layout lock so the glimpse will * block up to the end of restore (getattr will block) */ -if (!test_bit (LLIF_FILE_RESTORING , &lli->lli_flags)) +if (!test_bit (LLIF_FILE_RESTORING , &lli->lli_flags)) { rc =ll_glimpse_size (inode); - } -return rc; -} - -int ll_getattr (const struct path *path,struct kstat *stat, -u32 request_mask,unsigned int flags) -{ -struct inode *inode =d_inode (path->dentry); -struct ll_sb_info *sbi =ll_i2sbi (inode); -struct ll_inode_info *lli =ll_i2info (inode); -int res; - - res =ll_inode_revalidate (path->dentry,IT_GETATTR ); -ll_stats_ops_tally (sbi,LPROC_LL_GETATTR ,1 ); +if (rc <0 ) +return rc; + } + }else { +/* If object isn't regular a file then don't validate size. */ +if (S_ISDIR (inode->i_mode) && + lli->lli_lsm_md !=NULL ) { + rc =ll_merge_md_attr (inode); +if (rc <0 ) +return rc; + } -if (res) -return res; + inode->i_atime.tv_sec = lli->lli_atime; + inode->i_mtime.tv_sec = lli->lli_mtime; + inode->i_ctime.tv_sec = lli->lli_ctime; + }OBD_FAIL_TIMEOUT (OBD_FAIL_GETATTR_DELAY ,30 );
@@ -3948,7 +3935,7 @@ int ll_inode_permission(struct inode *inode, int mask)*/ if (is_root_inode (inode)) { - rc =__ll_inode_revalidate (inode->i_sb->s_root,IT_LOOKUP ); + rc =ll_inode_revalidate (inode->i_sb->s_root,IT_LOOKUP );if (rc)return rc; }
Signature · 1 line
1.8.3.1
PATCH 83/151 lustre: obd: free obd_svc_stats when all users are gone
In reply to James SimmonsFrom: Bruno Faccini <[email protected]>
During object device shutdown obd_svc_stats must only be freed after all access methods from user-land are no longer possible to prevent any race and further crash.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10224
Lustre-commit: ffc843a0aacd (LU-10224 obd: free obd_svc_stats when all users are gone")
Reviewed-on: https://review.whamcloud.com/30249
--- fs/lustre/mdc/mdc_request.c | 1 - fs/lustre/osc/osc_request.c | 1 - fs/lustre/ptlrpc/lproc_ptlrpc.c | 4 ++++ 3 files changed, 4 insertions(+), 2 deletions(-)
fs/lustre/mdc/mdc_request.c +0 -1
@@ -2584,7 +2584,6 @@ static int mdc_precleanup(struct obd_device *obd)obd_cleanup_client_import (obd);ptlrpc_lprocfs_unregister_obd (obd); -lprocfs_obd_cleanup (obd);ldebugfs_free_md_stats (obd);mdc_llog_finish (obd);return 0 ;
fs/lustre/osc/osc_request.c +0 -1
@@ -3070,7 +3070,6 @@ static int osc_precleanup(struct obd_device *obd)osc_precleanup_common (obd);ptlrpc_lprocfs_unregister_obd (obd); -lprocfs_obd_cleanup (obd);return 0 ; }
fs/lustre/ptlrpc/lproc_ptlrpc.c +4 -0
@@ -1172,6 +1172,10 @@ void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc)void ptlrpc_lprocfs_unregister_obd (struct obd_device *obd) { +/* cleanup first to allow concurrent access to device's +* stats via debugfs to complete safely +*/ +lprocfs_obd_cleanup (obd);debugfs_remove_recursive (obd->obd_svc_debugfs_entry);if (obd->obd_svc_stats)
Signature · 1 line
1.8.3.1
PATCH 84/151 lustre: mdc: add uid/gid to Changelogs entries
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
Add a new changelog extension named changelog_ext_uidgid to hold uid/gid information.
uid/gid info is added to every Changelog entry type except MARK, in the form 'u=<uid>:<gid>':
5 01CREAT 15:44:32.385864793 2017.07.18 0x0 t=[0x200000402:0x3:0x0] ef=0x1 u=500:500 p=[0x200000402:0x2:0x0] file1
WC-bug-id: https://jira.whamcloud.com/browse/LU-9727
Lustre-commit: 361edea47072 ("LU-9727 mdc: add uid/gid to Changelogs entries")
Reviewed-on: https://review.whamcloud.com/28114
--- fs/lustre/mdc/mdc_changelog.c | 3 +- include/uapi/linux/lustre/lustre_idl.h | 4 ++- include/uapi/linux/lustre/lustre_user.h | 51 +++++++++++++++++++++++++++++++-- 3 files changed, 53 insertions(+), 5 deletions(-)
fs/lustre/mdc/mdc_changelog.c +2 -1
@@ -234,7 +234,8 @@ static int chlg_load(void *args) rc =llog_init_handle (NULL , llh,LLOG_F_IS_CAT |LLOG_F_EXT_JOBID | -LLOG_F_EXT_EXTRA_FLAGS , +LLOG_F_EXT_EXTRA_FLAGS | +LLOG_F_EXT_X_UIDGID ,NULL );if (rc) { CERROR("%s: fail to init llog handle: rc = %d\n",
include/uapi/linux/lustre/lustre_idl.h +3 -1
@@ -2579,6 +2579,7 @@ enum llog_flag {LLOG_F_EXT_JOBID =0x8 ,LLOG_F_IS_FIXSIZE =0x10 ,LLOG_F_EXT_EXTRA_FLAGS =0x20 , + LLOG_F_EXT_X_UIDGID = 0x40,/* * Note: Flags covered by LLOG_F_EXT_MASK will be inherited from
@@ -2586,7 +2587,8 @@ enum llog_flag {* because the catlog record is usually fixed size, but its plain * log record can be variable */ - LLOG_F_EXT_MASK = LLOG_F_EXT_JOBID | LLOG_F_EXT_EXTRA_FLAGS, + LLOG_F_EXT_MASK = LLOG_F_EXT_JOBID | LLOG_F_EXT_EXTRA_FLAGS | + LLOG_F_EXT_X_UIDGID, };/* On-disk header structure of each log object, stored in little endian order */
include/uapi/linux/lustre/lustre_user.h +48 -3
108 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 85/151 lustre: scrub: general framework for OI scrub
In reply to James SimmonsFrom: Fan Yong <[email protected]>
Reconstruct OI scrub code to make some data structure and functions can be shared between osd-ldiskfs and osd-ZFS. This cleanup is mainly server side but it does lead to a enum removal since in the linux client.
WC-bug-id: https://jira.whamcloud.com/browse/LU-7585
Lustre-commit: 7e21ea59edcc ("LU-7585 scrub: general framework for OI scrub")
Reviewed-on: https://review.whamcloud.com/28607
--- fs/lustre/include/lustre_fid.h | 7 ------- 1 file changed, 7 deletions(-)
fs/lustre/include/lustre_fid.h +0 -7
@@ -195,13 +195,6 @@ enum {LUSTRE_SEQ_SUPER_WIDTH = ((1ULL <<30ULL ) *LUSTRE_SEQ_META_WIDTH ) }; -enum { -/** 2^6 FIDs for OI containers */ -OSD_OI_FID_OID_BITS =6 , -/** reserve enough FIDs in case we want more in the future */ -OSD_OI_FID_OID_BITS_MAX =10 , -}; -/** special OID for local objects */ enum local_oid {/** \see fld_mod_init */
Signature · 1 line
1.8.3.1
PATCH 86/151 lustre: idl: clean up and document ptlrpc structures
In reply to James SimmonsFrom: Andreas Dilger <[email protected]>
Miscellaneous cleanups for wire-related structures found during the Lustre protocol documentation project.
Remove obsolete and unused since 2.3 OBD_QC_CALLBACK RPC.
Move definition of constants used by lustre_msg_v2 and ptlrpc_body fields to immediately before their respective structures.
Add comments for struct members for lustre_msg_v2, ptlrpc_body_v3, ldlm_request, and obd_statfs.
Rename RQF_MDS_INTENT_CLOSE to RQF_MDS_CLOSE_INTENT to make it more easily found with RQF_MDS_CLOSE. Rename mdt_intent_close_client() and mdc_intent_close_pack() to mdt_close_intent_client() and mdc_close_intent_pack() to match.
Rename RQF_LDLM_GL_DESC_CALLBACK to RQF_LDLM_GL_CALLBACK_DESC to make it match RQF_LDLM_FL_CALLBACK and RQF_LDLM_BL_CALLBACK.
Remove unused MSG_OP_FLAG_MASK, MSG_OP_FLAG_SHIFT, MSG_GEN_FLAG_MASK.
WC-bug-id: https://jira.whamcloud.com/browse/LU-6349
Lustre-commit: e8bdd1a48dd8 ("LU-6349 idl: clean up and document ptlrpc structures")
Reviewed-on: https://review.whamcloud.com/17830
--- fs/lustre/include/lustre_req_layout.h | 4 +- fs/lustre/include/obd_class.h | 2 +- fs/lustre/mdc/mdc_lib.c | 6 +- fs/lustre/mdc/mdc_request.c | 2 +- fs/lustre/mgc/mgc_request.c | 2 +- fs/lustre/ptlrpc/layout.c | 18 ++-- fs/lustre/ptlrpc/pack_generic.c | 60 +++++------ fs/lustre/ptlrpc/wiretest.c | 6 -- include/uapi/linux/lustre/lustre_idl.h | 176 ++++++++++++++++---------------- include/uapi/linux/lustre/lustre_user.h | 27 ++--- 10 files changed, 149 insertions(+), 154 deletions(-)
fs/lustre/include/lustre_req_layout.h +2 -2
@@ -143,7 +143,7 @@ void req_capsule_shrink(struct req_capsule *pill,*/ extern struct req_format RQF_MDS_GETATTR_NAME ;extern struct req_format RQF_MDS_CLOSE ; -extern struct req_format RQF_MDS_INTENT_CLOSE ; +extern struct req_format RQF_MDS_CLOSE_INTENT ;extern struct req_format RQF_MDS_CONNECT ;extern struct req_format RQF_MDS_DISCONNECT ;extern struct req_format RQF_MDS_GET_INFO ;
@@ -210,7 +210,7 @@ void req_capsule_shrink(struct req_capsule *pill,extern struct req_format RQF_LDLM_CP_CALLBACK ;extern struct req_format RQF_LDLM_BL_CALLBACK ;extern struct req_format RQF_LDLM_GL_CALLBACK ; -extern struct req_format RQF_LDLM_GL_DESC_CALLBACK ; +extern struct req_format RQF_LDLM_GL_CALLBACK_DESC ;/* LOG req_format */ extern struct req_format RQF_LOG_CANCEL ;extern struct req_format RQF_LLOG_ORIGIN_HANDLE_CREATE ;
fs/lustre/include/obd_class.h +1 -1
@@ -183,7 +183,7 @@ int class_config_parse_llog(const struct lu_env *env, struct llog_ctxt *ctxt,struct config_llog_data {struct ldlm_res_id cld_resid;struct config_llog_instance cld_cfg; -struct list_head cld_list_chain; +struct list_head cld_list_chain;/* on config_llog_list */ atomic_t cld_refcount;struct config_llog_data *cld_sptlrpc;/* depended sptlrpc log */ struct config_llog_data *cld_params;/* common parameters log */
fs/lustre/mdc/mdc_lib.c +3 -3
@@ -428,7 +428,7 @@ void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data)mdc_pack_name (req, &RMF_NAME , op_data->op_name, op_data->op_namelen); } -static void mdc_intent_close_pack (struct ptlrpc_request *req, +static void mdc_close_intent_pack (struct ptlrpc_request *req,struct md_op_data *op_data) {enum mds_op_bias bias = op_data->op_bias;
@@ -501,7 +501,7 @@ void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data, op_data->op_bias & MDS_RENAME_MIGRATE) {struct mdt_ioepoch *epoch; -mdc_intent_close_pack (req, op_data); +mdc_close_intent_pack (req, op_data); epoch =req_capsule_client_get (&req->rq_pill, &RMF_MDT_EPOCH );mdc_ioepoch_pack (epoch, op_data); }
@@ -553,5 +553,5 @@ void mdc_close_pack(struct ptlrpc_request *req, struct md_op_data *op_data) rec->sa_valid &= ~MDS_ATTR_ATIME ;mdc_ioepoch_pack (epoch, op_data); -mdc_intent_close_pack (req, op_data); +mdc_close_intent_pack (req, op_data); }
fs/lustre/mdc/mdc_request.c +1 -1
@@ -771,7 +771,7 @@ static int mdc_close(struct obd_export *exp, struct md_op_data *op_data, op_data->op_bias);if (op_data->op_bias &MDS_CLOSE_INTENT ) { - req_fmt = &RQF_MDS_INTENT_CLOSE ; + req_fmt = &RQF_MDS_CLOSE_INTENT ;if (op_data->op_bias &MDS_HSM_RELEASE ) {/* allocate a FID for volatile file */ rc = mdc_fid_alloc(NULL, exp, &op_data->op_fid2,
fs/lustre/mgc/mgc_request.c +1 -1
@@ -116,7 +116,7 @@ static int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id,/********************** config llog list **********************/ static LIST_HEAD (config_llog_list); -static DEFINE_SPINLOCK (config_list_lock); +static DEFINE_SPINLOCK (config_list_lock);/* protects config_llog_list */ /* Take a reference to a config log */ static int config_log_get (struct config_llog_data *cld)
fs/lustre/ptlrpc/layout.c +9 -9
@@ -116,7 +116,7 @@ &RMF_CAPA1 }; -static const struct req_msg_field *mdt_intent_close_client[] = { +static const struct req_msg_field *mdt_close_intent_client[] = { &RMF_PTLRPC_BODY , &RMF_MDT_EPOCH , &RMF_REC_REINT ,
@@ -705,7 +705,7 @@ &RQF_MDS_GETXATTR , &RQF_MDS_SYNC , &RQF_MDS_CLOSE , - &RQF_MDS_INTENT_CLOSE , + &RQF_MDS_CLOSE_INTENT , &RQF_MDS_READPAGE , &RQF_MDS_WRITEPAGE , &RQF_MDS_REINT,
@@ -757,7 +757,7 @@ &RQF_LDLM_CP_CALLBACK , &RQF_LDLM_BL_CALLBACK , &RQF_LDLM_GL_CALLBACK , - &RQF_LDLM_GL_DESC_CALLBACK , + &RQF_LDLM_GL_CALLBACK_DESC , &RQF_LDLM_INTENT , &RQF_LDLM_INTENT_BASIC , &RQF_LDLM_INTENT_LAYOUT,
@@ -1405,10 +1405,10 @@ struct req_format RQF_LDLM_GL_CALLBACK = ldlm_gl_callback_server);EXPORT_SYMBOL (RQF_LDLM_GL_CALLBACK ); -struct req_format RQF_LDLM_GL_DESC_CALLBACK = +struct req_format RQF_LDLM_GL_CALLBACK_DESC =DEFINE_REQ_FMT0 ("LDLM_GL_CALLBACK" , ldlm_gl_callback_desc_client, ldlm_gl_callback_server); -EXPORT_SYMBOL (RQF_LDLM_GL_DESC_CALLBACK ); +EXPORT_SYMBOL (RQF_LDLM_GL_CALLBACK_DESC );struct req_format RQF_LDLM_INTENT_BASIC = DEFINE_REQ_FMT0("LDLM_INTENT_BASIC",
@@ -1421,7 +1421,7 @@ struct req_format RQF_LDLM_INTENT =EXPORT_SYMBOL (RQF_LDLM_INTENT );struct req_format RQF_LDLM_INTENT_LAYOUT = -DEFINE_REQ_FMT0 ("LDLM_INTENT_LAYOUT " , +DEFINE_REQ_FMT0 ("LDLM_INTENT_LAYOUT" , ldlm_intent_layout_client, ldlm_enqueue_lvb_server);EXPORT_SYMBOL (RQF_LDLM_INTENT_LAYOUT );
@@ -1456,10 +1456,10 @@ struct req_format RQF_MDS_CLOSE = mdt_close_client, mds_last_unlink_server);EXPORT_SYMBOL (RQF_MDS_CLOSE ); -struct req_format RQF_MDS_INTENT_CLOSE = +struct req_format RQF_MDS_CLOSE_INTENT =DEFINE_REQ_FMT0 ("MDS_CLOSE" , - mdt_intent_close_client, mds_last_unlink_server); -EXPORT_SYMBOL (RQF_MDS_INTENT_CLOSE ); + mdt_close_intent_client, mds_last_unlink_server); +EXPORT_SYMBOL (RQF_MDS_CLOSE_INTENT );struct req_format RQF_MDS_READPAGE = DEFINE_REQ_FMT0("MDS_READPAGE",
fs/lustre/ptlrpc/pack_generic.c +31 -29
84 lines not on this page · raw message
fs/lustre/ptlrpc/wiretest.c +0 -6
@@ -827,12 +827,6 @@ void lustre_assert_wire_constants(void) (long long)MSGHDR_AT_SUPPORT);LASSERTF (MSGHDR_CKSUM_INCOMPAT18 ==2 ,"found %lld\n" , (long long )MSGHDR_CKSUM_INCOMPAT18 ); -LASSERTF (MSG_OP_FLAG_MASK ==0xffff0000UL ,"found 0x%.8xUL\n" , - (unsigned int )MSG_OP_FLAG_MASK ); -LASSERTF (MSG_OP_FLAG_SHIFT ==16 ,"found %lld\n" , - (long long )MSG_OP_FLAG_SHIFT ); -LASSERTF (MSG_GEN_FLAG_MASK ==0x0000ffffUL ,"found 0x%.8xUL\n" , - (unsigned int )MSG_GEN_FLAG_MASK );LASSERTF (MSG_LAST_REPLAY ==0x00000001UL ,"found 0x%.8xUL\n" , (unsigned int )MSG_LAST_REPLAY ); LASSERTF(MSG_RESENT == 0x00000002UL, "found 0x%.8xUL\n",
include/uapi/linux/lustre/lustre_idl.h +87 -89
226 lines not on this page · raw message
include/uapi/linux/lustre/lustre_user.h +14 -13
@@ -107,21 +107,22 @@ enum obd_statfs_state { };struct obd_statfs { -__u64 os_type; -__u64 os_blocks; -__u64 os_bfree; -__u64 os_bavail; -__u64 os_files; -__u64 os_ffree; -__u8 os_fsid[40 ]; -__u32 os_bsize; -__u32 os_namelen; -__u64 os_maxbytes; +__u64 os_type;/* EXT4_SUPER_MAGIC, UBERBLOCK_MAGIC */ +__u64 os_blocks;/* total size in #os_bsize blocks */ +__u64 os_bfree;/* number of unused blocks */ +__u64 os_bavail;/* blocks available for allocation */ +__u64 os_files;/* total number of objects */ +__u64 os_ffree;/* # objects that could be created */ +__u8 os_fsid[40 ];/* identifier for filesystem */ +__u32 os_bsize;/* block size in bytes for os_blocks */ +__u32 os_namelen;/* maximum length of filename in bytes*/ +__u64 os_maxbytes;/* maximum object size in bytes */ __u32 os_state;/**< obd_statfs_state OS_STATE_* flag */ __u32 os_fprecreated;/* objs available now to the caller -* used in QoS code to find preferred OSTs */ -__u32 os_spare2; -__u32 os_spare3; +* used in QoS code to find preferred OSTs +*/ +__u32 os_spare2;/* Unused padding fields. Remember */ +__u32 os_spare3;/* to fix lustre_swab_obd_statfs() */ __u32 os_spare4;__u32 os_spare5;__u32 os_spare6;
Signature · 1 line
1.8.3.1
PATCH 87/151 lustre: idl: remove obsolete RPC MSG flags
In reply to James SimmonsFrom: Andreas Dilger <[email protected]>
Add comments for MSG_* flags, and delete obsolete flags MSG_LAST_REPLAY, MSG_AT_SUPPORT, MSG_DELAY_REPLAY, MSG_VERSION_REPLAY.
Remove now-unused imp_no_lock_replay field.
Add comments for MSG_CONNECT_* flags, and delete obsolete flag MSG_CONNECT_ASYNC.
Delete them from wirecheck file.
WC-bug-id: https://jira.whamcloud.com/browse/LU-6349
Lustre-commit: 455ce0cef704 ("LU-6349 idl: remove obsolete RPC MSG flags")
Reviewed-on: https://review.whamcloud.com/17831
--- fs/lustre/include/lustre_import.h | 3 --- fs/lustre/ptlrpc/client.c | 4 ---- fs/lustre/ptlrpc/wiretest.c | 8 ------- include/uapi/linux/lustre/lustre_idl.h | 38 +++++++++++++++++----------------- 4 files changed, 19 insertions(+), 34 deletions(-)
fs/lustre/include/lustre_import.h +0 -3
@@ -277,9 +277,6 @@ struct obd_import { imp_server_timeout:1, /* VBR: imp in delayed recovery */ imp_delayed_recovery:1, - /* VBR: if gap was found then no lock replays - */ - imp_no_lock_replay:1, /* recovery by versions was failed */ imp_vbr_failed:1,/* force an immediate ping */
fs/lustre/ptlrpc/client.c +0 -4
@@ -2857,7 +2857,6 @@ static int ptlrpc_replay_interpret(const struct lu_env *env,DEBUG_REQ (D_WARNING , req,"Version mismatch during replay\n" );spin_lock (&imp->imp_lock); imp->imp_vbr_failed =1 ; - imp->imp_no_lock_replay =1 ;spin_unlock (&imp->imp_lock);lustre_msg_set_status (req->rq_repmsg, aa->praa_old_status); }else {
@@ -2871,9 +2870,6 @@ static int ptlrpc_replay_interpret(const struct lu_env *env, }spin_lock (&imp->imp_lock); -/** if replays by version then gap occur on server, no trust to locks */ -if (lustre_msg_get_flags (req->rq_repmsg) &MSG_VERSION_REPLAY ) - imp->imp_no_lock_replay =1 ; imp->imp_last_replay_transno =lustre_msg_get_transno (req->rq_reqmsg);spin_unlock (&imp->imp_lock);LASSERT (imp->imp_last_replay_transno);
fs/lustre/ptlrpc/wiretest.c +0 -8
@@ -827,16 +827,10 @@ void lustre_assert_wire_constants(void) (long long)MSGHDR_AT_SUPPORT);LASSERTF (MSGHDR_CKSUM_INCOMPAT18 ==2 ,"found %lld\n" , (long long )MSGHDR_CKSUM_INCOMPAT18 ); -LASSERTF (MSG_LAST_REPLAY ==0x00000001UL ,"found 0x%.8xUL\n" , - (unsigned int )MSG_LAST_REPLAY );LASSERTF (MSG_RESENT ==0x00000002UL ,"found 0x%.8xUL\n" , (unsigned int )MSG_RESENT );LASSERTF (MSG_REPLAY ==0x00000004UL ,"found 0x%.8xUL\n" , (unsigned int )MSG_REPLAY ); -LASSERTF (MSG_DELAY_REPLAY ==0x00000010UL ,"found 0x%.8xUL\n" , - (unsigned int )MSG_DELAY_REPLAY ); -LASSERTF (MSG_VERSION_REPLAY ==0x00000020UL ,"found 0x%.8xUL\n" , - (unsigned int )MSG_VERSION_REPLAY );LASSERTF (MSG_REQ_REPLAY_DONE ==0x00000040UL ,"found 0x%.8xUL\n" , (unsigned int )MSG_REQ_REPLAY_DONE ); LASSERTF(MSG_LOCK_REPLAY_DONE == 0x00000080UL, "found 0x%.8xUL\n",
@@ -851,8 +845,6 @@ void lustre_assert_wire_constants(void) (unsigned int)MSG_CONNECT_LIBCLIENT);LASSERTF (MSG_CONNECT_INITIAL ==0x00000020UL ,"found 0x%.8xUL\n" , (unsigned int )MSG_CONNECT_INITIAL ); -LASSERTF (MSG_CONNECT_ASYNC ==0x00000040UL ,"found 0x%.8xUL\n" , - (unsigned int )MSG_CONNECT_ASYNC );LASSERTF (MSG_CONNECT_NEXT_VER ==0x00000080UL ,"found 0x%.8xUL\n" , (unsigned int )MSG_CONNECT_NEXT_VER ); LASSERTF(MSG_CONNECT_TRANSNO == 0x00000100UL, "found 0x%.8xUL\n",
include/uapi/linux/lustre/lustre_idl.h +19 -19
@@ -579,26 +579,26 @@ struct lustre_msg_v2 {#define LUSTRE_LOG_VERSION 0x00050000#define LUSTRE_MGS_VERSION 0x00060000 -/* pb_flags that apply to all requests */ -#define MSG_LAST_REPLAY 0x0001 -#define MSG_RESENT 0x0002 -#define MSG_REPLAY 0x0004 -/* #define MSG_AT_SUPPORT 0x0008 obsolete 1.5 */ -#define MSG_DELAY_REPLAY 0x0010 -#define MSG_VERSION_REPLAY 0x0020 -#define MSG_REQ_REPLAY_DONE 0x0040 -#define MSG_LOCK_REPLAY_DONE 0x0080 - -/* pb_op_flags for all connect opcodes (MDS_CONNECT, OST_CONNECT) */ -#define MSG_CONNECT_RECOVERING 0x00000001 -#define MSG_CONNECT_RECONNECT 0x00000002 -#define MSG_CONNECT_REPLAYABLE 0x00000004 -/* #define MSG_CONNECT_PEER 0x00000008 removed 1.5 */ -#define MSG_CONNECT_LIBCLIENT 0x00000010 -#define MSG_CONNECT_INITIAL 0x00000020 -#define MSG_CONNECT_ASYNC 0x00000040 +/* pb_flags that apply to all request messages */ +/* #define MSG_LAST_REPLAY 0x0001 obsolete 2.0 => {REQ,LOCK}_REPLAY_DONE */ +#define MSG_RESENT 0x0002/* was previously sent, no reply seen */ +#define MSG_REPLAY 0x0004/* was processed, got reply, recovery */ +/* #define MSG_AT_SUPPORT 0x0008 obsolete since 1.5, AT always enabled */ +/* #define MSG_DELAY_REPLAY 0x0010 obsolete since 2.0 */ +/* #define MSG_VERSION_REPLAY 0x0020 obsolete since 1.8.2, VBR always on */ +#define MSG_REQ_REPLAY_DONE 0x0040/* request replay over, locks next */ +#define MSG_LOCK_REPLAY_DONE 0x0080/* lock replay over, client done */ + +/* pb_op_flags for connect opcodes: MDS_CONNECT, OST_CONNECT, MGS_CONNECT */ +#define MSG_CONNECT_RECOVERING 0x00000001/* target is in recovery */ +#define MSG_CONNECT_RECONNECT 0x00000002/* tgt already has client import */ +#define MSG_CONNECT_REPLAYABLE 0x00000004/* target supports RPC replay */ +/* #define MSG_CONNECT_PEER 0x00000008 obsolete since 1.2, removed in 1.5 */ +#define MSG_CONNECT_LIBCLIENT 0x00000010/* obsolete since 2.3, removed 2.6 */ +#define MSG_CONNECT_INITIAL 0x00000020/* first client connection attempt */ +/* #define MSG_CONNECT_ASYNC 0x00000040 obsolete since 1.5 */ #define MSG_CONNECT_NEXT_VER 0x00000080/* use next version of lustre_msg */ -#define MSG_CONNECT_TRANSNO 0x00000100/* report transno */ +#define MSG_CONNECT_TRANSNO 0x00000100/* client sent transno in replay */ /* number of previous object versions in pb_pre_versions[] */ #define PTLRPC_NUM_VERSIONS 4
Signature · 1 line
1.8.3.1
PATCH 88/151 lnet: libcfs: call proper crypto algo when keys are passed in
In reply to James SimmonsIn most cases keys are not passed to cfs_crypto_hash_alloc() but if they are then crypto_ahash_setkey() will fail. Keys are only handled by the hmac version of the algorithm requested. If a key is passed into cfs_crypto_hash_alloc() then we should request the hmac version of the algorithm when calling crypto_alloc_ahash().
WC-bug-id: https://jira.whamcloud.com/browse/LU-8602
Lustre-commit: 53e967746f37 ("LU-8602 libcfs: call proper crypto algo when keys are passed in")
Reviewed-on: https://review.whamcloud.com/25199
--- net/lnet/libcfs/linux-crypto.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-)
net/lnet/libcfs/linux-crypto.c +21 -10
@@ -70,14 +70,27 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg,int err =0 ; *type =cfs_crypto_hash_type (hash_alg); -if (!*type) {CWARN ("Unsupported hash algorithm id = %d, max id is %d\n" , hash_alg,CFS_HASH_ALG_MAX );return -EINVAL ; } - tfm =crypto_alloc_ahash ((*type)->cht_name,0 ,CRYPTO_ALG_ASYNC ); +/* Keys are only supported for the hmac version */ +if (key && key_len >0 ) { +char *algo_name; + + algo_name =kasprintf (GFP_KERNEL ,"hmac(%s)" , + (*type)->cht_name); +if (!algo_name) +return -ENOMEM ; + + tfm =crypto_alloc_ahash (algo_name,0 ,CRYPTO_ALG_ASYNC ); +kfree (algo_name); + }else { + tfm =crypto_alloc_ahash ((*type)->cht_name,0 , +CRYPTO_ALG_ASYNC ); + }if (IS_ERR (tfm)) {CDEBUG (D_INFO ,"Failed to alloc crypto hash %s\n" , (*type)->cht_name);
@@ -88,8 +101,8 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg,if (!*req) {CDEBUG (D_INFO ,"Failed to alloc ahash_request for %s\n" , (*type)->cht_name); -crypto_free_ahash (tfm); -return -ENOMEM ; + err = -ENOMEM ; + goto out_free_tfm; }ahash_request_set_callback (*req,0 ,NULL ,NULL );
@@ -100,12 +113,8 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg, err =crypto_ahash_setkey (tfm, (unsigned char *)&((*type)->cht_key), (*type)->cht_size); - -if (err) { -ahash_request_free (*req); -crypto_free_ahash (tfm); -return err; - } +if (err) + goto out_free_req; CDEBUG(D_INFO, "Using crypto hash: %s (%s) speed %d MB/s\n", crypto_ahash_alg_name(tfm), crypto_ahash_driver_name(tfm),
@@ -113,7 +122,9 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg, err =crypto_ahash_init (*req);if (err) { +out_free_req:ahash_request_free (*req); +out_free_tfm:crypto_free_ahash (tfm); }return err;
Signature · 1 line
1.8.3.1
PATCH 89/151 lustre: clio: remove unused cl_lock layers
In reply to James SimmonsFrom: "John L. Hammond" <[email protected]>
Remove the struct vvp_lock and struct lovsub_lock, omitting these layers from cl_lock. Adjust cl_lock_enqueue() to allow for empty locks (corresponding to unstriped files).
WC-bug-id: https://jira.whamcloud.com/browse/LU-10257
Lustre-commit: f168371f40e1 (LU-10257 clio: remove unused cl_lock layers")
Reviewed-on: https://review.whamcloud.com/30192
--- fs/lustre/include/cl_object.h | 14 +++---- fs/lustre/llite/Makefile | 2 +- fs/lustre/llite/vvp_dev.c | 6 --- fs/lustre/llite/vvp_internal.h | 12 ------ fs/lustre/llite/vvp_lock.c | 87 ----------------------------------------- fs/lustre/llite/vvp_object.c | 1 - fs/lustre/lov/Makefile | 2 +- fs/lustre/lov/lov_cl_internal.h | 27 ------------- fs/lustre/lov/lov_dev.c | 6 --- fs/lustre/lov/lovsub_lock.c | 81 -------------------------------------- fs/lustre/lov/lovsub_object.c | 4 +- fs/lustre/obdclass/cl_lock.c | 7 +++- 12 files changed, 13 insertions(+), 236 deletions(-) delete mode 100644 fs/lustre/llite/vvp_lock.c delete mode 100644 fs/lustre/lov/lovsub_lock.c
fs/lustre/include/cl_object.h +5 -9
@@ -1058,15 +1058,13 @@ static inline bool __page_in_use(const struct cl_page *page, int refc)* (struct cl_lock) and a list of layers (struct cl_lock_slice), linked to * cl_lock::cll_layers list through cl_lock_slice::cls_linkage. * -* Typical cl_lock consists of the two layers: +* Typical cl_lock consists of one layer: * -* - vvp_lock (vvp specific data), and * - lov_lock (lov specific data). * * lov_lock contains an array of sub-locks. Each of these sub-locks is a * normal cl_lock: it has a header (struct cl_lock) and a list of layers: * -* - lovsub_lock, and * - osc_lock * * Each sub-lock is associated with a cl_object (representing stripe
@@ -1183,7 +1181,7 @@ struct cl_lock {/** * Per-layer part of cl_lock * -* \see vvp_lock, lov_lock, lovsub_lock, osc_lock +* \see lov_lock, osc_lock */ struct cl_lock_slice {struct cl_lock *cls_lock;
@@ -1198,7 +1196,7 @@ struct cl_lock_slice {/** * -* \see vvp_lock_ops, lov_lock_ops, lovsub_lock_ops, osc_lock_ops +* \see lov_lock_ops, osc_lock_ops */ struct cl_lock_operations {/** @{ */
@@ -1210,8 +1208,7 @@ struct cl_lock_operations {* wait on @anchor for resources * -ve for failure * -* \see vvp_lock_enqueue(), lov_lock_enqueue(), lovsub_lock_enqueue(), -* \see osc_lock_enqueue() +* \see lov_lock_enqueue(), osc_lock_enqueue() */ int (*clo_enqueue)(const struct lu_env *env, const struct cl_lock_slice *slice,
@@ -1226,8 +1223,7 @@ struct cl_lock_operations {/** * Destructor. Frees resources and the slice. * -* \see vvp_lock_fini(), lov_lock_fini(), lovsub_lock_fini(), -* \see osc_lock_fini() +* \see lov_lock_fini(), osc_lock_fini() */ void (*clo_fini)(const struct lu_env *env,struct cl_lock_slice *slice);/**
fs/lustre/llite/Makefile +1 -1
@@ -6,7 +6,7 @@ lustre-y := dcache.o dir.o file.o llite_lib.o llite_nfs.o \ rw.o rw26.o namei.o symlink.o llite_mmap.o range_lock.o \ xattr.o xattr_cache.o xattr_security.o \ super25.o statahead.o glimpse.o lcommon_cl.o lcommon_misc.o \ - vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o \ + vvp_dev.o vvp_page.o vvp_io.o vvp_object.o \ lproc_llite.o lustre-$(CONFIG_FS_POSIX_ACL) += acl.o
fs/lustre/llite/vvp_dev.c +0 -6
@@ -55,7 +55,6 @@*/ static struct kmem_cache *ll_thread_kmem; -struct kmem_cache *vvp_lock_kmem;struct kmem_cache *vvp_object_kmem;static struct kmem_cache *vvp_session_kmem;static struct kmem_cache *vvp_thread_kmem;
@@ -67,11 +66,6 @@ .ckd_size = sizeof(struct ll_thread_info), }, { - .ckd_cache = &vvp_lock_kmem, - .ckd_name = "vvp_lock_kmem", - .ckd_size = sizeof(struct vvp_lock), - }, - { .ckd_cache = &vvp_object_kmem, .ckd_name = "vvp_object_kmem", .ckd_size = sizeof(struct vvp_object),
fs/lustre/llite/vvp_internal.h +0 -12
@@ -119,7 +119,6 @@ struct vvp_io {extern struct lu_context_key vvp_session_key;extern struct lu_context_key vvp_thread_key; -extern struct kmem_cache *vvp_lock_kmem;extern struct kmem_cache *vvp_object_kmem;struct vvp_thread_info {
@@ -247,10 +246,6 @@ struct vvp_device {struct cl_device *vdv_next; }; -struct vvp_lock { -struct cl_lock_slice vlk_cl; -}; -void *ccc_key_init (const struct lu_context *ctx,struct lu_context_key *key); void ccc_key_fini(const struct lu_context *ctx,
@@ -296,19 +291,12 @@ static inline struct page *cl2vm_page(const struct cl_page_slice *slice)return cl2vvp_page (slice)->vpg_page; } -static inline struct vvp_lock *cl2vvp_lock (const struct cl_lock_slice *slice) -{ - return container_of(slice, struct vvp_lock, vlk_cl); -} -# define CLOBINVRNT (env, clob, expr) \ ((void)sizeof(env), (void)sizeof(clob), (void)sizeof(!!(expr)))int vvp_io_init (const struct lu_env *env,struct cl_object *obj,struct cl_io *io);int vvp_io_write_commit (const struct lu_env *env,struct cl_io *io); -int vvp_lock_init (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io);int vvp_page_init (const struct lu_env *env,struct cl_object *obj,struct cl_page *page,pgoff_t index); struct lu_object *vvp_object_alloc(const struct lu_env *env,
fs/lustre/llite/vvp_lock.c deleted +0 -87
87 lines not on this page · raw message
fs/lustre/llite/vvp_object.c +0 -1
@@ -217,7 +217,6 @@ static void vvp_req_attr_set(const struct lu_env *env, struct cl_object *obj,static const struct cl_object_operations vvp_ops = { .coo_page_init = vvp_page_init, - .coo_lock_init = vvp_lock_init, .coo_io_init = vvp_io_init, .coo_attr_get = vvp_attr_get, .coo_attr_update = vvp_attr_update,
fs/lustre/lov/Makefile +1 -1
@@ -5,4 +5,4 @@ obj-$(CONFIG_LUSTRE_FS) += lov.o lov-y := lov_obd.o lov_pack.o lov_offset.o lov_merge.o \ lov_request.o lov_ea.o lov_dev.o lov_object.o lov_page.o \ lov_lock.o lov_io.o lovsub_dev.o lovsub_object.o lovsub_page.o \ - lovsub_lock.o lov_pool.o lproc_lov.o + lov_pool.o lproc_lov.o
fs/lustre/lov/lov_cl_internal.h +0 -27
@@ -81,7 +81,6 @@struct lovsub_device ;struct lovsub_object ; -struct lovsub_lock ;enum lov_device_flags {LOV_DEV_INITIALIZED =1 <<0
@@ -460,13 +459,6 @@ struct lovsub_object { };/** -* Lock state@lovsub layer. -*/ -struct lovsub_lock { -struct cl_lock_slice lss_cl; -}; - -/** * Describe the environment settings for sublocks. */ struct lov_sublock_env {
@@ -607,7 +599,6 @@ struct lov_session {extern struct kmem_cache *lov_thread_kmem;extern struct kmem_cache *lov_session_kmem; -extern struct kmem_cache *lovsub_lock_kmem;extern struct kmem_cache *lovsub_object_kmem; int lov_object_init(const struct lu_env *env, struct lu_object *obj,
@@ -618,8 +609,6 @@ int lov_lock_init(const struct lu_env *env, struct cl_object *obj, struct cl_lock *lock, const struct cl_io *io);int lov_io_init (const struct lu_env *env,struct cl_object *obj,struct cl_io *io); -int lovsub_lock_init (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io);int lov_lock_init_composite (const struct lu_env *env,struct cl_object *obj,struct cl_lock *lock,const struct cl_io *io);
@@ -781,22 +770,6 @@ static inline struct lovsub_object *lu2lovsub(const struct lu_object *obj) return container_of(obj, struct lovsub_object, lso_cl.co_lu); } -static inline struct lovsub_lock * -cl2lovsub_lock (const struct cl_lock_slice *slice) -{ -LINVRNT (lovsub_is_object (&slice->cls_obj->co_lu)); - return container_of(slice, struct lovsub_lock, lss_cl); -} - -static inline struct lovsub_lock *cl2sub_lock (const struct cl_lock *lock) -{ -const struct cl_lock_slice *slice; - - slice =cl_lock_at (lock, &lovsub_device_type); -LASSERT (slice); -return cl2lovsub_lock (slice); -} -static inline struct lov_lock *cl2lov_lock (const struct cl_lock_slice *slice) {LINVRNT (lov_is_object (&slice->cls_obj->co_lu));
fs/lustre/lov/lov_dev.c +0 -6
@@ -48,7 +48,6 @@struct kmem_cache *lov_thread_kmem;struct kmem_cache *lov_session_kmem; -struct kmem_cache *lovsub_lock_kmem;struct kmem_cache *lovsub_object_kmem;struct lu_kmem_descr lov_caches[] = {
@@ -73,11 +72,6 @@ struct lu_kmem_descr lov_caches[] = { .ckd_size = sizeof(struct lov_session) }, { - .ckd_cache = &lovsub_lock_kmem, - .ckd_name = "lovsub_lock_kmem", - .ckd_size =sizeof (struct lovsub_lock ) - }, - { .ckd_cache = &lovsub_object_kmem, .ckd_name ="lovsub_object_kmem" , .ckd_size = sizeof(struct lovsub_object)
fs/lustre/lov/lovsub_lock.c deleted +0 -81
81 lines not on this page · raw message
fs/lustre/lov/lovsub_object.c +1 -3
@@ -61,7 +61,7 @@ int lovsub_object_init(const struct lu_env *env, struct lu_object *obj, below = under->ld_ops->ldo_object_alloc (env, obj->lo_header, under);if (below) {lu_object_add (obj, below); -cl_object_page_init (lu2cl (obj),sizeof (struct lovsub_page )); +cl_object_page_init (lu2cl (obj),0 ); result =0 ; }else { result = -ENOMEM ;
@@ -145,8 +145,6 @@ static void lovsub_req_attr_set(const struct lu_env *env, struct cl_object *obj, }static const struct cl_object_operations lovsub_ops = { - .coo_page_init = lovsub_page_init, - .coo_lock_init = lovsub_lock_init, .coo_attr_update = lovsub_attr_update, .coo_glimpse = lovsub_object_glimpse, .coo_req_attr_set = lovsub_req_attr_set
fs/lustre/obdclass/cl_lock.c +5 -2
@@ -105,7 +105,10 @@ int cl_lock_init(const struct lu_env *env, struct cl_lock *lock,INIT_LIST_HEAD (&lock->cll_layers);cl_object_for_each (scan, obj) { - result = scan->co_ops->coo_lock_init (env, scan, lock, io); +if (scan->co_ops->coo_lock_init) + result = scan->co_ops->coo_lock_init (env, scan, lock, + io); +if (result !=0 ) {cl_lock_fini (env, lock);break ;
@@ -159,7 +162,7 @@ int cl_lock_enqueue(const struct lu_env *env, struct cl_io *io, struct cl_lock *lock, struct cl_sync_io *anchor) { const struct cl_lock_slice *slice; -int rc = -EBUSY ; +int rc =0 ;list_for_each_entry (slice, &lock->cll_layers, cls_linkage) {if (!slice->cls_ops->clo_enqueue)
Signature · 1 line
1.8.3.1
PATCH 90/151 lustre: sec: migrate to 64 bit time
In reply to James SimmonsReplace cfs_time_current_sec() to avoid the overflow issues in 2038 with ktime_get_real_seconds(). Mirgate the rest of the gss code to time64_t to avoid the 2038 overflow issue.
Currently in encrypt_page_pools we are reporting the jiffy cycles for "max wait time" which not only doesn't make sense but can vary from platform to platform. Instead we will report in terms of milliseconds. That requires changing epp_st_max_wait into ktime_t since we need better than seconds precision. Lastly the time in encrypt_page_pools for "last access" and "last shrink" was showing up negative. This was due to epp_last_* field being set to the number of seconds since the epoch instead of the number of seconds since the node booted. Change epp_last_* to being set by ktime_get_seconds() instead of ktime_get_real_seconds() resolves this problem.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9019
Lustre-commit: cc759278f18f (LU-9019 sec: migrate to 64 bit time")
Reviewed-on: https://review.whamcloud.com/29859
--- fs/lustre/include/lustre_sec.h | 2 +- fs/lustre/ptlrpc/sec_bulk.c | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-)
fs/lustre/include/lustre_sec.h +1 -1
@@ -484,7 +484,7 @@ struct ptlrpc_cli_ctx {atomic_t cc_refcount;struct ptlrpc_sec *cc_sec;struct ptlrpc_ctx_ops *cc_ops; -unsigned long cc_expire;/* in seconds */ +time64_t cc_expire;/* in seconds */ unsigned int cc_early_expire:1;unsigned long cc_flags;struct vfs_cred cc_vcred;
fs/lustre/ptlrpc/sec_bulk.c +10 -12
@@ -108,7 +108,7 @@unsigned long epp_st_missings;/* # of cache missing */ unsigned long epp_st_lowfree;/* lowest free pages reached */ unsigned int epp_st_max_wqlen;/* highest waitqueue length */ -unsigned long epp_st_max_wait;/* in jiffies */ +ktime_t epp_st_max_wait;/* in nanoseconds */ unsigned long epp_st_outofmem;/* # of out of mem requests */ /* * pointers to pools
@@ -131,8 +131,8 @@ int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v)"total pages: %lu\n" "total free: %lu\n" "idle index: %lu/100\n" -"last shrink: %lds\n" -"last access: %lds\n" +"last shrink: %llds\n" +"last access: %llds\n" "max pages reached: %lu\n" "grows: %u\n" "grows failure: %u\n"
@@ -141,7 +141,7 @@ int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v)"cache missing: %lu\n" "low free mark: %lu\n" "max waitqueue depth: %u\n" -"max wait time: %ld/%lu\n" +"max wait time ms: %lld\n" "out of mem: %lu\n" ,totalram_pages (), PAGES_PER_POOL,
@@ -150,8 +150,8 @@ int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v) page_pools.epp_total_pages, page_pools.epp_free_pages, page_pools.epp_idle_idx, - (long )(ktime_get_seconds () - page_pools.epp_last_shrink), - (long )(ktime_get_seconds () - page_pools.epp_last_access), +ktime_get_seconds () - page_pools.epp_last_shrink, +ktime_get_seconds () - page_pools.epp_last_access, page_pools.epp_st_max_pages, page_pools.epp_st_grows, page_pools.epp_st_grow_fails,
@@ -160,8 +160,7 @@ int sptlrpc_proc_enc_pool_seq_show(struct seq_file *m, void *v) page_pools.epp_st_missings, page_pools.epp_st_lowfree, page_pools.epp_st_max_wqlen, - page_pools.epp_st_max_wait, -msecs_to_jiffies (MSEC_PER_SEC ), +ktime_to_ms (page_pools.epp_st_max_wait), page_pools.epp_st_outofmem);spin_unlock (&page_pools.epp_lock);
@@ -432,7 +431,7 @@ int sptlrpc_enc_pool_init(void) page_pools.epp_st_missings =0 ; page_pools.epp_st_lowfree =0 ; page_pools.epp_st_max_wqlen =0 ; - page_pools.epp_st_max_wait =0 ; + page_pools.epp_st_max_wait =ktime_set (0 ,0 ); page_pools.epp_st_outofmem =0 ;enc_pools_alloc ();
@@ -463,13 +462,12 @@ void sptlrpc_enc_pool_fini(void)if (page_pools.epp_st_access >0 ) {CDEBUG (D_SEC , -"max pages %lu, grows %u, grow fails %u, shrinks %u, access %lu, missing %lu, max qlen %u, max wait %ld/%ld, out of mem %lu\n" , +"max pages %lu, grows %u, grow fails %u, shrinks %u, access %lu, missing %lu, max qlen %u, max wait ms %lld, out of mem %lu\n" , page_pools.epp_st_max_pages, page_pools.epp_st_grows, page_pools.epp_st_grow_fails, page_pools.epp_st_shrinks, page_pools.epp_st_access, page_pools.epp_st_missings, page_pools.epp_st_max_wqlen, - page_pools.epp_st_max_wait, -msecs_to_jiffies (MSEC_PER_SEC ), +ktime_to_ms (page_pools.epp_st_max_wait), page_pools.epp_st_outofmem); } }
Signature · 1 line
1.8.3.1
PATCH 91/151 lustre: llite: avoid live-lock when concurrent mmap()s
In reply to James SimmonsFrom: Bruno Faccini <[email protected]>
Patch is an attempt to delay page-fault retry from Client side for inode with extents being mmap()'ed, to prevent live-lock situation to occur with other page's competitors.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10149
Lustre-commit: cd793b4067b6 ("LU-10149 llite: avoid live-lock when concurrent mmap()s")
Reviewed-on: https://review.whamcloud.com/30465
--- fs/lustre/llite/llite_mmap.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
fs/lustre/llite/llite_mmap.c +13 -1
@@ -38,6 +38,7 @@#include <linux/errno.h> #include <linux/unistd.h> #include <linux/uaccess.h> +#include <linux/delay.h> #include <linux/fs.h> #include <linux/pagemap.h>
@@ -153,7 +154,7 @@ static int __ll_page_mkwrite(struct vm_area_struct *vma, struct page *vmpage,int result;u16 refcheck;sigset_t old, new; -struct inode *inode; +struct inode *inode =NULL ;struct ll_inode_info *lli; env =cl_env_get (&refcheck);
@@ -229,6 +230,17 @@ static int __ll_page_mkwrite(struct vm_area_struct *vma, struct page *vmpage,CDEBUG (D_MMAP ,"%s mkwrite with %d\n" , current->comm, result);LASSERT (ergo (result ==0 ,PageLocked (vmpage))); +/* if page has been unmapped, presumably due to lock reclaim for +* concurrent usage, add some delay before retrying to prevent +* entering live-lock situation with competitors +*/ +if (result == -ENODATA && inode) { +CDEBUG (D_MMAP , +"delaying new page-fault for inode %p to prevent live-lock\n" , + inode); +msleep (20 ); + } +return result; }
Signature · 1 line
1.8.3.1
PATCH 92/151 lustre: llite: change lli_glimpse_time to ktime
In reply to James SimmonsCurrently lli_glimpse_time is in jiffies which can vary between platforms. Migrate to ktime since we need more than second time resolution that is consistent on any platform. Replace the last cfs_time_current_sec() with ktime_get_real_seconds().
WC-bug-id: https://jira.whamcloud.com/browse/LU-9019
Lustre-commit: 9a484620bdd9 ("LU-9019 llite: change lli_glimpse_time to ktime")
Reviewed-on: https://review.whamcloud.com/30601
--- fs/lustre/llite/llite_internal.h | 4 ++-- fs/lustre/llite/llite_lib.c | 2 +- fs/lustre/llite/statahead.c | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-)
fs/lustre/llite/llite_internal.h +2 -2
@@ -194,7 +194,7 @@ struct ll_inode_info {struct range_lock_tree lli_write_tree;struct rw_semaphore lli_glimpse_sem; -unsigned long lli_glimpse_time; +ktime_t lli_glimpse_time;struct list_head lli_agl_list;u64 lli_agl_index;
@@ -1193,7 +1193,7 @@ static inline int ll_glimpse_size(struct inode *inode)down_read (&lli->lli_glimpse_sem); rc =cl_glimpse_size (inode); - lli->lli_glimpse_time = jiffies; + lli->lli_glimpse_time =ktime_get ();up_read (&lli->lli_glimpse_sem);return rc; }
fs/lustre/llite/llite_lib.c +1 -1
@@ -926,7 +926,7 @@ void ll_lli_init(struct ll_inode_info *lli)init_rwsem (&lli->lli_trunc_sem);range_lock_tree_init (&lli->lli_write_tree);init_rwsem (&lli->lli_glimpse_sem); - lli->lli_glimpse_time =0 ; + lli->lli_glimpse_time =ktime_set (0 ,0 );INIT_LIST_HEAD (&lli->lli_agl_list); lli->lli_agl_index =0 ; lli->lli_async_rc =0 ;
fs/lustre/llite/statahead.c +5 -4
@@ -494,10 +494,10 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai) {struct ll_inode_info *lli =ll_i2info (inode);u64 index = lli->lli_agl_index; +ktime_t expire;int rc;LASSERT (list_empty (&lli->lli_agl_list)); -/* AGL maybe fall behind statahead with one entry */ if (is_omitted_entry (sai, index +1 )) { lli->lli_agl_index =0 ;
@@ -539,8 +539,9 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)* relative rare. AGL can ignore such case, and it will not muchly * affect the performance. */ -if (lli->lli_glimpse_time !=0 && -time_before (jiffies -1 *HZ , lli->lli_glimpse_time)) { + expire =ktime_sub_ns (ktime_get (),NSEC_PER_SEC ); +if (ktime_to_ns (lli->lli_glimpse_time) && +ktime_before (expire, lli->lli_glimpse_time)) {up_write (&lli->lli_glimpse_sem); lli->lli_agl_index =0 ;iput (inode);
@@ -552,7 +553,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai)cl_agl (inode); lli->lli_agl_index =0 ; - lli->lli_glimpse_time = jiffies; + lli->lli_glimpse_time =ktime_get ();up_write (&lli->lli_glimpse_sem); CDEBUG(D_READA, "Handled (init) async glimpse: inode= "
Signature · 1 line
1.8.3.1
PATCH 93/151 lustre: hsm: filter kkuc write by client UUID
In reply to James SimmonsFrom: "John L. Hammond" <[email protected]>
Add a struct obd_uuid kr_uuid member to struct kkuc_reg to hold the UUID of the client (super block) that owns the kkuc pipe. Modify libcfs_kkuc_group_{put,rem,foreach}() to accept a UUID pointer which filters the kkuc pipes operated on. Modify mdc_hsm_copytool_send() to pass the UUID of the MDC device when calling libcfs_kkuc_group_put(). The effect of all this is that HALs received by a given MDC will only be delivered to copytools registered on the corresponding mount point.
Remove the cluuid member of struct lmv_obd since it is always the same as the obd_uuid member of the corresponding struct obd_device. Remove the kcd_uuid member of struct kkuc_ct_data as it is no longer needed.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10341
Lustre-commit: c73736545faf ("LU-10341 hsm: filter kkuc write by client UUID")
Reviewed-on: https://review.whamcloud.com/30419
--- fs/lustre/include/lustre_export.h | 1 - fs/lustre/include/lustre_kernelcomm.h | 12 +++++------ fs/lustre/include/obd.h | 1 - fs/lustre/lmv/lmv_obd.c | 38 +++++++++++++++++------------------ fs/lustre/mdc/mdc_request.c | 22 +++++++++----------- fs/lustre/obdclass/kernelcomm.c | 26 ++++++++++++++---------- 6 files changed, 50 insertions(+), 50 deletions(-)
fs/lustre/include/lustre_export.h +0 -1
@@ -267,7 +267,6 @@ static inline int exp_connect_lockahead(struct obd_export *exp)#define KKUC_CT_DATA_MAGIC 0x092013ceastruct kkuc_ct_data {u32 kcd_magic; -struct obd_uuid kcd_uuid;u32 kcd_archive; };
fs/lustre/include/lustre_kernelcomm.h +6 -6
@@ -46,11 +46,11 @@/* Kernel methods */ void libcfs_kkuc_init (void ); -int libcfs_kkuc_group_put (unsigned int group,void *payload); -int libcfs_kkuc_group_add (struct file *fp,int uid,unsigned int group, -void *data,size_t data_len); -int libcfs_kkuc_group_rem (int uid,unsigned int group); -int libcfs_kkuc_group_foreach (unsigned int group,libcfs_kkuc_cb_t cb_func, -void *cb_arg); +int libcfs_kkuc_group_put (const struct obd_uuid *uuid,int group,void *data); +int libcfs_kkuc_group_add (struct file *fp,const struct obd_uuid *uuid,int uid, +int group,void *data,size_t data_len); +int libcfs_kkuc_group_rem (const struct obd_uuid *uuid,int uid,int group); +int libcfs_kkuc_group_foreach (const struct obd_uuid *uuid,int group, +libcfs_kkuc_cb_t cb_func,void *cb_arg);#endif /* __LUSTRE_KERNELCOMM_H__ */
fs/lustre/include/obd.h +0 -1
@@ -430,7 +430,6 @@ struct lmv_obd {struct lu_client_fld lmv_fld;spinlock_t lmv_lock;struct lmv_desc desc; -struct obd_uuid cluuid;struct mutex lmv_init_mutex;int connected;
fs/lustre/lmv/lmv_obd.c +19 -19
@@ -206,7 +206,6 @@ static int lmv_connect(const struct lu_env *env, exp =class_conn2export (&conn); lmv->connected =0 ; - lmv->cluuid = *cluuid; lmv->conn_data = *data; lmv->lmv_tgts_kobj = kobject_create_and_add("target_obds",
@@ -276,8 +275,6 @@ static int lmv_init_ea_size(struct obd_export *exp, u32 easize, u32 def_easize)static int lmv_connect_mdc (struct obd_device *obd,struct lmv_tgt_desc *tgt) {struct lmv_obd *lmv = &obd->u.lmv; -struct obd_uuid *cluuid = &lmv->cluuid; -struct obd_uuid lmv_mdc_uuid = {"LMV_MDC_UUID" };struct obd_device *mdc_obd;struct obd_export *mdc_exp;struct lu_fld_target target;
@@ -290,16 +287,16 @@ static int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)return -EINVAL ; } -CDEBUG (D_CONFIG ,"connect to %s(%s) - %s, %s FOR %s\n" , +CDEBUG (D_CONFIG ,"connect to %s(%s) - %s, %s\n" , mdc_obd->obd_name, mdc_obd->obd_uuid.uuid, - tgt->ltd_uuid.uuid, obd->obd_uuid.uuid, cluuid->uuid); + tgt->ltd_uuid.uuid, obd->obd_uuid.uuid);if (!mdc_obd->obd_set_up) {CERROR ("target %s is not set up\n" , tgt->ltd_uuid.uuid);return -EINVAL ; } - rc =obd_connect (NULL , &mdc_exp, mdc_obd, &lmv_mdc_uuid, + rc =obd_connect (NULL , &mdc_exp, mdc_obd, &obd->obd_uuid, &lmv->conn_data,NULL );if (rc) {CERROR ("target %s connect error %d\n" , tgt->ltd_uuid.uuid, rc);
@@ -499,7 +496,7 @@ static int lmv_check_connect(struct obd_device *obd) }CDEBUG (D_CONFIG ,"Time to connect %s to %s\n" , - lmv->cluuid.uuid, obd->obd_name); + obd->obd_uuid.uuid, obd->obd_name);for (i =0 ; i < lmv->desc.ld_tgt_count; i++) { tgt = lmv->tgts[i];
@@ -753,10 +750,11 @@ static int lmv_hsm_req_build(struct lmv_obd *lmv,return 0 ; } -static int lmv_hsm_ct_unregister (struct lmv_obd *lmv,unsigned int cmd,int len, -struct lustre_kernelcomm *lk, +static int lmv_hsm_ct_unregister (struct obd_device *obd,unsigned int cmd, +int len,struct lustre_kernelcomm *lk,void __user *uarg) { +struct lmv_obd *lmv = &obd->u.lmv;u32 i;/* unregister request (call from llapi_hsm_copytool_fini) */
@@ -776,20 +774,21 @@ static int lmv_hsm_ct_unregister(struct lmv_obd *lmv, unsigned int cmd, int len,* Unreached coordinators will get EPIPE on next requests * and will unregister automatically. */ -return libcfs_kkuc_group_rem (lk->lk_uid, lk->lk_group); +return libcfs_kkuc_group_rem (&obd->obd_uuid, lk->lk_uid, lk->lk_group); } -static int lmv_hsm_ct_register (struct lmv_obd *lmv,unsigned int cmd,int len, -struct lustre_kernelcomm *lk,void __user *uarg) +static int lmv_hsm_ct_register (struct obd_device *obd,unsigned int cmd, +int len,struct lustre_kernelcomm *lk, +void __user *uarg) { +struct lmv_obd *lmv = &obd->u.lmv;struct file *filp;u32 i, j;int err;bool any_set = false;struct kkuc_ct_data kcd = { .kcd_magic =KKUC_CT_DATA_MAGIC , - .kcd_uuid = lmv->cluuid, - .kcd_archive = lk->lk_data + .kcd_archive = lk->lk_data, };int rc =0 ;
@@ -797,8 +796,8 @@ static int lmv_hsm_ct_register(struct lmv_obd *lmv, unsigned int cmd, int len,if (!filp)return -EBADF ; - rc =libcfs_kkuc_group_add (filp, lk->lk_uid, lk->lk_group, - &kcd,sizeof (kcd)); + rc =libcfs_kkuc_group_add (filp, &obd->obd_uuid, lk->lk_uid, + lk->lk_group, &kcd,sizeof (kcd));if (rc) goto err_fput;
@@ -848,7 +847,7 @@ static int lmv_hsm_ct_register(struct lmv_obd *lmv, unsigned int cmd, int len,return 0 ; err_kkuc_rem: -libcfs_kkuc_group_rem (lk->lk_uid, lk->lk_group); +libcfs_kkuc_group_rem (&obd->obd_uuid, lk->lk_uid, lk->lk_group); err_fput:fput (filp);return rc;
@@ -1084,9 +1083,9 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,struct lustre_kernelcomm *lk = karg;if (lk->lk_flags &LK_FLG_STOP ) - rc =lmv_hsm_ct_unregister (lmv, cmd, len, lk, uarg); + rc =lmv_hsm_ct_unregister (obddev, cmd, len, lk, uarg);else - rc =lmv_hsm_ct_register (lmv, cmd, len, lk, uarg); + rc =lmv_hsm_ct_register (obddev, cmd, len, lk, uarg);break ; }default :
@@ -2562,6 +2561,7 @@ static int lmv_unlink(struct obd_export *exp, struct md_op_data *op_data,static int lmv_precleanup (struct obd_device *obd) { +libcfs_kkuc_group_rem (&obd->obd_uuid,0 ,KUC_GRP_HSM );fld_client_debugfs_fini (&obd->u.lmv.lmv_fld);lprocfs_obd_cleanup (obd);ldebugfs_free_md_stats (obd);
fs/lustre/mdc/mdc_request.c +10 -12
@@ -2173,10 +2173,12 @@ static int mdc_ioc_hsm_ct_start(struct obd_export *exp,/** * Send a message to any listening copytools * +* @uuid: obd device UUID * @val: KUC message (kuc_hdr + hsm_action_list) * @len: total length of message */ -static int mdc_hsm_copytool_send (size_t len,void *val) +static int mdc_hsm_copytool_send (const struct obd_uuid *uuid, +size_t len,void *val) {struct kuc_hdr *lh = (struct kuc_hdr *)val;struct hsm_action_list *hal = (struct hsm_action_list *)(lh +1 );
@@ -2200,7 +2202,7 @@ static int mdc_hsm_copytool_send(size_t len, void *val) lh->kuc_msglen, hal->hal_count, hal->hal_fsname);/* Broadcast to HSM listeners */ -return libcfs_kkuc_group_put (KUC_GRP_HSM , lh); +return libcfs_kkuc_group_put (uuid,KUC_GRP_HSM , lh); }/**
@@ -2219,9 +2221,6 @@ static int mdc_hsm_ct_reregister(void *data, void *cb_arg)if (!kcd || kcd->kcd_magic !=KKUC_CT_DATA_MAGIC )return -EPROTO ; -if (!obd_uuid_equals (&kcd->kcd_uuid, &imp->imp_obd->obd_uuid)) -return 0 ; -CDEBUG (D_HA ,"%s: recover copytool registration to MDT (archive=%#x)\n" , imp->imp_obd->obd_name, kcd->kcd_archive); rc =mdc_ioc_hsm_ct_register (imp, kcd->kcd_archive);
@@ -2264,7 +2263,8 @@ static int mdc_set_info_async(const struct lu_env *env,return rc; }if (KEY_IS (KEY_HSM_COPYTOOL_SEND )) { - rc =mdc_hsm_copytool_send (vallen, val); + rc =mdc_hsm_copytool_send (&imp->imp_obd->obd_uuid, vallen, + val);return rc; }if (KEY_IS (KEY_DEFAULT_EASIZE )) {
@@ -2403,11 +2403,13 @@ static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,case IMP_EVENT_ACTIVE : rc =obd_notify_observer (obd, obd,OBD_NOTIFY_ACTIVE );/* redo the kuc registration after reconnecting */ -if (rc ==0 ) +if (rc ==0 ) {/* re-register HSM agents */ - rc =libcfs_kkuc_group_foreach (KUC_GRP_HSM , + rc =libcfs_kkuc_group_foreach (&imp->imp_obd->obd_uuid, +KUC_GRP_HSM , mdc_hsm_ct_reregister, (void *)imp); + }break ;case IMP_EVENT_OCD : {struct obd_connect_data *ocd = &imp->imp_connect_data;
@@ -2576,10 +2578,6 @@ static int mdc_precleanup(struct obd_device *obd) {osc_precleanup_common (obd); -/* Failsafe, ok if racy */ -if (atomic_read (&obd->obd_type->typ_refcnt) <=1 ) -libcfs_kkuc_group_rem (0 ,KUC_GRP_HSM ); -mdc_changelog_cdev_finish (obd);obd_cleanup_client_import (obd);
fs/lustre/obdclass/kernelcomm.c +15 -11
@@ -90,6 +90,7 @@ static int libcfs_kkuc_msg_put(struct file *filp, void *payload)/** A single group registration has a uid and a file pointer */ struct kkuc_reg {struct list_head kr_chain; +struct obd_uuid kr_uuid;int kr_uid;struct file *kr_fp;char kr_data[0 ];
@@ -115,12 +116,13 @@ void libcfs_kkuc_init(void)/** Add a receiver to a broadcast group * * @filp: pipe to write into +* @uuid: obd device UUID * @uid: identifier for this receiver * @group: group number * @data: user data */ -int libcfs_kkuc_group_add (struct file *filp,int uid,unsigned int group, -void *data,size_t data_len) +int libcfs_kkuc_group_add (struct file *filp,const struct obd_uuid *uuid, +int uid,int group,void *data,size_t data_len) {struct kkuc_reg *reg;
@@ -134,10 +136,11 @@ int libcfs_kkuc_group_add(struct file *filp, int uid, unsigned int group,return -EBADF ;/* freed in group_rem */ - reg =kmalloc (sizeof (*reg) + data_len,GFP_KERNEL ); + reg =kzalloc (sizeof (*reg) + data_len,GFP_KERNEL );if (!reg)return -ENOMEM ; + reg->kr_uuid = *uuid; reg->kr_fp = filp; reg->kr_uid = uid;memcpy (reg->kr_data, data, data_len);
@@ -152,7 +155,7 @@ int libcfs_kkuc_group_add(struct file *filp, int uid, unsigned int group, }EXPORT_SYMBOL (libcfs_kkuc_group_add); -int libcfs_kkuc_group_rem (int uid,unsigned int group) +int libcfs_kkuc_group_rem (const struct obd_uuid *uuid,int uid,int group) {struct kkuc_reg *reg, *next;
@@ -169,12 +172,13 @@ int libcfs_kkuc_group_rem(int uid, unsigned int group) lh.kuc_transport =KUC_TRANSPORT_GENERIC ; lh.kuc_msgtype =KUC_MSG_SHUTDOWN ; lh.kuc_msglen =sizeof (lh); -libcfs_kkuc_group_put (group, &lh); +libcfs_kkuc_group_put (uuid, group, &lh); }down_write (&kg_sem);list_for_each_entry_safe (reg, next, &kkuc_groups[group], kr_chain) { -if (!uid || (uid == reg->kr_uid)) { +if (obd_uuid_equals (uuid, ®->kr_uuid) && + (!uid || uid == reg->kr_uid)) {list_del (®->kr_chain);CDEBUG (D_HSM ,"Removed uid=%d fp=%p from group %d\n" , reg->kr_uid, reg->kr_fp, group);
@@ -189,7 +193,7 @@ int libcfs_kkuc_group_rem(int uid, unsigned int group) }EXPORT_SYMBOL (libcfs_kkuc_group_rem); -int libcfs_kkuc_group_put (unsigned int group,void *payload) +int libcfs_kkuc_group_put (const struct obd_uuid *uuid,int group,void *payload) {struct kkuc_reg *reg;int rc =0 ;
@@ -210,7 +214,7 @@ int libcfs_kkuc_group_put(unsigned int group, void *payload) }list_for_each_entry (reg, &kkuc_groups[group], kr_chain) { -if (reg->kr_fp) { +if (obd_uuid_equals (uuid, ®->kr_uuid) && reg->kr_fp) { rc =libcfs_kkuc_msg_put (reg->kr_fp, payload);if (!rc) { one_success =1 ;
@@ -240,8 +244,8 @@ int libcfs_kkuc_group_put(unsigned int group, void *payload)* @cb_func: the function to be called. * @cb_arg: extra argument to be passed to the callback function. */ -int libcfs_kkuc_group_foreach (unsigned int group,libcfs_kkuc_cb_t cb_func, -void *cb_arg) +int libcfs_kkuc_group_foreach (const struct obd_uuid *uuid,int group, +libcfs_kkuc_cb_t cb_func,void *cb_arg) {struct kkuc_reg *reg;int rc =0 ;
@@ -253,7 +257,7 @@ int libcfs_kkuc_group_foreach(unsigned int group, libcfs_kkuc_cb_t cb_func,down_read (&kg_sem);list_for_each_entry (reg, &kkuc_groups[group], kr_chain) { -if (reg->kr_fp) +if (obd_uuid_equals (uuid, ®->kr_uuid) && reg->kr_fp) rc =cb_func (reg->kr_data, cb_arg); }up_read (&kg_sem);
Signature · 1 line
1.8.3.1
PATCH 94/151 lustre: dne: allow mkdir with specific MDTs
In reply to James SimmonsFrom: Lai Siyao <[email protected]>
Silimiar to create file on specific OSTs, allow 'lfs mkdir' to mkdir on specific MDTs. This is achieved by allowing 'lfs mkdir -i' specify multiple MDTs, and adding LMV_USER_MAGIC_SPECIFIC.
WC-bug-id: https://jira.whamcloud.com/browse/LU-8616
Lustre-commit: 087ec276de0b ("LU-8616 dne: allow mkdir with specific MDTs")
Reviewed-on: https://review.whamcloud.com/30566
--- fs/lustre/llite/dir.c | 17 ++++++++++------- fs/lustre/ptlrpc/pack_generic.c | 23 +++++++++++++++++++++++ include/uapi/linux/lustre/lustre_user.h | 2 ++ 3 files changed, 35 insertions(+), 7 deletions(-)
fs/lustre/llite/dir.c +10 -7
@@ -402,7 +402,7 @@ static int ll_send_mgc_param(struct obd_export *mgc, char *string)* <0 if the creation is failed. */ static int ll_dir_setdirstripe (struct dentry *dparent,struct lmv_user_md *lump, -const char *dirname,umode_t mode) +size_t len,const char *dirname,umode_t mode) {struct inode *parent = dparent->d_inode;struct ptlrpc_request *request =NULL ;
@@ -420,7 +420,8 @@ static int ll_dir_setdirstripe(struct dentry *dparent, struct lmv_user_md *lump, };int err; -if (unlikely (lump->lum_magic !=LMV_USER_MAGIC )) +if (unlikely (lump->lum_magic !=LMV_USER_MAGIC && + lump->lum_magic !=LMV_USER_MAGIC_SPECIFIC ))return -EINVAL ; CDEBUG(D_VFSTRACE,
@@ -432,7 +433,8 @@ static int ll_dir_setdirstripe(struct dentry *dparent, struct lmv_user_md *lump, !(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_DIR_STRIPE))return -EINVAL ; -if (lump->lum_magic !=cpu_to_le32 (LMV_USER_MAGIC )) +if (lump->lum_magic !=cpu_to_le32 (LMV_USER_MAGIC ) && + lump->lum_magic !=cpu_to_le32 (LMV_USER_MAGIC_SPECIFIC ))lustre_swab_lmv_user_md (lump);if (!IS_POSIXACL (parent) || !exp_connect_umask (ll_i2mdexp (parent)))
@@ -459,7 +461,7 @@ static int ll_dir_setdirstripe(struct dentry *dparent, struct lmv_user_md *lump, } op_data->op_cli_flags |=CLI_SET_MEA ; - err =md_create (sbi->ll_md_exp, op_data, lump,sizeof (*lump), mode, + err =md_create (sbi->ll_md_exp, op_data, lump, len, mode,from_kuid (&init_user_ns,current_fsuid ()),from_kgid (&init_user_ns,current_fsgid ()),current_cap (),0 , &request);
@@ -1184,8 +1186,9 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) lum = (struct lmv_user_md *)data->ioc_inlbuf2; lumlen = data->ioc_inllen2; -if (lum->lum_magic !=LMV_USER_MAGIC || - lumlen !=sizeof (*lum)) { +if ((lum->lum_magic !=LMV_USER_MAGIC && + lum->lum_magic !=LMV_USER_MAGIC_SPECIFIC ) || + lumlen <sizeof (*lum)) {CERROR ("%s: wrong lum magic %x or size %d: rc = %d\n" , filename, lum->lum_magic, lumlen, -EFAULT ); rc = -EINVAL ;
@@ -1197,7 +1200,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)#else mode = data->ioc_type;#endif - rc =ll_dir_setdirstripe (dentry, lum, filename, mode); + rc =ll_dir_setdirstripe (dentry, lum, lumlen, filename, mode); lmv_out_free:kvfree (data);return rc;
fs/lustre/ptlrpc/pack_generic.c +23 -0
@@ -1960,14 +1960,37 @@ void lustre_swab_lmv_mds_md(union lmv_mds_md *lmm) }EXPORT_SYMBOL (lustre_swab_lmv_mds_md); +void lustre_swab_lmv_user_md_objects (struct lmv_user_mds_data *lmd, +int stripe_count) +{ +int i; + +for (i =0 ; i < stripe_count; i++) +__swab32s (&(lmd[i].lum_mds)); +} +EXPORT_SYMBOL (lustre_swab_lmv_user_md_objects); + +void lustre_swab_lmv_user_md (struct lmv_user_md *lum) { +u32 count = lum->lum_stripe_count; +__swab32s (&lum->lum_magic);__swab32s (&lum->lum_stripe_count);__swab32s (&lum->lum_stripe_offset);__swab32s (&lum->lum_hash_type);__swab32s (&lum->lum_type); BUILD_BUG_ON(!offsetof(typeof(*lum), lum_padding1)); +switch (lum->lum_magic) { +case LMV_USER_MAGIC_SPECIFIC : + count = lum->lum_stripe_count; +/* fallthrough */ +case __swab32 (LMV_USER_MAGIC_SPECIFIC ): +lustre_swab_lmv_user_md_objects (lum->lum_objects, count); +break ; +default : +break ; + } }EXPORT_SYMBOL (lustre_swab_lmv_user_md);
include/uapi/linux/lustre/lustre_user.h +2 -0
@@ -365,8 +365,10 @@ struct ll_ioc_lease {#define LOV_USER_MAGIC_COMP_V1 0x0BD60BD0#define LMV_USER_MAGIC 0x0CD30CD0/*default lmv magic*/ +#define LMV_USER_MAGIC_SPECIFIC 0x0CD40CD0#define LOV_PATTERN_RAID0 0x001 +#define LOV_PATTERN_RAID1 0x002#define LOV_PATTERN_MDT 0x100#define LOV_PATTERN_CMOBD 0x200
Signature · 1 line
1.8.3.1
PATCH 95/151 lustre: misc: update Intel copyright messages for 2017
In reply to James SimmonsFrom: Andreas Dilger <[email protected]>
Update copyright messages for files updated in 2016, excluding trivial patches. This brings use closely to the OpenSFS tree.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10308
Lustre-commit: ccabce23bd9e ("LU-10308 misc: update Intel copyright messages for 2017")
Reviewed-on: https://review.whamcloud.com/30341
--- fs/lustre/fid/fid_internal.h | 2 +- fs/lustre/fid/fid_request.c | 2 +- fs/lustre/fid/lproc_fid.c | 2 +- fs/lustre/include/cl_object.h | 2 +- fs/lustre/include/lprocfs_status.h | 2 +- fs/lustre/include/lu_object.h | 2 +- fs/lustre/include/lu_ref.h | 2 +- fs/lustre/include/lustre_acl.h | 2 ++ fs/lustre/include/lustre_disk.h | 2 +- fs/lustre/include/lustre_dlm.h | 2 +- fs/lustre/include/lustre_export.h | 2 +- fs/lustre/include/lustre_fid.h | 2 +- fs/lustre/include/lustre_handles.h | 2 +- fs/lustre/include/lustre_import.h | 2 +- fs/lustre/include/lustre_kernelcomm.h | 2 +- fs/lustre/include/lustre_lib.h | 2 +- fs/lustre/include/lustre_linkea.h | 2 +- fs/lustre/include/lustre_log.h | 2 +- fs/lustre/include/lustre_mdc.h | 2 +- fs/lustre/include/lustre_mds.h | 2 +- fs/lustre/include/lustre_net.h | 2 +- fs/lustre/include/lustre_osc.h | 2 +- fs/lustre/include/lustre_req_layout.h | 2 +- fs/lustre/include/lustre_sec.h | 2 +- fs/lustre/include/lustre_swab.h | 2 +- fs/lustre/include/obd.h | 2 +- fs/lustre/include/obd_class.h | 2 +- fs/lustre/include/obd_support.h | 2 +- fs/lustre/ldlm/ldlm_extent.c | 2 +- fs/lustre/ldlm/ldlm_flock.c | 2 +- fs/lustre/ldlm/ldlm_internal.h | 2 +- fs/lustre/ldlm/ldlm_lib.c | 2 +- fs/lustre/ldlm/ldlm_lock.c | 2 +- fs/lustre/ldlm/ldlm_lockd.c | 2 +- fs/lustre/ldlm/ldlm_plain.c | 2 +- fs/lustre/ldlm/ldlm_pool.c | 2 +- fs/lustre/ldlm/ldlm_request.c | 2 +- fs/lustre/ldlm/ldlm_resource.c | 2 +- fs/lustre/llite/dcache.c | 2 +- fs/lustre/llite/dir.c | 2 +- fs/lustre/llite/file.c | 2 +- fs/lustre/llite/glimpse.c | 2 +- fs/lustre/llite/lcommon_cl.c | 2 +- fs/lustre/llite/lcommon_misc.c | 2 +- fs/lustre/llite/llite_internal.h | 2 +- fs/lustre/llite/llite_lib.c | 2 +- fs/lustre/llite/llite_nfs.c | 2 +- fs/lustre/llite/lproc_llite.c | 2 +- fs/lustre/llite/namei.c | 2 +- fs/lustre/llite/rw.c | 2 +- fs/lustre/llite/rw26.c | 2 +- fs/lustre/llite/statahead.c | 2 +- fs/lustre/llite/vvp_internal.h | 2 +- fs/lustre/llite/vvp_io.c | 2 +- fs/lustre/llite/vvp_object.c | 2 +- fs/lustre/llite/vvp_page.c | 2 +- fs/lustre/llite/xattr.c | 2 +- fs/lustre/llite/xattr_cache.c | 2 +- fs/lustre/lmv/lmv_intent.c | 2 +- fs/lustre/lmv/lmv_internal.h | 2 +- fs/lustre/lmv/lmv_obd.c | 2 +- fs/lustre/lmv/lproc_lmv.c | 2 +- fs/lustre/lov/lov_cl_internal.h | 2 +- fs/lustre/lov/lov_dev.c | 2 +- fs/lustre/lov/lov_ea.c | 2 +- fs/lustre/lov/lov_internal.h | 2 +- fs/lustre/lov/lov_io.c | 2 +- fs/lustre/lov/lov_lock.c | 2 +- fs/lustre/lov/lov_merge.c | 2 +- fs/lustre/lov/lov_obd.c | 2 +- fs/lustre/lov/lov_object.c | 2 +- fs/lustre/lov/lov_offset.c | 2 +- fs/lustre/lov/lov_pack.c | 2 +- fs/lustre/lov/lov_page.c | 2 +- fs/lustre/lov/lov_pool.c | 2 +- fs/lustre/lov/lproc_lov.c | 2 +- fs/lustre/mdc/lproc_mdc.c | 2 +- fs/lustre/mdc/mdc_changelog.c | 2 ++ fs/lustre/mdc/mdc_dev.c | 2 +- fs/lustre/mdc/mdc_internal.h | 2 +- fs/lustre/mdc/mdc_lib.c | 2 +- fs/lustre/mdc/mdc_locks.c | 2 +- fs/lustre/mdc/mdc_reint.c | 2 +- fs/lustre/mdc/mdc_request.c | 2 +- fs/lustre/mgc/lproc_mgc.c | 2 +- fs/lustre/mgc/mgc_internal.h | 2 +- fs/lustre/mgc/mgc_request.c | 2 +- fs/lustre/obdclass/cl_internal.h | 2 +- fs/lustre/obdclass/cl_io.c | 2 +- fs/lustre/obdclass/cl_lock.c | 2 +- fs/lustre/obdclass/cl_object.c | 2 +- fs/lustre/obdclass/cl_page.c | 2 +- fs/lustre/obdclass/class_obd.c | 2 +- fs/lustre/obdclass/genops.c | 2 +- fs/lustre/obdclass/kernelcomm.c | 2 +- fs/lustre/obdclass/linkea.c | 2 +- fs/lustre/obdclass/llog.c | 2 +- fs/lustre/obdclass/llog_cat.c | 2 +- fs/lustre/obdclass/llog_internal.h | 2 +- fs/lustre/obdclass/llog_swab.c | 2 +- fs/lustre/obdclass/lprocfs_status.c | 2 +- fs/lustre/obdclass/lu_object.c | 2 +- fs/lustre/obdclass/lu_ref.c | 2 +- fs/lustre/obdclass/lustre_handles.c | 2 +- fs/lustre/obdclass/lustre_peer.c | 2 +- fs/lustre/obdclass/obd_config.c | 2 +- fs/lustre/obdclass/obd_mount.c | 2 +- fs/lustre/obdclass/obd_sysfs.c | 2 +- fs/lustre/obdclass/obdo.c | 2 +- fs/lustre/obdecho/debug.c | 2 +- fs/lustre/obdecho/echo_client.c | 2 +- fs/lustre/osc/lproc_osc.c | 2 +- fs/lustre/osc/osc_cache.c | 2 +- fs/lustre/osc/osc_dev.c | 2 +- fs/lustre/osc/osc_internal.h | 2 +- fs/lustre/osc/osc_io.c | 2 +- fs/lustre/osc/osc_lock.c | 2 +- fs/lustre/osc/osc_object.c | 2 +- fs/lustre/osc/osc_page.c | 2 +- fs/lustre/osc/osc_quota.c | 2 +- fs/lustre/osc/osc_request.c | 2 +- fs/lustre/ptlrpc/client.c | 2 +- fs/lustre/ptlrpc/events.c | 2 +- fs/lustre/ptlrpc/import.c | 2 +- fs/lustre/ptlrpc/layout.c | 2 +- fs/lustre/ptlrpc/llog_net.c | 2 +- fs/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- fs/lustre/ptlrpc/niobuf.c | 2 +- fs/lustre/ptlrpc/pack_generic.c | 2 +- fs/lustre/ptlrpc/ptlrpc_internal.h | 2 +- fs/lustre/ptlrpc/ptlrpc_module.c | 2 +- fs/lustre/ptlrpc/ptlrpcd.c | 2 +- fs/lustre/ptlrpc/recover.c | 2 +- fs/lustre/ptlrpc/sec.c | 2 +- fs/lustre/ptlrpc/sec_bulk.c | 2 +- fs/lustre/ptlrpc/sec_config.c | 2 +- fs/lustre/ptlrpc/sec_gc.c | 2 +- fs/lustre/ptlrpc/sec_null.c | 2 +- fs/lustre/ptlrpc/sec_plain.c | 2 +- fs/lustre/ptlrpc/service.c | 2 +- include/linux/libcfs/libcfs.h | 2 +- include/linux/libcfs/libcfs_cpu.h | 2 +- include/linux/libcfs/libcfs_debug.h | 2 +- include/linux/libcfs/libcfs_hash.h | 2 +- include/linux/libcfs/libcfs_private.h | 2 +- include/linux/libcfs/libcfs_string.h | 2 +- include/linux/lnet/api.h | 2 +- include/linux/lnet/lib-lnet.h | 2 +- include/linux/lnet/lib-types.h | 2 +- include/uapi/linux/lnet/libcfs_debug.h | 2 +- include/uapi/linux/lnet/libcfs_ioctl.h | 2 ++ include/uapi/linux/lnet/lnet-dlc.h | 2 +- include/uapi/linux/lnet/lnet-types.h | 2 +- include/uapi/linux/lnet/lnetctl.h | 3 +++ include/uapi/linux/lnet/nidstr.h | 2 +- include/uapi/linux/lustre/lustre_fid.h | 2 +- include/uapi/linux/lustre/lustre_idl.h | 2 +- include/uapi/linux/lustre/lustre_ioctl.h | 2 +- include/uapi/linux/lustre/lustre_ostid.h | 2 +- include/uapi/linux/lustre/lustre_user.h | 2 +- net/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- net/lnet/klnds/o2iblnd/o2iblnd.h | 2 +- net/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- net/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 2 +- net/lnet/klnds/socklnd/socklnd.c | 2 +- net/lnet/klnds/socklnd/socklnd.h | 2 +- net/lnet/klnds/socklnd/socklnd_cb.c | 2 +- net/lnet/klnds/socklnd/socklnd_lib.c | 2 +- net/lnet/klnds/socklnd/socklnd_proto.c | 2 +- net/lnet/libcfs/debug.c | 2 +- net/lnet/libcfs/libcfs_cpu.c | 2 +- net/lnet/libcfs/libcfs_string.c | 2 +- net/lnet/libcfs/module.c | 2 +- net/lnet/libcfs/tracefile.c | 2 +- net/lnet/libcfs/tracefile.h | 2 +- net/lnet/lnet/acceptor.c | 2 +- net/lnet/lnet/api-ni.c | 2 +- net/lnet/lnet/config.c | 2 +- net/lnet/lnet/lib-md.c | 2 +- net/lnet/lnet/lib-move.c | 2 +- net/lnet/lnet/lib-msg.c | 2 +- net/lnet/lnet/lib-ptl.c | 2 +- net/lnet/lnet/lib-socket.c | 2 +- net/lnet/lnet/lo.c | 2 ++ net/lnet/lnet/module.c | 2 +- net/lnet/lnet/net_fault.c | 2 +- net/lnet/lnet/nidstrings.c | 2 +- net/lnet/lnet/peer.c | 2 +- net/lnet/lnet/router.c | 2 +- net/lnet/lnet/router_proc.c | 2 +- net/lnet/selftest/brw_test.c | 2 +- net/lnet/selftest/framework.c | 2 +- net/lnet/selftest/rpc.c | 2 +- net/lnet/selftest/selftest.h | 2 +- 194 files changed, 200 insertions(+), 189 deletions(-)
fs/lustre/fid/fid_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2014 Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/fid/fid_request.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/fid/lproc_fid.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/cl_object.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lprocfs_status.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lu_object.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lu_ref.h +1 -1
@@ -3,7 +3,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2013, Intel Corporation. * * Author: Nikita Danilov <[email protected]> *
fs/lustre/include/lustre_acl.h +2 -0
@@ -23,6 +23,8 @@/* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. +* +* Copyright (c) 2014, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_disk.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_dlm.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_export.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_fid.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_handles.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2012, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_import.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2016, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_kernelcomm.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2013 Intel Corporation. +* Copyright (c) 2013, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_lib.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_linkea.h +1 -1
@@ -21,7 +21,7 @@* GPL HEADER END */ /* -* Copyright (c) 2013, 2014, Intel Corporation. +* Copyright (c) 2013, 2017, Intel Corporation. * Use is subject to license terms. * * Author: di wang <[email protected]>
fs/lustre/include/lustre_log.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_mdc.h +1 -1
@@ -25,7 +25,7 @@* Use is subject to license terms. */ /* -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_mds.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_net.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_osc.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_req_layout.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_sec.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/lustre_swab.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2014, Intel Corporation. +* Copyright (c) 2017, Intel Corporation. * * Copyright 2015 Cray Inc, all rights reserved. * Author: Ben Evans.
fs/lustre/include/obd.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/obd_class.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/include/obd_support.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_extent.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2012, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_flock.c +1 -1
@@ -28,7 +28,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2012, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_lib.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_lock.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_lockd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_plain.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_pool.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_request.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ldlm/ldlm_resource.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/dcache.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/dir.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/file.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/glimpse.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/lcommon_cl.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/lcommon_misc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/llite_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/llite_lib.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/llite_nfs.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/lproc_llite.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/namei.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/rw.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/rw26.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/statahead.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/vvp_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2013, 2015, Intel Corporation. +* Copyright (c) 2013, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/vvp_io.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/vvp_object.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/vvp_page.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/xattr.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/llite/xattr_cache.c +1 -1
@@ -2,7 +2,7 @@/* * Copyright 2012 Xyratex Technology Limited * -* Copyright (c) 2013, 2015, Intel Corporation. +* Copyright (c) 2013, 2017, Intel Corporation. * * Author: Andrew Perepechko <[email protected]> *
fs/lustre/lmv/lmv_intent.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2016, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lmv/lmv_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2016, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lmv/lmv_obd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lmv/lproc_lmv.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_cl_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2017 Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_dev.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_ea.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_io.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_lock.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_merge.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_obd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_object.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_offset.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_pack.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_page.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lov_pool.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/lov/lproc_lov.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/lproc_mdc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/mdc_changelog.c +2 -0
@@ -24,6 +24,8 @@* Copyright (c) 2017, Commissariat a l'Energie Atomique et aux Energies * Alternatives. * +* Copyright (c) 2017, Intel Corporation. +* * Author: Henri Doreau <[email protected]> */
fs/lustre/mdc/mdc_dev.c +1 -1
@@ -21,7 +21,7 @@* GPL HEADER END */ /* -* Copyright (c) 2017 Intel Corporation. +* Copyright (c) 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/mdc_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015 Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/mdc_lib.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/mdc_locks.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/mdc_reint.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mdc/mdc_request.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mgc/lproc_mgc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mgc/mgc_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/mgc/mgc_request.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/cl_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/cl_io.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/cl_lock.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/cl_object.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/cl_page.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/class_obd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/genops.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/kernelcomm.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/linkea.c +1 -1
@@ -21,7 +21,7 @@* GPL HEADER END */ /* -* Copyright (c) 2013, 2014, Intel Corporation. +* Copyright (c) 2013, 2017, Intel Corporation. * Use is subject to license terms. * * Author: Di Wang <[email protected]>
fs/lustre/obdclass/llog.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/llog_cat.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/llog_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/llog_swab.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/lprocfs_status.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/lu_object.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/lu_ref.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/lustre_handles.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/lustre_peer.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/obd_config.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/obd_mount.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/obd_sysfs.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdclass/obdo.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdecho/debug.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/obdecho/echo_client.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/lproc_osc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_cache.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. * */ /*
fs/lustre/osc/osc_dev.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_io.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_lock.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_object.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_page.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/osc/osc_quota.c +1 -1
@@ -19,7 +19,7 @@/* * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * Code originally extracted from quota directory */
fs/lustre/osc/osc_request.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/client.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/events.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2017 Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/import.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/layout.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/llog_net.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/lproc_ptlrpc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/niobuf.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/pack_generic.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/ptlrpc_internal.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/ptlrpc_module.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/ptlrpcd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/recover.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/sec.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/sec_bulk.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/sec_config.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/sec_gc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2016, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/sec_null.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/sec_plain.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
fs/lustre/ptlrpc/service.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/libcfs/libcfs.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/libcfs/libcfs_cpu.h +1 -1
@@ -19,7 +19,7 @@/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/libcfs/libcfs_debug.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/libcfs/libcfs_hash.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/libcfs/libcfs_private.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/libcfs/libcfs_string.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/lnet/api.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011 - 2015, Intel Corporation. +* Copyright (c) 2016, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/lnet/lib-lnet.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/linux/lnet/lib-types.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/uapi/linux/lnet/libcfs_debug.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2014, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/uapi/linux/lnet/libcfs_ioctl.h +2 -0
@@ -22,6 +22,8 @@/* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. +* +* Copyright (c) 2013, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/uapi/linux/lnet/lnet-dlc.h +1 -1
@@ -20,7 +20,7 @@* */ /* -* Copyright (c) 2014, Intel Corporation. +* Copyright (c) 2014, 2017, Intel Corporation. */ /* * Author: Amir Shehata <[email protected]>
include/uapi/linux/lnet/lnet-types.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012 - 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/uapi/linux/lnet/lnetctl.h +3 -0
@@ -12,6 +12,9 @@* * header for lnet ioctl */ +/* +* Copyright (c) 2014, 2017, Intel Corporation. +*/ #ifndef _LNETCTL_H_#define _LNETCTL_H_
include/uapi/linux/lnet/nidstr.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2015, 2017, Intel Corporation. */ #ifndef _LNET_NIDSTRINGS_H#define _LNET_NIDSTRINGS_H
include/uapi/linux/lustre/lustre_fid.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2014, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * Copyright 2016 Cray Inc, all rights reserved. * Author: Ben Evans.
include/uapi/linux/lustre/lustre_idl.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
include/uapi/linux/lustre/lustre_ioctl.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ #ifndef _UAPI_LUSTRE_IOCTL_H_#define _UAPI_LUSTRE_IOCTL_H_
include/uapi/linux/lustre/lustre_ostid.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2014, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * Copyright 2015 Cray Inc, all rights reserved. * Author: Ben Evans.
include/uapi/linux/lustre/lustre_user.h +1 -1
@@ -23,7 +23,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2010, 2015, Intel Corporation. +* Copyright (c) 2010, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/o2iblnd/o2iblnd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/o2iblnd/o2iblnd.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/o2iblnd/o2iblnd_cb.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/o2iblnd/o2iblnd_modparams.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/socklnd/socklnd.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/socklnd/socklnd.h +1 -1
@@ -2,7 +2,7 @@/* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * Author: Zach Brown <[email protected]> * Author: Peter J. Braam <[email protected]>
net/lnet/klnds/socklnd/socklnd_cb.c +1 -1
@@ -2,7 +2,7 @@/* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * Author: Zach Brown <[email protected]> * Author: Peter J. Braam <[email protected]>
net/lnet/klnds/socklnd/socklnd_lib.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/klnds/socklnd/socklnd_proto.c +1 -1
@@ -2,7 +2,7 @@/* * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. * * Author: Zach Brown <[email protected]> * Author: Peter J. Braam <[email protected]>
net/lnet/libcfs/debug.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/libcfs/libcfs_cpu.c +1 -1
@@ -18,7 +18,7 @@*/ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/libcfs/libcfs_string.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/libcfs/module.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015 Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/libcfs/tracefile.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/libcfs/tracefile.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/acceptor.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/api-ni.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/config.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/lib-md.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/lib-move.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/lib-msg.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/lib-ptl.c +1 -1
@@ -17,7 +17,7 @@* GPL HEADER END */ /* -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/lib-socket.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/lo.c +2 -0
@@ -23,6 +23,8 @@/* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. +* +* Copyright (c) 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/module.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/net_fault.c +1 -1
@@ -21,7 +21,7 @@* GPL HEADER END */ /* -* Copyright (c) 2014, Intel Corporation. +* Copyright (c) 2014, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/nidstrings.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/peer.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/lnet/router.c +1 -1
@@ -2,7 +2,7 @@/* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * This file is part of Portals * http://sourceforge.net/projects/sandiaportals/
net/lnet/lnet/router_proc.c +1 -1
@@ -2,7 +2,7 @@/* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * -* Copyright (c) 2011, 2012, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. * * This file is part of Portals * http://sourceforge.net/projects/sandiaportals/
net/lnet/selftest/brw_test.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2011, 2015, Intel Corporation. +* Copyright (c) 2011, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/selftest/framework.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/selftest/rpc.c +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, 2015, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
net/lnet/selftest/selftest.h +1 -1
@@ -24,7 +24,7 @@* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * -* Copyright (c) 2012, Intel Corporation. +* Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/
Signature · 1 line
1.8.3.1
PATCH 96/151 lustre: fid: improve seq allocation error messages
In reply to James SimmonsFrom: Emoly Liu <[email protected]>
When MDTs are waiting for MDT0000 to start the master sequence server and be granted a meta sequence for the first time, in case of "-EINPROGRESS", the limited console messages would be clearer and better than many error messages.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10392
Lustre-commit: 6f86519b3483 ("LU-10392 fid: improve seq allocation error messages")
Reviewed-on: https://review.whamcloud.com/30623
--- fs/lustre/fid/fid_request.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/lustre/fid/fid_request.c +6 -4
@@ -171,8 +171,9 @@ static int seq_client_alloc_seq(const struct lu_env *env,if (lu_seq_range_is_exhausted (&seq->lcs_space)) { rc =seq_client_alloc_meta (env, seq);if (rc) { -CERROR ("%s: Can't allocate new meta-sequence, rc %d\n" , - seq->lcs_name, rc); +if (rc != -EINPROGRESS ) +CERROR ("%s: Can't allocate new meta-sequence, rc = %d\n" , + seq->lcs_name, rc); *seqnr =U64_MAX ;return rc; }
@@ -232,8 +233,9 @@ int seq_client_alloc_fid(const struct lu_env *env,wake_up (&seq->lcs_waitq);if (rc) { -CERROR ("%s: Can't allocate new sequence, rc %d\n" , - seq->lcs_name, rc); +if (rc != -EINPROGRESS ) +CERROR ("%s: Can't allocate new sequence, rc %d\n" , + seq->lcs_name, rc);spin_unlock (&seq->lcs_lock);return rc; }
Signature · 1 line
1.8.3.1
PATCH 97/151 lustre: mdc: interruptable during RPC retry for EINPROGRESS
In reply to James SimmonsFrom: Fan Yong <[email protected]>
Sometimes, some system resource may be inaccessible temporarily, for example, related OI mapping is crashed and has yet not been rebuilt. Under such case, the server will reply the client with "-EINPROGRESS", then client will retry the RPC some time later.
Currently, the client will retry infinitely until related RPC succeed or get other failure. But we do not know how long it will be before related resource becoming available. It may be very long time as to the RPC sponsor - the application or the user does not want to retry any more, then we need to make the logic to be interruptable. This patch is for such purpose.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10237
Lustre-commit: 9c596a4996ee ("LU-10237 mdc: interruptable during RPC retry for EINPROGRESS")
Reviewed-on: https://review.whamcloud.com/30166
--- fs/lustre/mdc/mdc_locks.c | 14 ++++++++------ fs/lustre/mdc/mdc_reint.c | 19 +++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-)
fs/lustre/mdc/mdc_locks.c +8 -6
@@ -904,13 +904,15 @@ int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo,if (it->it_op && (int )lockrep->lock_policy_res2 == -EINPROGRESS ) {mdc_clear_replay_flag (req, rc);ptlrpc_req_finished (req); - resends++; - -CDEBUG (D_HA ,"%s: resend:%d op:%d " DFID "/" DFID "\n" , - obddev->obd_name, resends, it->it_op, -PFID (&op_data->op_fid1),PFID (&op_data->op_fid2)); -if (generation == obddev->u.cli.cl_import->imp_generation) { +if (signal_pending (current)) +return -EINTR ; + + resends++; +CDEBUG (D_HA ,"%s: resend:%d op:%d " DFID "/" DFID "\n" , + obddev->obd_name, resends, it->it_op, +PFID (&op_data->op_fid1), +PFID (&op_data->op_fid2)); goto resend; }else {CDEBUG (D_HA ,"resend cross eviction\n" );
fs/lustre/mdc/mdc_reint.c +11 -8
@@ -231,17 +231,20 @@ int mdc_create(struct obd_export *exp, struct md_op_data *op_data, level =LUSTRE_IMP_RECOVER ; goto resend; }else if (rc == -EINPROGRESS ) { -/* Retry create infinitely until succeed or get other -* error code. +/* +* Retry create infinitely until succeed or get other +* error code or interrupted. */ ptlrpc_req_finished (req); - resends++; - -CDEBUG (D_HA ,"%s: resend:%d create on " DFID "/" DFID "\n" , - exp->exp_obd->obd_name, resends, -PFID (&op_data->op_fid1),PFID (&op_data->op_fid2)); -if (generation == import->imp_generation) { +if (signal_pending (current)) +return -EINTR ; + + resends++; +CDEBUG (D_HA ,"%s: resend:%d create on " DFID "/" DFID "\n" , + exp->exp_obd->obd_name, resends, +PFID (&op_data->op_fid1), +PFID (&op_data->op_fid2)); goto rebuild; }else {CDEBUG (D_HA ,"resend cross eviction\n" );
Signature · 1 line
1.8.3.1
PATCH 98/151 lustre: osc: migrate to 64 bit time
In reply to James SimmonsChange od_contention_time from int to time64_t to make it clear this field is in units of seconds. Change the *_contention_time fields from jiffies to ktime_t to make it clear we are dealing with time and ktime_t is consistent on any platform unlike jiffies.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9019
Lustre-commit: 3ea899c9a611 ("LU-9019 osc: migrate to 64 bit time")
Reviewed-on: https://review.whamcloud.com/30607
--- fs/lustre/include/lustre_osc.h | 6 +++--- fs/lustre/mdc/lproc_mdc.c | 2 +- fs/lustre/osc/lproc_osc.c | 2 +- fs/lustre/osc/osc_cache.c | 4 ++-- fs/lustre/osc/osc_object.c | 10 +++++----- fs/lustre/osc/osc_page.c | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-)
fs/lustre/include/lustre_osc.h +3 -3
@@ -120,7 +120,7 @@ struct osc_device { } od_stats;/* configuration item(s) */ -int od_contention_time; +time64_t od_contention_time;int od_lockless_truncate; };
@@ -264,7 +264,7 @@ struct osc_object {* True if locking against this stripe got -EUSERS. */ int oo_contended; -unsigned long oo_contention_time; +ktime_t oo_contention_time;/* * used by the osc to keep track of what objects to build into rpcs. * Protected by client_obd->cli_loi_list_lock.
@@ -532,7 +532,7 @@ struct osc_page {/* * Submit time - the time when the page is starting RPC. For debugging. */ -unsigned long ops_submit_time; +ktime_t ops_submit_time; };struct osc_brw_async_args {
fs/lustre/mdc/lproc_mdc.c +1 -1
@@ -154,7 +154,7 @@ static int mdc_contention_seconds_seq_show(struct seq_file *m, void *v)struct obd_device *obd = m->private;struct osc_device *od =obd2osc_dev (obd); -seq_printf (m,"%u\n" , od->od_contention_time); +seq_printf (m,"%lld\n" , od->od_contention_time);return 0 ; }
fs/lustre/osc/lproc_osc.c +1 -1
@@ -506,7 +506,7 @@ static ssize_t contention_seconds_show(struct kobject *kobj, obd_kset.kobj);struct osc_device *od =obd2osc_dev (obd); -return sprintf (buf,"%u\n" , od->od_contention_time); +return sprintf (buf,"%lld\n" , od->od_contention_time); } static ssize_t contention_seconds_store(struct kobject *kobj,
fs/lustre/osc/osc_cache.c +2 -2
@@ -1307,7 +1307,7 @@ static int osc_make_ready(const struct lu_env *env, struct osc_async_page *oap, result =cl_page_make_ready (env, page,CRT_WRITE );if (result ==0 ) - opg->ops_submit_time = jiffies; + opg->ops_submit_time =ktime_get ();return result; }
@@ -1362,7 +1362,7 @@ static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,/* Clear opg->ops_transfer_pinned before VM lock is released. */ opg->ops_transfer_pinned =0 ; - opg->ops_submit_time =0 ; + opg->ops_submit_time =ktime_set (0 ,0 ); srvlock = oap->oap_brw_flags &OBD_BRW_SRVLOCK ;/* statistic */
fs/lustre/osc/osc_object.c +5 -5
@@ -307,9 +307,8 @@ static int osc_object_fiemap(const struct lu_env *env, struct cl_object *obj,int osc_object_is_contended (struct osc_object *obj) {struct osc_device *dev =lu2osc_dev (obj->oo_cl.co_lu.lo_dev); -int osc_contention_time = dev->od_contention_time; -unsigned long cur_time = jiffies; -unsigned long retry_time; +time64_t osc_contention_time = dev->od_contention_time; +ktime_t retry_time;if (OBD_FAIL_CHECK (OBD_FAIL_OSC_OBJECT_CONTENTION ))return 1 ;
@@ -321,8 +320,9 @@ int osc_object_is_contended(struct osc_object *obj)* I like copy-paste. the code is copied from * ll_file_is_contended. */ - retry_time = obj->oo_contention_time + osc_contention_time *HZ ; -if (time_after (cur_time, retry_time)) { + retry_time =ktime_add_ns (obj->oo_contention_time, + osc_contention_time *NSEC_PER_SEC ); +if (ktime_after (ktime_get (), retry_time)) {osc_object_clear_contended (obj);return 0 ; }
fs/lustre/osc/osc_page.c +5 -5
@@ -122,12 +122,12 @@ static const char *osc_list(struct list_head *head)return list_empty (head) ?"-" :"+" ; } -static inline unsigned long osc_submit_duration (struct osc_page *opg) +static inline s64 osc_submit_duration (struct osc_page *opg) { -if (opg->ops_submit_time ==0 ) +if (ktime_to_ns (opg->ops_submit_time) ==0 )return 0 ; -return (jiffies - opg->ops_submit_time); +return ktime_ms_delta (ktime_get (), opg->ops_submit_time); } static int osc_page_print(const struct lu_env *env,
@@ -139,7 +139,7 @@ static int osc_page_print(const struct lu_env *env,struct osc_object *obj =cl2osc (slice->cpl_obj);struct client_obd *cli = &osc_export (obj)->exp_obd->u.cli; - return (*printer)(env, cookie, LUSTRE_OSC_NAME "-page@%p %lu: 1< %#x %d %s %s > 2< %llu %u %u %#x %#x | %p %p %p > 3< %d %lu %d > 4< %d %d %d %lu %s | %s %s %s %s > 5< %s %s %s %s | %d %s | %d %s %s>\n", + return (*printer)(env, cookie, LUSTRE_OSC_NAME "-page@%p %lu: 1< %#x %d %s %s > 2< %llu %u %u %#x %#x | %p %p %p > 3< %d %lld %d > 4< %d %d %d %lu %s | %s %s %s %s > 5< %s %s %s %s | %d %s | %d %s %s>\n", opg, osc_index(opg), /* 1 */ oap->oap_magic, oap->oap_cmd,
@@ -303,7 +303,7 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, oap->oap_cmd |=OBD_BRW_NOQUOTA ; } - opg->ops_submit_time = jiffies; + opg->ops_submit_time =ktime_get ();osc_page_transfer_get (opg,"transfer\0imm" );osc_page_transfer_add (env, opg, crt); }
Signature · 1 line
1.8.3.1
PATCH 99/151 lustre: vvp: Print discarded page warning on -EIO
In reply to James SimmonsFrom: Patrick Farrell <[email protected]>
On client eviction, the client sometimes has dirty pages outstanding, which are then discarded. The client is supposed to print an error when this happens, from vvp_vmpage_error->ll_dirty_page_discard_warn.
However, the client looks for specific errors, and newer Lustre clients will sometimes return -EIO to I/O requests on eviction, instead of -EINTR. Since they can still return -EINTR, we must add -EIO as a new condition and keep -EINTR.
WC-bug-id: https://jira.whamcloud.com/browse/LU-8358
Lustre-commit: 5f327f6670d3 ("LU-8358 vvp: Print discarded page warning on -EIO")
Reviewed-on: https://review.whamcloud.com/21111
--- fs/lustre/llite/vvp_page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/lustre/llite/vvp_page.c +2 -2
@@ -241,8 +241,8 @@ static void vvp_vmpage_error(struct inode *inode, struct page *vmpage,SetPageError (vmpage);mapping_set_error (inode->i_mapping, ioret); -if ((ioret == -ESHUTDOWN || ioret == -EINTR ) && - obj->vob_discard_page_warned ==0 ) { +if ((ioret == -ESHUTDOWN || ioret == -EINTR || + ioret == -EIO ) && obj->vob_discard_page_warned ==0 ) { obj->vob_discard_page_warned =1 ;ll_dirty_page_discard_warn (vmpage, ioret); }
Signature · 1 line
1.8.3.1
PATCH 100/151 lustre: clio: Use readahead for partial page write
In reply to James SimmonsFrom: Patrick Farrell <[email protected]>
When writing to a region of a file less than file size (either an existing file or a shared file with multiple writers), writes of less than one page in size must first read in that page.
This results in extremely poor performance. For random I/O, there's no easy improvements available, but the sequential case can benefit enormously by using readahead to bring in those pages.
This patch connects ll_prepare_partial_page to the readahead infrastructure.
This does not affect random I/O or large unaligned writes, where readahead does not detect I/O.
Benchmarks are from a small VM system, files are NOT in cache when rewriting.
Write numbers are in MB/s.
File per process:
access = file-per-process
ordering in a file = sequential offsets
ordering inter file= no tasks offsets
clients = 1 (1 per node)
repetitions = 1
blocksize = 1000 MiB
aggregate filesize = 1000 MiB
New file (best case):
xfsize ppr write 1KiB n/a 59.44 5KiB n/a 164.5
Rewrite of existing file:
xfsize ppr re-write 1KiB off 4.65 1KiB on 48.40 5KiB off 12.95 5KiB on 143.3
Shared file writing:
access = single-shared-file
ordering in a file = sequential offsets ordering inter file= no tasks offsets
clients = 4 (4 per node)
repetitions = 1
blocksize = 1000 MiB
aggregate filesize = 4000 MiB
xfsize ppr write 1KiB off 11.26 1KiB on 58.72 5KiB off 18.7 5KiB on 127.3
WC-bug-id: https://jira.whamcloud.com/browse/LU-9618
Cray-bug-id: LUS-188
Lustre-commit: b7d38ece0013 ("LU-9618 clio: Use readahead for partial page write")
Reviewed-on: https://review.whamcloud.com/27544
--- fs/lustre/llite/llite_internal.h | 2 ++ fs/lustre/llite/rw.c | 34 +++--------------- fs/lustre/llite/rw26.c | 75 +++++++++++++++++++++++++++++----------- 3 files changed, 61 insertions(+), 50 deletions(-)
fs/lustre/llite/llite_internal.h +2 -0
@@ -788,6 +788,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,int ll_writepage (struct page *page,struct writeback_control *wbc);int ll_writepages (struct address_space *mapping,struct writeback_control *wbc);int ll_readpage (struct file *file,struct page *page); +int ll_io_read_page (const struct lu_env *env,struct cl_io *io, +struct cl_page *page,struct file *file);void ll_readahead_init (struct inode *inode,struct ll_readahead_state *ras);int vvp_io_write_commit (const struct lu_env *env,struct cl_io *io);
fs/lustre/llite/rw.c +5 -29
@@ -1094,7 +1094,7 @@ void ll_cl_remove(struct file *file, const struct lu_env *env)write_unlock (&fd->fd_lock); } -static int ll_io_read_page (const struct lu_env *env,struct cl_io *io, +int ll_io_read_page (const struct lu_env *env,struct cl_io *io,struct cl_page *page,struct file *file) {struct inode *inode =vvp_object_inode (page->cp_obj);
@@ -1153,6 +1153,7 @@ static int ll_io_read_page(const struct lu_env *env, struct cl_io *io,if (!rc)task_io_account_read (PAGE_SIZE * count); } +if (anchor && !cl_page_is_owned (page, io)) {/* have sent */ rc =cl_sync_io_wait (env, anchor,0 );
@@ -1174,10 +1175,9 @@ static int ll_io_read_page(const struct lu_env *env, struct cl_io *io,/* TODO: discard all pages until page reinit route is implemented */ cl_page_list_discard (env, io, &queue->c2_qin); -/* -* Unlock unsent pages in case of error. -*/ +/* Unlock unsent read pages in case of error. */ cl_page_list_disown (env, io, &queue->c2_qin); +cl_2queue_fini (env, queue);return rc;
@@ -1270,6 +1270,7 @@ int ll_readpage(struct file *file, struct page *vmpage)LASSERT (page->cp_type ==CPT_CACHEABLE );if (likely (!PageUptodate (vmpage))) {cl_page_assume (env, io, page); + result =ll_io_read_page (env, io, page, file); }else {/* Page from a non-object file. */
@@ -1283,28 +1284,3 @@ int ll_readpage(struct file *file, struct page *vmpage) }return result; } - -int ll_page_sync_io (const struct lu_env *env,struct cl_io *io, -struct cl_page *page,enum cl_req_type crt) -{ -struct cl_2queue *queue; -int result; - -LASSERT (io->ci_type ==CIT_READ || io->ci_type ==CIT_WRITE ); - - queue = &io->ci_queue; -cl_2queue_init_page (queue, page); - - result =cl_io_submit_sync (env, io, crt, queue,0 ); -LASSERT (cl_page_is_owned (page, io)); - -if (crt ==CRT_READ ) -/* -* in CRT_WRITE case page is left locked even in case of -* error. -*/ -cl_page_list_disown (env, io, &queue->c2_qin); -cl_2queue_fini (env, queue); - -return result; -}
fs/lustre/llite/rw26.c +54 -21
106 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 101/151 lustre: flr: comp-flags support when creating mirrors
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
This patch will allow flags to be set when creating mirrors. The flags are set to individual components therefore it would be flexible to flags based on the location of components. Also, 'stale' and 'prefer' flags are allowed to set to individual components later on.
This patch also revises component flags matching rules to allow flags and inverted flags to be set at the same time in the command lfs-find(1) and lfs-getstripe(1).
WC-bug-id: https://jira.whamcloud.com/browse/LU-10282
Lustre-commit: aa1646a8a1c2 ("LU-10282 flr: comp-flags support when creating mirrors")
Reviewed-on: https://review.whamcloud.com/30360
--- fs/lustre/lov/lov_object.c | 44 +++++++++++---------------------- include/uapi/linux/lustre/lustre_user.h | 19 +++++++------- 2 files changed, 24 insertions(+), 39 deletions(-)
fs/lustre/lov/lov_object.c +15 -29
@@ -611,6 +611,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev,unsigned int psz =0 ;unsigned int mirror_count;int result =0 ; +unsigned int seq;int i, j;LASSERT (lsm->lsm_entry_count >0 );
@@ -694,8 +695,8 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev,/* entries must be sorted by mirrors */ lre->lre_mirror_id = mirror_id; lre->lre_start = lre->lre_end = i; - lre->lre_preferred = (lle->lle_lsme->lsme_flags & -LCME_FL_PREFERRED ); + lre->lre_preferred = !!(lle->lle_lsme->lsme_flags & +LCME_FL_PREF_RD ); lre->lre_valid = lle->lle_valid; lre->lre_stale = !lle->lle_valid; }
@@ -734,45 +735,30 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev,if (psz >0 )cl_object_header (&lov->lo_cl)->coh_page_bufsize += psz; -/* decide the preferred mirror */ +/* +* Decide the preferred mirror. It uses the hash value of lov_object +* so that different clients would use different mirrors for read. +*/ mirror_count =0 ; - i =0 ; - lov_foreach_mirror_entry(lov, lre) { - i++; + seq =hash_long ((unsigned long )lov,8 ); +for (i =0 ; i < comp->lo_mirror_count; i++) { +unsigned int idx = (i + seq) % comp->lo_mirror_count; + + lre =lov_mirror_entry (lov, idx);if (lre->lre_stale)continue ; mirror_count++;/* valid mirror */ if (lre->lre_preferred || comp->lo_preferred_mirror <0 ) - comp->lo_preferred_mirror = i -1 ; + comp->lo_preferred_mirror = idx; } -if (mirror_count ==0 ) { +if (!mirror_count) {CDEBUG (D_INODE ,DFID " doesn't have any valid mirrors\n" ,PFID (lu_object_fid (lov2lu (lov)))); - result = -EINVAL ; - goto out; - } - -if (OBD_FAIL_CHECK (OBD_FAIL_FLR_RANDOM_PICK_MIRROR )) { -unsigned int seq; - -get_random_bytes (&seq,sizeof (seq)); - seq %= mirror_count; - - i =0 ; - lov_foreach_mirror_entry(lov, lre) { - i++; -if (lre->lre_stale) -continue ; - -if (!seq--) { - comp->lo_preferred_mirror = i -1 ; -break ; - } - } + comp->lo_preferred_mirror =0 ; }LASSERT (comp->lo_preferred_mirror >=0 );
include/uapi/linux/lustre/lustre_user.h +9 -10
@@ -463,17 +463,21 @@ static inline bool lu_extent_is_whole(struct lu_extent *e) }enum lov_comp_md_entry_flags { -LCME_FL_PRIMARY =0x00000001 ,/* Not used */ -LCME_FL_STALE =0x00000002 ,/* Not used */ -LCME_FL_OFFLINE =0x00000004 ,/* Not used */ -LCME_FL_PREFERRED =0x00000008 ,/* Not used */ +LCME_FL_STALE =0x00000001 ,/* FLR: stale data */ +LCME_FL_PREF_RD =0x00000002 ,/* FLR: preferred for reading */ +LCME_FL_PREF_WR =0x00000004 ,/* FLR: preferred for writing */ +LCME_FL_PREF_RW =LCME_FL_PREF_RD |LCME_FL_PREF_WR , +LCME_FL_OFFLINE =0x00000008 ,/* Not used */ LCME_FL_INIT =0x00000010 ,/* instantiated */ LCME_FL_NEG =0x80000000 ,/* used to indicate a negative * flag, won't be stored on disk */ }; -#define LCME_KNOWN_FLAGS (LCME_FL_NEG | LCME_FL_INIT) +#define LCME_KNOWN_FLAGS (LCME_FL_NEG | LCME_FL_INIT | LCME_FL_STALE | \ + LCME_FL_PREF_RW) +/* The flags can be set by users at mirror creation time. */ +#define LCME_USER_FLAGS (LCME_FL_PREF_RW)/* the highest bit in obdo::o_layout_version is used to mark if the file is * being resynced.
@@ -546,11 +550,6 @@ struct lov_comp_md_v1 {struct lov_comp_md_entry_v1 lcm_entries[0 ]; } __packed; -/* -* Maximum number of mirrors Lustre can support. -*/ -#define LUSTRE_MIRROR_COUNT_MAX 16 -static inline __u32 lov_user_md_size (__u16 stripes,__u32 lmm_magic) {if (stripes == (__u16)-1 )
Signature · 1 line
1.8.3.1
PATCH 102/151 lustre: libcfs: remove cfs_time_XXX_64 wrappers
In reply to James SimmonsIn an attempt to support 64 bit time handling before the linux kernel developed time64_t and ktime lustre attempted to use 64 bit jiffies with a libcfs abstraction. Lets remove these wrappers and replace them with modern 64 bit time support. The lustre code that used these wrappers needs time resolution at the seconds level so replace the code with time64_t handling.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9019
Lustre-commit: 2728de4db8c0 ("LU-9019 libcfs: remove cfs_time_XXX_64 wrappers")
Reviewed-on: https://review.whamcloud.com/30867
--- fs/lustre/include/lustre_import.h | 10 ++++---- fs/lustre/include/obd.h | 6 ++--- fs/lustre/include/obd_class.h | 14 +++++------ fs/lustre/llite/llite_internal.h | 2 +- fs/lustre/llite/llite_lib.c | 6 ++--- fs/lustre/llite/lproc_llite.c | 12 +++++----- fs/lustre/lmv/lmv_obd.c | 4 ++-- fs/lustre/lov/lov_obd.c | 4 ++-- fs/lustre/lov/lov_request.c | 4 ++-- fs/lustre/mdc/mdc_request.c | 4 ++-- fs/lustre/obdclass/genops.c | 2 +- fs/lustre/obdclass/lprocfs_status.c | 48 +++++++++++++++++++++++-------------- fs/lustre/osc/osc_request.c | 4 ++-- fs/lustre/ptlrpc/import.c | 10 ++++---- 14 files changed, 70 insertions(+), 60 deletions(-)
fs/lustre/include/lustre_import.h +5 -5
@@ -134,10 +134,10 @@ struct obd_import_conn {struct ptlrpc_connection *oic_conn;/** uuid of remote side */ struct obd_uuid oic_uuid; -/** -* Time (64 bit jiffies) of last connection attempt on this connection +/* +* Time (64 bit seconds) of last connection attempt on this connection */ -u64 oic_last_attempt; +time64_t oic_last_attempt; };/* state history */
@@ -251,8 +251,8 @@ struct obd_import {struct lustre_handle imp_remote_handle;/** When to perform next ping. time in jiffies. */ time64_t imp_next_ping; -/** When we last successfully connected. time in 64bit jiffies */ -u64 imp_last_success_conn; +/** When we last successfully connected. time in 64bit seconds */ +time64_t imp_last_success_conn;/** List of all possible connection for import. */ struct list_head imp_conn_list;
fs/lustre/include/obd.h +3 -3
@@ -587,7 +587,7 @@ struct obd_device {spinlock_t obd_dev_lock;/* protect OBD bitfield above */ spinlock_t obd_osfs_lock;struct obd_statfs obd_osfs;/* locked by obd_osfs_lock */ -u64 obd_osfs_age; +time64_t obd_osfs_age;u64 obd_last_committed;struct mutex obd_dev_mutex;struct lvfs_run_ctxt obd_lvfs_ctxt;
@@ -850,9 +850,9 @@ struct obd_ops {* about this. */ int (*statfs)(const struct lu_env *,struct obd_export *exp, -struct obd_statfs *osfs,u64 max_age,u32 flags); +struct obd_statfs *osfs,time64_t max_age,u32 flags);int (*statfs_async)(struct obd_export *exp,struct obd_info *oinfo, -u64 max_age,struct ptlrpc_request_set *set); +time64_t max_age,struct ptlrpc_request_set *set);int (*create)(const struct lu_env *env,struct obd_export *exp,struct obdo *oa); int (*destroy)(const struct lu_env *env, struct obd_export *exp,
fs/lustre/include/obd_class.h +7 -7
@@ -874,7 +874,7 @@ static inline int obd_destroy_export(struct obd_export *exp)*/ static inline int obd_statfs_async (struct obd_export *exp,struct obd_info *oinfo, -u64 max_age, +time64_t max_age,struct ptlrpc_request_set *rqset) {int rc =0 ;
@@ -889,9 +889,9 @@ static inline int obd_statfs_async(struct obd_export *exp,return -EOPNOTSUPP ; } -CDEBUG (D_SUPER ,"%s: osfs %p age %llu, max_age %llu\n" , +CDEBUG (D_SUPER ,"%s: osfs %p age %lld, max_age %lld\n" , obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age); -if (time_before64 (obd->obd_osfs_age, max_age)) { +if (obd->obd_osfs_age < max_age) { rc =OBP (obd, statfs_async)(exp, oinfo, max_age, rqset); }else { CDEBUG(D_SUPER,
@@ -915,7 +915,7 @@ static inline int obd_statfs_async(struct obd_export *exp,* target. Use a value of "jiffies + HZ" to guarantee freshness. */ static inline int obd_statfs (const struct lu_env *env,struct obd_export *exp, -struct obd_statfs *osfs,u64 max_age, +struct obd_statfs *osfs,time64_t max_age,u32 flags) {struct obd_device *obd = exp->exp_obd;
@@ -929,14 +929,14 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp,return -EOPNOTSUPP ; } -CDEBUG (D_SUPER ,"osfs %llu, max_age %llu\n" , +CDEBUG (D_SUPER ,"osfs %lld, max_age %lld\n" , obd->obd_osfs_age, max_age); -if (time_before64 (obd->obd_osfs_age, max_age)) { +if (obd->obd_osfs_age < max_age) { rc =OBP (obd, statfs)(env, exp, osfs, max_age, flags);if (rc ==0 ) {spin_lock (&obd->obd_osfs_lock);memcpy (&obd->obd_osfs, osfs,sizeof (obd->obd_osfs)); - obd->obd_osfs_age =get_jiffies_64 (); + obd->obd_osfs_age =ktime_get_seconds ();spin_unlock (&obd->obd_osfs_lock); } }else {
fs/lustre/llite/llite_internal.h +1 -1
@@ -878,7 +878,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr,int ll_setattr (struct dentry *de,struct iattr *attr);int ll_statfs (struct dentry *de,struct kstatfs *sfs);int ll_statfs_internal (struct ll_sb_info *sbi,struct obd_statfs *osfs, -u64 max_age,u32 flags); +time64_t max_age,__u32 flags);int ll_update_inode (struct inode *inode,struct lustre_md *md);void ll_update_inode_flags (struct inode *inode,int ext_flags);int ll_read_inode2 (struct inode *inode,void *opaque);
fs/lustre/llite/llite_lib.c +3 -3
@@ -288,7 +288,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)* available */ err =obd_statfs (NULL , sbi->ll_md_exp, osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_FOR_MDT0 );if (err) goto out_md_fid;
@@ -1716,7 +1716,7 @@ int ll_setattr(struct dentry *de, struct iattr *attr) }int ll_statfs_internal (struct ll_sb_info *sbi,struct obd_statfs *osfs, -u64 max_age,u32 flags) +time64_t max_age,u32 flags) {struct obd_statfs obd_osfs;int rc;
@@ -1775,7 +1775,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs)/* Some amount of caching on the client is allowed */ rc =ll_statfs_internal (ll_s2sbi (sb), &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,0 );if (rc)return rc;
fs/lustre/llite/lproc_llite.c +6 -6
@@ -141,7 +141,7 @@ static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr,int rc; rc =ll_statfs_internal (sbi, &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -193,7 +193,7 @@ static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr,int rc; rc =ll_statfs_internal (sbi, &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -219,7 +219,7 @@ static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr,int rc; rc =ll_statfs_internal (sbi, &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -245,7 +245,7 @@ static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr,int rc; rc =ll_statfs_internal (sbi, &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -269,7 +269,7 @@ static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr,int rc; rc =ll_statfs_internal (sbi, &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -287,7 +287,7 @@ static ssize_t filesfree_show(struct kobject *kobj, struct attribute *attr,int rc; rc =ll_statfs_internal (sbi, &osfs, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,OBD_STATFS_NODELAY );if (rc)return rc;
fs/lustre/lmv/lmv_obd.c +2 -2
@@ -893,7 +893,7 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,return -EFAULT ; rc =obd_statfs (NULL , tgt->ltd_exp, &stat_buf, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,0 );if (rc)return rc;
@@ -1326,7 +1326,7 @@ static int lmv_process_config(struct obd_device *obd, u32 len, void *buf) }static int lmv_statfs (const struct lu_env *env,struct obd_export *exp, -struct obd_statfs *osfs,u64 max_age,u32 flags) +struct obd_statfs *osfs,time64_t max_age,u32 flags) {struct obd_device *obd =class_exp2obd (exp);struct lmv_obd *lmv = &obd->u.lmv;
fs/lustre/lov/lov_obd.c +2 -2
@@ -915,7 +915,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg, }static int lov_statfs (const struct lu_env *env,struct obd_export *exp, -struct obd_statfs *osfs,u64 max_age,u32 flags) +struct obd_statfs *osfs,time64_t max_age,u32 flags) {struct obd_device *obd =class_exp2obd (exp);struct lov_obd *lov = &obd->u.lov;
@@ -1001,7 +1001,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,/* got statfs data */ rc =obd_statfs (NULL , lov->lov_tgts[index]->ltd_exp, &stat_buf, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , flags);if (rc)return rc;
fs/lustre/lov/lov_request.c +2 -2
@@ -158,7 +158,7 @@ static int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,spin_lock (&obd->obd_osfs_lock);memcpy (&obd->obd_osfs, osfs,sizeof (*osfs)); - obd->obd_osfs_age =get_jiffies_64 (); + obd->obd_osfs_age =ktime_get_seconds ();spin_unlock (&obd->obd_osfs_lock);return 0 ; }
@@ -275,7 +275,7 @@ static int cb_statfs_update(void *cookie, int rc)spin_lock (&tgtobd->obd_osfs_lock);memcpy (&tgtobd->obd_osfs, lov_sfs,sizeof (*lov_sfs));if ((oinfo->oi_flags &OBD_STATFS_FROM_CACHE ) ==0 ) - tgtobd->obd_osfs_age =get_jiffies_64 (); + tgtobd->obd_osfs_age =ktime_get_seconds ();spin_unlock (&tgtobd->obd_osfs_lock); out_update:
fs/lustre/mdc/mdc_request.c +2 -2
@@ -1439,7 +1439,7 @@ static int mdc_read_page(struct obd_export *exp, struct md_op_data *op_data,static int mdc_statfs (const struct lu_env *env,struct obd_export *exp,struct obd_statfs *osfs, -u64 max_age,u32 flags) +time64_t max_age,u32 flags) {struct obd_device *obd =class_exp2obd (exp);struct ptlrpc_request *req;
@@ -2002,7 +2002,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len, } rc =mdc_statfs (NULL , obd->obd_self_export, &stat_buf, -get_jiffies_64 () -OBD_STATFS_CACHE_SECONDS *HZ , +ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ,0 );if (rc !=0 ) goto out;
fs/lustre/obdclass/genops.c +1 -1
@@ -307,7 +307,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name,/* newdev->obd_osfs_age must be set to a value in the distant * past to guarantee a fresh statfs is fetched on mount. */ - newdev->obd_osfs_age =get_jiffies_64 () -1000 *HZ ; + newdev->obd_osfs_age =ktime_get_seconds () -1000 ;/* XXX belongs in setup not attach */ init_rwsem (&newdev->obd_observer_link_sem);
fs/lustre/obdclass/lprocfs_status.c +30 -18
84 lines not on this page · raw message
fs/lustre/osc/osc_request.c +2 -2
@@ -2471,7 +2471,7 @@ static int osc_statfs_interpret(const struct lu_env *env, }static int osc_statfs_async (struct obd_export *exp, -struct obd_info *oinfo,u64 max_age, +struct obd_info *oinfo,time64_t max_age,struct ptlrpc_request_set *rqset) {struct obd_device *obd =class_exp2obd (exp);
@@ -2515,7 +2515,7 @@ static int osc_statfs_async(struct obd_export *exp, }static int osc_statfs (const struct lu_env *env,struct obd_export *exp, -struct obd_statfs *osfs,u64 max_age,u32 flags) +struct obd_statfs *osfs,time64_t max_age,u32 flags) {struct obd_device *obd =class_exp2obd (exp);struct obd_statfs *msfs;
fs/lustre/ptlrpc/import.c +4 -6
@@ -462,7 +462,7 @@ static int import_select_connection(struct obd_import *imp) }list_for_each_entry (conn, &imp->imp_conn_list, oic_item) { -CDEBUG (D_HA ,"%s: connect to NID %s last attempt %llu\n" , +CDEBUG (D_HA ,"%s: connect to NID %s last attempt %lld\n" , imp->imp_obd->obd_name,libcfs_nid2str (conn->oic_conn->c_peer.nid), conn->oic_last_attempt);
@@ -471,8 +471,7 @@ static int import_select_connection(struct obd_import *imp)* the last successful attempt, go with this one */ if ((conn->oic_last_attempt ==0 ) || -time_before_eq64 (conn->oic_last_attempt, - imp->imp_last_success_conn)) { + conn->oic_last_attempt <= imp->imp_last_success_conn) { imp_conn = conn; tried_all =0 ;break ;
@@ -484,8 +483,7 @@ static int import_select_connection(struct obd_import *imp)*/ if (!imp_conn) imp_conn = conn; -else if (time_before64 (conn->oic_last_attempt, - imp_conn->oic_last_attempt)) +else if (imp_conn->oic_last_attempt > conn->oic_last_attempt) imp_conn = conn; }
@@ -517,7 +515,7 @@ static int import_select_connection(struct obd_import *imp) imp->imp_obd->obd_name, at_get(at)); } - imp_conn->oic_last_attempt =get_jiffies_64 (); + imp_conn->oic_last_attempt =ktime_get_seconds ();/* switch connection, don't mind if it's same as the current one */ ptlrpc_connection_put (imp->imp_connection);
Signature · 1 line
1.8.3.1
PATCH 103/151 lustre: address issues raised by gcc7
In reply to James SimmonsStarting with gcc version 7 several platforms have enabled new flags to report potential problems when compling code. For lustre much of the reported problems deal with potential buffer overruns. Address these issues in struct lustre_sb_info and provide info about the fields.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9934
Linux-commit: 61743b8867268 ("LU-9934 build: address issues raised by gcc7")
Reviewed-on: https://review.whamcloud.com/30376
--- fs/lustre/include/lustre_disk.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/lustre/include/lustre_disk.h +4 -2
@@ -125,8 +125,10 @@ struct lustre_sb_info {atomic_t lsi_mounts;/* references to the srv_mnt */ struct kobject *lsi_kobj;char lsi_svname[MTI_NAME_MAXLEN ]; -char lsi_osd_obdname[64 ]; -char lsi_osd_uuid[64 ]; +/* lsi_osd_obdname format = 'lsi->ls_svname'-osd */ +char lsi_osd_obdname[MTI_NAME_MAXLEN +4 ]; +/* lsi_osd_uuid format = 'lsi->ls_osd_obdname'_UUID */ +char lsi_osd_uuid[MTI_NAME_MAXLEN +9 ];struct obd_export *lsi_osd_exp;char lsi_osd_type[16 ];char lsi_fstype[16 ];
Signature · 1 line
1.8.3.1
PATCH 104/151 lustre: lov: fill no-extent fiemap on object with no stripe.
In reply to James SimmonsFrom: Dominique Martinet <[email protected]>
This is useful for cp of large sparse files with no stripe info, as cp relies on fiemap to detect what to read.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10405
Lustre-commit: 113fa79b7dc9 ("LU-10405 lov: fill no-extent fiemap on object with no stripe")
Reviewed-on: https://review.whamcloud.com/30591
--- fs/lustre/lov/lov_object.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
fs/lustre/lov/lov_object.c +5 -2
@@ -1774,8 +1774,11 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj,struct fiemap_state fs = {NULL }; lsm =lov_lsm_addref (cl2lov (obj)); -if (!lsm) -return -ENODATA ; +if (!lsm) { +/* no extent: there is no object for mapping */ + fiemap->fm_mapped_extents =0 ; +return 0 ; + }if (!(fiemap->fm_flags &FIEMAP_FLAG_DEVICE_ORDER )) {/**
Signature · 1 line
1.8.3.1
PATCH 105/151 lustre: ptlrpc: allow to limit number of service's rqbds
In reply to James SimmonsFrom: Bruno Faccini <[email protected]>
This patch provides a way to limit the number of rqbds per service.
This should help to avoid OOM during heavy clients requests load, like during target failover/recovery for thousands of Clients.
This change has been required, even after first patch for LU-9372 (ptlrpc: drain "ptlrpc_request_buffer_desc" objects) which already allowed to drain unused rqbds previously allocated during heavy load, but was not efficient during too long period of load.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9372
Lustre-commit: d9e57a765e73 ("LU-9372 ptlrpc: allow to limit number of service's rqbds")
Reviewed-on: https://review.whamcloud.com/29064
WC-bug-id: https://jira.whamcloud.com/browse/LU-10603
Lustre-commit: 3542f9780bf4 ("LU-10603 ptlrpc: export req_buffers_max via procfs")
Reviewed-on: https://review.whamcloud.com/31162
WC-bug-id: https://jira.whamcloud.com/browse/LU-10803
Lustre-commit: c11c61a82d66 ("LU-10803 ptlrpc: fix req_buffers_max and req_history_max setting")
Reviewed-on: https://review.whamcloud.com/31622
--- fs/lustre/include/lustre_net.h | 2 ++ fs/lustre/ptlrpc/lproc_ptlrpc.c | 52 ++++++++++++++++++++++++++++++++++++++--- fs/lustre/ptlrpc/service.c | 14 ++++++++--- 3 files changed, 62 insertions(+), 6 deletions(-)
fs/lustre/include/lustre_net.h +2 -0
@@ -1482,6 +1482,8 @@ struct ptlrpc_service {/** under unregister_service */ unsigned srv_is_stopping:1; +/** max # request buffers */ +int srv_nrqbds_max;/** max # request buffers in history per partition */ int srv_hist_nrqbds_cpt_max;/** number of CPTs this service bound on */
fs/lustre/ptlrpc/lproc_ptlrpc.c +49 -3
71 lines not on this page · raw message
fs/lustre/ptlrpc/service.c +11 -3
@@ -148,7 +148,10 @@/* NB: another thread might have recycled enough rqbds, we * need to make sure it wouldn't over-allocate, see LU-1212. */ -if (svcpt->scp_nrqbds_posted >= svc->srv_nbuf_per_group) +if (test_req_buffer_pressure || + svcpt->scp_nrqbds_posted >= svc->srv_nbuf_per_group || + (svc->srv_nrqbds_max !=0 && + svcpt->scp_nrqbds_total > svc->srv_nrqbds_max))break ; rqbd =ptlrpc_alloc_rqbd (svcpt);
@@ -622,6 +625,9 @@ struct ptlrpc_service */* buffer configuration */ service->srv_nbuf_per_group = test_req_buffer_pressure ?1 : conf->psc_buf.bc_nbufs; +/* do not limit max number of rqbds by default */ + service->srv_nrqbds_max =0 ; + service->srv_max_req_size = conf->psc_buf.bc_req_max_size +SPTLRPC_MAX_PAYLOAD ; service->srv_buf_size = conf->psc_buf.bc_buf_size;
@@ -807,8 +813,10 @@ static void ptlrpc_server_drop_request(struct ptlrpc_request *req)*/ LASSERT (atomic_read (&rqbd->rqbd_req.rq_refcount) ==0 ); -if (svcpt->scp_nrqbds_posted >= svc->srv_nbuf_per_group && - !test_req_buffer_pressure) { +if (svcpt->scp_nrqbds_posted >= svc->srv_nbuf_per_group || + (svc->srv_nrqbds_max !=0 && + svcpt->scp_nrqbds_total > svc->srv_nrqbds_max) || + test_req_buffer_pressure) {/* like in ptlrpc_free_rqbd() */ svcpt->scp_nrqbds_total--;kvfree (rqbd->rqbd_buffer);
Signature · 1 line
1.8.3.1
PATCH 106/151 lnet: ensure peer put back on dc request queue
In reply to James SimmonsFrom: Bruno Faccini <[email protected]>
Upon async PUT request received from peer already in discovery process, lnet_peer_push_event() was not handling the case where peer could be on working/ln_dc_working queue. This could lead for peer not to be re-dsicovered as expected, but left on working queue and to be finally timed-out.
Also ensure that peer will not be put back on request queue by event handler if discovery is already completed.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10123
Lustre-commit: d0185dd43394 ("LU-10123 lnet: ensure peer put back on dc request queue")
Reviewed-on: https://review.whamcloud.com/30147
--- net/lnet/lnet/peer.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
net/lnet/lnet/peer.c +11 -4
@@ -1983,13 +1983,16 @@ void lnet_peer_push_event(struct lnet_event *ev) out:/* -* Queue the peer for discovery, and wake the discovery thread -* if the peer was already queued, because its status changed. +* Queue the peer for discovery if not done, force it on the request +* queue and wake the discovery thread if the peer was already queued, +* because its status changed. */ spin_unlock (&lp->lp_lock);lnet_net_lock (LNET_LOCK_EX ); -if (lnet_peer_queue_for_discovery (lp)) +if (!lnet_peer_is_uptodate (lp) &&lnet_peer_queue_for_discovery (lp)) { +list_move (&lp->lp_dc_list, &the_lnet.ln_dc_request);wake_up (&the_lnet.ln_dc_waitq); + }/* Drop refcount from lookup */ lnet_peer_decref_locked (lp);lnet_net_unlock (LNET_LOCK_EX );
@@ -2348,7 +2351,11 @@ static void lnet_discovery_event_handler(struct lnet_event *event)lnet_ping_buffer_decref (pbuf);lnet_peer_decref_locked (lp); } -if (rc ==LNET_REDISCOVER_PEER ) { + +/* Put peer back at end of request queue, if discovery not already +* done +*/ +if (rc ==LNET_REDISCOVER_PEER && !lnet_peer_is_uptodate (lp)) {list_move_tail (&lp->lp_dc_list, &the_lnet.ln_dc_request);wake_up (&the_lnet.ln_dc_waitq); }
Signature · 1 line
1.8.3.1
PATCH 107/151 lustre: recovery: support setstripe replay
In reply to James SimmonsFrom: Lai Siyao <[email protected]>
Regular file open will always reserve space for LOV ea, which is used to store user specified lov_user_md, or lov_mds_md for replay, but if this open is the first open in 'lfs setstripe', it doesn't have lov_user_md specified, or lov_mds_md for replay because O_LOV_DELAY_CREATE is set, but MDT will treat the EA field in the request as valid one, so fails in magic check in this open replay.
This patch contains the fix for the client side.
1. client doesn't reserve space for LOV ea in open(O_LOV_DELAY_CREATE), this change is not necessary, but to make clean of the code.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10155
Lustre-commit: 3a0a50f44f68 ("LU-10155 recovery: support setstripe replay")
Reviewed-on: https://review.whamcloud.com/30704
--- fs/lustre/mdc/mdc_locks.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
fs/lustre/mdc/mdc_locks.c +8 -2
@@ -297,8 +297,14 @@ static int mdc_save_lovea(struct ptlrpc_request *req,req_capsule_set_size (&req->rq_pill, &RMF_NAME ,RCL_CLIENT , op_data->op_namelen +1 ); -req_capsule_set_size (&req->rq_pill, &RMF_EADATA ,RCL_CLIENT , -max (lmmsize, obddev->u.cli.cl_default_mds_easize)); +if (cl_is_lov_delay_create (it->it_flags)) { +/* open(O_LOV_DELAY_CREATE) won't pack lmm */ +LASSERT (lmmsize ==0 ); +req_capsule_set_size (&req->rq_pill, &RMF_EADATA ,RCL_CLIENT ,0 ); + }else { +req_capsule_set_size (&req->rq_pill, &RMF_EADATA ,RCL_CLIENT , +max (lmmsize, obddev->u.cli.cl_default_mds_easize)); + } req_capsule_set_size(&req->rq_pill, &RMF_FILE_SECCTX_NAME, RCL_CLIENT, op_data->op_file_secctx_name ?
Signature · 1 line
1.8.3.1
PATCH 108/151 lustre: lustre: move LA_* flags to lustre_user.h
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
The LA_* flags are written to disk as part of the ChangeLog records in mdd_attr_set_changelog(), which means they are now part of the on-disk and network protocol, and cannot be changed (at least not the first 12 bits that are written).
They need to be moved to lustre_user.h.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10485
Lustre-commit: 2b14e545001b ("LU-10485 lustre: move LA_* flags to lustre_user.h")
Reviewed-on: https://review.whamcloud.com/30825
--- fs/lustre/include/lu_object.h | 19 ------------------- include/uapi/linux/lustre/lustre_user.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 19 deletions(-)
fs/lustre/include/lu_object.h +0 -19
@@ -425,25 +425,6 @@ struct lu_attr {u64 la_valid; }; -/** Bit-mask of valid attributes */ -enum la_valid { -LA_ATIME =1 <<0 , -LA_MTIME =1 <<1 , -LA_CTIME =1 <<2 , -LA_SIZE =1 <<3 , -LA_MODE =1 <<4 , -LA_UID =1 <<5 , -LA_GID =1 <<6 , -LA_BLOCKS =1 <<7 , -LA_TYPE =1 <<8 , -LA_FLAGS =1 <<9 , -LA_NLINK =1 <<10 , -LA_RDEV =1 <<11 , -LA_BLKSIZE =1 <<12 , -LA_KILL_SUID =1 <<13 , -LA_KILL_SGID =1 <<14 , -}; -/** * Layer in the layered object. */
include/uapi/linux/lustre/lustre_user.h +29 -0
@@ -837,6 +837,35 @@ struct lustre_swap_layouts {__u64 sl_dv2; }; +/** Bit-mask of valid attributes */ +/* The LA_* flags are written to disk as part of the ChangeLog records +* so they are part of the on-disk and network protocol, and cannot be changed. +* Only the first 12 bits are currently saved. +*/ +enum la_valid { +LA_ATIME =1 <<0 , +LA_MTIME =1 <<1 , +LA_CTIME =1 <<2 , +LA_SIZE =1 <<3 , +LA_MODE =1 <<4 , +LA_UID =1 <<5 , +LA_GID =1 <<6 , +LA_BLOCKS =1 <<7 , +LA_TYPE =1 <<8 , +LA_FLAGS =1 <<9 , +LA_NLINK =1 <<10 , +LA_RDEV =1 <<11 , +LA_BLKSIZE =1 <<12 , +LA_KILL_SUID =1 <<13 , +LA_KILL_SGID =1 <<14 , +LA_PROJID =1 <<15 , +LA_LAYOUT_VERSION =1 <<16 , +/** +* Attributes must be transmitted to OST objects +*/ +LA_REMOTE_ATTR_SET = (LA_UID |LA_GID |LA_PROJID |LA_LAYOUT_VERSION ) +}; +/********* Changelogs **********/ /** Changelog record types */ enum changelog_rec_type {
Signature · 1 line
1.8.3.1
PATCH 109/151 lustre: flr: revise lease API
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
Introduce new user land API LL_LEASE_LAYOUT_MERGE which allows direct control of the bias. Remove special MERGE_LAYOUTS_CLOSE. Instead always use SWAP_LAYOUTS_CLOSE which simplifies the code handling the layout swap on file close.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10418
Lustre-commit: 8f1c7c1e44a4 ("LU-10418 flr: revise lease API")
Reviewed-on: https://review.whamcloud.com/30363
--- fs/lustre/llite/file.c | 74 +++++++++++++++++++++++---------- include/uapi/linux/lustre/lustre_user.h | 3 +- 2 files changed, 53 insertions(+), 24 deletions(-)
fs/lustre/llite/file.c +52 -22
@@ -970,12 +970,10 @@ static int ll_check_swap_layouts_validity(struct inode *inode1, }static int ll_swap_layouts_close (struct obd_client_handle *och, -struct inode *inode,struct inode *inode2, -int intent) +struct inode *inode,struct inode *inode2) {const struct lu_fid *fid1 =ll_inode2fid (inode);const struct lu_fid *fid2; -enum mds_op_bias bias;int rc; CDEBUG(D_INODE, "%s: biased close of file " DFID "\n",
@@ -994,24 +992,13 @@ static int ll_swap_layouts_close(struct obd_client_handle *och, goto out_free_och; } -switch (intent) { -case SWAP_LAYOUTS_CLOSE : - bias =MDS_CLOSE_LAYOUT_SWAP ; -break ; -case MERGE_LAYOUTS_CLOSE : - bias =MDS_CLOSE_LAYOUT_MERGE ; -break ; -default : - rc = -EOPNOTSUPP ; - goto out_free_och; - } -/* * Close the file and {swap,merge} layouts between inode & inode2. * NB: lease lock handle is released in mdc_close_layout_swap_pack() * because we still need it to pack l_remote_handle to MDT. */ - rc =ll_close_inode_openhandle (inode, och, bias, inode2); + rc =ll_close_inode_openhandle (inode, och,MDS_CLOSE_LAYOUT_SWAP , + inode2); och =NULL ;/* freed in ll_close_inode_openhandle() */
@@ -2675,6 +2662,7 @@ static long ll_file_unlock_lease(struct file *file, struct ll_ioc_lease *ioc,bool lease_broken;fmode_t fmode =0 ;enum mds_op_bias bias =0 ; +struct file *layout_file =NULL ;void *data =NULL ;size_t data_size =0 ;long rc;
@@ -2693,7 +2681,8 @@ static long ll_file_unlock_lease(struct file *file, struct ll_ioc_lease *ioc, fmode = och->och_flags; -if (ioc->lil_flags &LL_LEASE_RESYNC_DONE ) { +switch (ioc->lil_flags) { +case LL_LEASE_RESYNC_DONE :if (ioc->lil_count >IOC_IDS_MAX ) { rc = -EINVAL ; goto out;
@@ -2712,6 +2701,40 @@ static long ll_file_unlock_lease(struct file *file, struct ll_ioc_lease *ioc, } bias =MDS_CLOSE_RESYNC_DONE ; +break ; +case LL_LEASE_LAYOUT_MERGE : { +int fd; + +if (ioc->lil_count !=1 ) { + rc = -EINVAL ; + goto out; + } + + arg +=sizeof (*ioc); +if (copy_from_user (&fd, (void __user *)arg,sizeof (u32))) { + rc = -EFAULT ; + goto out; + } + + layout_file =fget (fd); +if (!layout_file) { + rc = -EBADF ; + goto out; + } + +if ((file->f_flags &O_ACCMODE ) ==O_RDONLY || + (layout_file->f_flags &O_ACCMODE ) ==O_RDONLY ) { + rc = -EPERM ; + goto out; + } + + data =file_inode (layout_file); + bias =MDS_CLOSE_LAYOUT_MERGE ; +break ; + } +default : +/* without close intent */ +break ; } rc =ll_lease_close_intent (och, inode, &lease_broken, bias, data);
@@ -2726,7 +2749,16 @@ static long ll_file_unlock_lease(struct file *file, struct ll_ioc_lease *ioc, fmode =0 ; out: -kfree (data); +switch (ioc->lil_flags) { +case LL_LEASE_RESYNC_DONE : +kfree (data); +break ; +case LL_LEASE_LAYOUT_MERGE : +if (layout_file) +fput (layout_file); +break ; + } +if (!rc) rc =ll_lease_type_from_fmode (fmode);return rc;
@@ -2847,7 +2879,6 @@ static long ll_file_set_lease(struct file *file, struct ll_ioc_lease *ioc,case LL_IOC_LOV_SWAP_LAYOUTS : {struct file *file2;struct lustre_swap_layouts lsl; -u64 intent;if (copy_from_user (&lsl, (char __user *)arg,sizeof (struct lustre_swap_layouts )))
@@ -2866,8 +2897,7 @@ static long ll_file_set_lease(struct file *file, struct ll_ioc_lease *ioc, goto out; } - intent = lsl.sl_flags &INTENT_LAYOUTS_CLOSE ; -if (intent) { +if (lsl.sl_flags &SWAP_LAYOUTS_CLOSE ) {struct obd_client_handle *och =NULL ;struct ll_inode_info *lli;struct inode *inode2;
@@ -2884,7 +2914,7 @@ static long ll_file_set_lease(struct file *file, struct ll_ioc_lease *ioc, goto out; } inode2 =file_inode (file2); - rc =ll_swap_layouts_close (och, inode, inode2, intent); + rc =ll_swap_layouts_close (och, inode, inode2); }else { rc =ll_swap_layouts (file, file2, &lsl); }
include/uapi/linux/lustre/lustre_user.h +1 -2
@@ -253,6 +253,7 @@ enum ll_lease_mode {enum ll_lease_flags {LL_LEASE_RESYNC =0x1 ,LL_LEASE_RESYNC_DONE =0x2 , +LL_LEASE_LAYOUT_MERGE =0x4 , };#define IOC_IDS_MAX 4096
@@ -824,8 +825,6 @@ struct if_quotactl {#define SWAP_LAYOUTS_KEEP_MTIME (1 << 2)#define SWAP_LAYOUTS_KEEP_ATIME (1 << 3)#define SWAP_LAYOUTS_CLOSE (1 << 4) -#define MERGE_LAYOUTS_CLOSE (1 << 5) -#define INTENT_LAYOUTS_CLOSE (SWAP_LAYOUTS_CLOSE | MERGE_LAYOUTS_CLOSE)/* Swap XATTR_NAME_HSM as well, only on the MDT so far */ #define SWAP_LAYOUTS_MDS_HSM (1 << 31)
Signature · 1 line
1.8.3.1
PATCH 110/151 lustre: idl: add PTLRPC definitions to enum
In reply to James SimmonsFrom: Andreas Dilger <[email protected]>
PTLRPC definitions to enums for cleanliness, and use them:
enum lustre_msg_version for LUSTRE_*_VERSION
enum lustre_msg_magic for LUSTRE_MSG_MAGIC_*
enum lustre_msghdr for MSGHDR_*
WC-bug-id: https://jira.whamcloud.com/browse/LU-6349
Lustre-commit: 0c9bb26fc4d9 ("LU-6349 idl: add PTLRPC definitions to enum")
Reviewed-on: https://review.whamcloud.com/30958
--- fs/lustre/include/lustre_import.h | 7 ++++-- fs/lustre/ptlrpc/pack_generic.c | 4 ++-- include/uapi/linux/lustre/lustre_idl.h | 44 +++++++++++++++++++--------------- 3 files changed, 32 insertions(+), 23 deletions(-)
fs/lustre/include/lustre_import.h +5 -2
@@ -308,8 +308,11 @@ struct obd_import {u64 imp_connect_flags2_orig;int imp_connect_error; -u32 imp_msg_magic; -u32 imp_msghdr_flags;/* adjusted based on server capability */ +enum lustre_msg_magic imp_msg_magic; +/* adjusted based on server +* capability +*/ +enum lustre_msghdr imp_msghdr_flags;struct imp_at imp_at;/* adaptive timeout data */ time64_t imp_last_reply_time;/* for health check */
fs/lustre/ptlrpc/pack_generic.c +2 -2
@@ -749,7 +749,7 @@ static inline struct ptlrpc_body *lustre_msg_ptlrpc_body(struct lustre_msg *msg) sizeof(struct ptlrpc_body_v2)); } -u32 lustre_msghdr_get_flags (struct lustre_msg *msg) +enum lustre_msghdr lustre_msghdr_get_flags (struct lustre_msg *msg) {switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 :
@@ -762,7 +762,7 @@ u32 lustre_msghdr_get_flags(struct lustre_msg *msg) }EXPORT_SYMBOL (lustre_msghdr_get_flags); -void lustre_msghdr_set_flags (struct lustre_msg *msg,u32 flags) +void lustre_msghdr_set_flags (struct lustre_msg *msg,enum lustre_msghdr flags) {switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 :
include/uapi/linux/lustre/lustre_idl.h +25 -19
64 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 111/151 lustre: obd: remove s2dhms time function
In reply to James SimmonsLustre created the s2dhms function to report a time lapse in a days:hour:minute:seconds format. This is over kill so remove s2dhms and just report the number of seconds that has lapse.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9019
Lustre-commit: 5ed38cca120f ("LU-9019 obd: remove s2dhms time function")
Reviewed-on: https://review.whamcloud.com/23269
--- fs/lustre/include/lprocfs_status.h | 19 ------------------- fs/lustre/obdclass/lprocfs_status.c | 19 ++++++++----------- fs/lustre/ptlrpc/lproc_ptlrpc.c | 8 +++----- 3 files changed, 11 insertions(+), 35 deletions(-)
fs/lustre/include/lprocfs_status.h +0 -19
@@ -348,25 +348,6 @@ enum {struct obd_device ;struct obd_histogram ; -/* Days / hours / mins / seconds format */ -struct dhms { -int d, h, m, s; -}; - -static inline void s2dhms (struct dhms *ts,time64_t secs64) -{ -unsigned int secs; - - ts->d =div_u64_rem (secs64,86400 , &secs); - ts->h = secs /3600 ; - secs = secs %3600 ; - ts->m = secs /60 ; - ts->s = secs %60 ; -} - -#define DHMS_FMT "%dd%dh%02dm%02ds" -#define DHMS_VARS (x) (x)->d, (x)->h, (x)->m, (x)->s -#define JOBSTATS_JOBID_VAR_MAX_LEN 20#define JOBSTATS_DISABLE "disable"#define JOBSTATS_PROCNAME_UID "procname_uid"
fs/lustre/obdclass/lprocfs_status.c +8 -11
@@ -943,7 +943,6 @@ int lprocfs_rd_timeouts(struct seq_file *m, void *data)struct obd_import *imp;unsigned int cur, worst;time64_t now, worstt; -struct dhms ts;int i, rc;LASSERT (obd);
@@ -956,16 +955,15 @@ int lprocfs_rd_timeouts(struct seq_file *m, void *data) now =ktime_get_real_seconds ();/* Some network health info for kicks */ -s2dhms (&ts, now - imp->imp_last_reply_time); -seq_printf (m,"%-10s : %lld, " DHMS_FMT " ago\n" , -"last reply" , (s64 )imp->imp_last_reply_time,DHMS_VARS (&ts)); +seq_printf (m,"%-10s : %lld, %llds ago\n" , +"last reply" , (s64 )imp->imp_last_reply_time, + (s64)(now - imp->imp_last_reply_time)); cur =at_get (&imp->imp_at.iat_net_latency); worst = imp->imp_at.iat_net_latency.at_worst_ever; worstt = imp->imp_at.iat_net_latency.at_worst_time; -s2dhms (&ts, now - worstt); -seq_printf (m,"%-10s : cur %3u worst %3u (at %lld, " DHMS_FMT " ago) " , -"network" , cur, worst, (s64 )worstt,DHMS_VARS (&ts)); +seq_printf (m,"%-10s : cur %3u worst %3u (at %lld, %llds ago) " , +"network" , cur, worst, (s64 )worstt, (s64)(now - worstt));lprocfs_at_hist_helper (m, &imp->imp_at.iat_net_latency);for (i =0 ; i <IMP_AT_MAX_PORTALS ; i++) {
@@ -974,10 +972,9 @@ int lprocfs_rd_timeouts(struct seq_file *m, void *data) cur =at_get (&imp->imp_at.iat_service_estimate[i]); worst = imp->imp_at.iat_service_estimate[i].at_worst_ever; worstt = imp->imp_at.iat_service_estimate[i].at_worst_time; -s2dhms (&ts, now - worstt); -seq_printf (m,"portal %-2d : cur %3u worst %3u (at %lld, " -DHMS_FMT " ago) " , imp->imp_at.iat_portal[i], - cur, worst, (s64 )worstt,DHMS_VARS (&ts)); +seq_printf (m,"portal %-2d : cur %3u worst %3u (at %lld, %llds ago) " , + imp->imp_at.iat_portal[i], cur, worst, (s64 )worstt, + (s64)(now - worstt));lprocfs_at_hist_helper (m, &imp->imp_at.iat_service_estimate[i]); }
fs/lustre/ptlrpc/lproc_ptlrpc.c +3 -5
@@ -1009,7 +1009,6 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n) {struct ptlrpc_service *svc = m->private;struct ptlrpc_service_part *svcpt; -struct dhms ts;time64_t worstt;unsigned int cur;unsigned int worst;
@@ -1025,11 +1024,10 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n) cur =at_get (&svcpt->scp_at_estimate); worst = svcpt->scp_at_estimate.at_worst_ever; worstt = svcpt->scp_at_estimate.at_worst_time; -s2dhms (&ts,ktime_get_real_seconds () - worstt); -seq_printf (m,"%10s : cur %3u worst %3u (at %lld, " -DHMS_FMT " ago) " ,"service" , - cur, worst, (s64 )worstt,DHMS_VARS (&ts)); +seq_printf (m,"%10s : cur %3u worst %3u (at %lld, %llds ago) " , +"service" , cur, worst, (s64 )worstt, + (s64)(ktime_get_real_seconds () - worstt));lprocfs_at_hist_helper (m, &svcpt->scp_at_estimate); }
Signature · 1 line
1.8.3.1
PATCH 112/151 lustre: mdc: add client NID to Changelogs entries
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
Add a new changelog extension named changelog_ext_nid to hold client's NID information.
NID info is added to every Changelog entry type except MARK, in the form 'nid=<nid>':
1 01CREAT 15:50:20.834838318 2017.07.24 0x0 t=[0x200000401:0x2:0x0] ef=0x3 u=500:500 nid=10.128.11.159 at tcp p=[0x200000007:0x1:0x0] fileA
WC-bug-id: https://jira.whamcloud.com/browse/LU-9727
Lustre-commit: d2629cfcabfa ("LU-9727 mdc: add client NID to Changelogs entries")
Reviewed-on: https://review.whamcloud.com/28213
--- fs/lustre/mdc/mdc_changelog.c | 3 ++- include/uapi/linux/lustre/lustre_idl.h | 3 ++- include/uapi/linux/lustre/lustre_user.h | 47 +++++++++++++++++++++++++++++++-- 3 files changed, 49 insertions(+), 4 deletions(-)
fs/lustre/mdc/mdc_changelog.c +2 -1
@@ -237,7 +237,8 @@ static int chlg_load(void *args)LLOG_F_IS_CAT |LLOG_F_EXT_JOBID |LLOG_F_EXT_EXTRA_FLAGS | -LLOG_F_EXT_X_UIDGID , +LLOG_F_EXT_X_UIDGID | +LLOG_F_EXT_X_NID , NULL);if (rc) { CERROR("%s: fail to init llog handle: rc = %d\n",
include/uapi/linux/lustre/lustre_idl.h +2 -1
@@ -2584,6 +2584,7 @@ enum llog_flag {LLOG_F_IS_FIXSIZE =0x10 ,LLOG_F_EXT_EXTRA_FLAGS =0x20 ,LLOG_F_EXT_X_UIDGID =0x40 , + LLOG_F_EXT_X_NID = 0x80,/* * Note: Flags covered by LLOG_F_EXT_MASK will be inherited from
@@ -2592,7 +2593,7 @@ enum llog_flag {* log record can be variable */ LLOG_F_EXT_MASK = LLOG_F_EXT_JOBID | LLOG_F_EXT_EXTRA_FLAGS | - LLOG_F_EXT_X_UIDGID, + LLOG_F_EXT_X_UIDGID | LLOG_F_EXT_X_NID, };/* On-disk header structure of each log object, stored in little endian order */
include/uapi/linux/lustre/lustre_user.h +45 -2
103 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 113/151 lustre: mdc: implement CL_OPEN for Changelogs
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
Record OPEN events in Changelogs, and add a new changelog extension named changelog_ext_openmode to hold open mode.
An OPEN changlog entry is in the form:
7 10OPEN 13:38:51.510728296 2017.07.25 0x242 t=[0x200000401:0x2:0x0] ef=0x7 u=500:500 nid=10.128.11.159 at tcp m=-w- By default, disable recording of OPEN events in Changelogs. Note that CREAT are still recorded even if OPEN are disabled.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9727
Lustre-commit: 21fb4d93a94e ("LU-9727 mdc: implement CL_OPEN for Changelogs")
Reviewed-on: https://review.whamcloud.com/28214
--- fs/lustre/mdc/mdc_changelog.c | 3 +- include/uapi/linux/lustre/lustre_idl.h | 52 ++---------------- include/uapi/linux/lustre/lustre_user.h | 95 +++++++++++++++++++++++++++++++-- 3 files changed, 97 insertions(+), 53 deletions(-)
fs/lustre/mdc/mdc_changelog.c +2 -1
@@ -238,7 +238,8 @@ static int chlg_load(void *args)LLOG_F_EXT_JOBID |LLOG_F_EXT_EXTRA_FLAGS |LLOG_F_EXT_X_UIDGID | -LLOG_F_EXT_X_NID , +LLOG_F_EXT_X_NID | +LLOG_F_EXT_X_OMODE , NULL);if (rc) { CERROR("%s: fail to init llog handle: rc = %d\n",
include/uapi/linux/lustre/lustre_idl.h +3 -49
70 lines not on this page · raw message
include/uapi/linux/lustre/lustre_user.h +92 -3
160 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 114/151 lustre: acl: prepare small buffer for ACL RPC reply
In reply to James SimmonsFrom: Fan Yong <[email protected]>
For most of files, their ACL entries are very limited, under such case, it is unnecessary to prepare very large reply buffer to hold unknown-sized ACL entries for the getattr/open RPCs. Instead, we can prepare some relative small buffer, such as the LUSTRE_POSIX_ACL_MAX_SIZE_OLD (260) bytes, that is equal to the ACL size before patch 64b2fad22a4eb4727315709e014d8f74c5a7f289. If the target file has too many ACL entries and exceeds the prepared reply buffer, then the MDT will reply -ERANGE failure to the client, and then the client can prepare more large buffer and try again. Since the file with large ACL is rare case, such retrying getattr/open RPCs will not affect the real performance too much.
The advantage is that it reduces the client side RAM pressure.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10513
Lustre-commit: 416e88938f68 ("LU-10513 acl: prepare small buffer for ACL RPC reply")
Reviewed-on: https://review.whamcloud.com/28116
--- fs/lustre/mdc/mdc_locks.c | 43 +++++++++++++++++++++-------- fs/lustre/mdc/mdc_request.c | 61 +++++++++++++++++++++++++++++++---------- fs/lustre/ptlrpc/pack_generic.c | 1 + fs/lustre/ptlrpc/sec.c | 1 + 4 files changed, 79 insertions(+), 27 deletions(-)
fs/lustre/mdc/mdc_locks.c +31 -12
@@ -44,6 +44,7 @@#include <lustre_net.h> #include <lustre_req_layout.h> #include <lustre_swab.h> +#include <lustre_acl.h> #include "mdc_internal.h"
@@ -244,7 +245,7 @@ static int mdc_save_lovea(struct ptlrpc_request *req,static struct ptlrpc_request *mdc_intent_open_pack (struct obd_export *exp,struct lookup_intent *it, -struct md_op_data *op_data) +struct md_op_data *op_data,u32 acl_bufsize) {struct ptlrpc_request *req;struct obd_device *obddev =class_exp2obd (exp);
@@ -333,8 +334,7 @@ static int mdc_save_lovea(struct ptlrpc_request *req,req_capsule_set_size (&req->rq_pill, &RMF_MDT_MD ,RCL_SERVER , obddev->u.cli.cl_max_mds_easize); -req_capsule_set_size (&req->rq_pill, &RMF_ACL ,RCL_SERVER , - req->rq_import->imp_connect_data.ocd_max_easize); +req_capsule_set_size (&req->rq_pill, &RMF_ACL ,RCL_SERVER , acl_bufsize);ptlrpc_request_set_replen (req);return req;
@@ -440,9 +440,9 @@ static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp,return req; } -static struct ptlrpc_request *mdc_intent_getattr_pack (struct obd_export *exp, -struct lookup_intent *it, -struct md_op_data *op_data) +static struct ptlrpc_request * +mdc_intent_getattr_pack (struct obd_export *exp,struct lookup_intent *it, +struct md_op_data *op_data,u32 acl_bufsize) {struct ptlrpc_request *req;struct obd_device *obddev =class_exp2obd (exp);
@@ -480,8 +480,7 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp,mdc_getattr_pack (req, valid, it->it_flags, op_data, easize);req_capsule_set_size (&req->rq_pill, &RMF_MDT_MD ,RCL_SERVER , easize); -req_capsule_set_size (&req->rq_pill, &RMF_ACL ,RCL_SERVER , - req->rq_import->imp_connect_data.ocd_max_easize); +req_capsule_set_size (&req->rq_pill, &RMF_ACL ,RCL_SERVER , acl_bufsize);ptlrpc_request_set_replen (req);return req; }
@@ -782,6 +781,8 @@ int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo,struct ldlm_res_id res_id;int generation, resends =0 ;struct ldlm_reply *lockrep; +struct obd_import *imp =class_exp2cliimp (exp); +u32 acl_bufsize;enum lvb_type lvb_type =LVB_T_NONE ;int rc;
@@ -804,6 +805,11 @@ int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo, } generation = obddev->u.cli.cl_import->imp_generation; +if (!it || (it->it_op & (IT_CREAT |IT_OPEN_CREAT ))) + acl_bufsize = imp->imp_connect_data.ocd_max_easize; +else + acl_bufsize =LUSTRE_POSIX_ACL_MAX_SIZE_OLD ; + resend: flags = saved_flags;if (!it) {
@@ -812,15 +818,15 @@ int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo, einfo->ei_type); res_id.name[3 ] =LDLM_FLOCK ; }else if (it->it_op &IT_OPEN ) { - req =mdc_intent_open_pack (exp, it, op_data); + req =mdc_intent_open_pack (exp, it, op_data, acl_bufsize); }else if (it->it_op &IT_UNLINK ) { req =mdc_intent_unlink_pack (exp, it, op_data); }else if (it->it_op & (IT_GETATTR |IT_LOOKUP )) { - req =mdc_intent_getattr_pack (exp, it, op_data); + req =mdc_intent_getattr_pack (exp, it, op_data, acl_bufsize); }else if (it->it_op &IT_READDIR ) { req =mdc_enqueue_pack (exp,0 ); }else if (it->it_op &IT_LAYOUT ) { -if (!imp_connect_lvb_type (class_exp2cliimp (exp))) +if (!imp_connect_lvb_type (imp))return -EOPNOTSUPP ; req =mdc_intent_layout_pack (exp, it, op_data); lvb_type =LVB_T_LAYOUT ;
@@ -926,6 +932,15 @@ int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo, } } +if ((int )lockrep->lock_policy_res2 == -ERANGE && + it->it_op & (IT_OPEN |IT_GETATTR |IT_LOOKUP ) && + acl_bufsize != imp->imp_connect_data.ocd_max_easize) { +mdc_clear_replay_flag (req, -ERANGE ); +ptlrpc_req_finished (req); + acl_bufsize = imp->imp_connect_data.ocd_max_easize; + goto resend; + } + rc =mdc_finish_enqueue (exp, req, einfo, it, lockh, rc);if (rc <0 ) {if (lustre_handle_is_used (lockh)) {
@@ -1284,7 +1299,11 @@ int mdc_intent_getattr_async(struct obd_export *exp, PFID(&op_data->op_fid1), ldlm_it2str(it->it_op), it->it_flags);fid_build_reg_res_name (&op_data->op_fid1, &res_id); - req =mdc_intent_getattr_pack (exp, it, op_data); +/* If the MDT return -ERANGE because of large ACL, then the sponsor +* of the async getattr RPC will handle that by itself. +*/ + req =mdc_intent_getattr_pack (exp, it, op_data, +LUSTRE_POSIX_ACL_MAX_SIZE_OLD );if (IS_ERR (req))return PTR_ERR (req);
fs/lustre/mdc/mdc_request.c +46 -15
121 lines not on this page · raw message
fs/lustre/ptlrpc/pack_generic.c +1 -0
@@ -164,6 +164,7 @@ u32 lustre_packed_msg_size(struct lustre_msg *msg)return 0 ; } } +EXPORT_SYMBOL (lustre_packed_msg_size);void lustre_init_msg_v2 (struct lustre_msg_v2 *msg,int count,u32 *lens,char **bufs)
fs/lustre/ptlrpc/sec.c +1 -0
@@ -1680,6 +1680,7 @@ void sptlrpc_cli_free_repbuf(struct ptlrpc_request *req) policy->sp_cops->free_repbuf (ctx->cc_sec, req); req->rq_repmsg =NULL ; } +EXPORT_SYMBOL (sptlrpc_cli_free_repbuf);static int sptlrpc_svc_install_rvs_ctx (struct obd_import *imp,struct ptlrpc_svc_ctx *ctx)
Signature · 1 line
1.8.3.1
PATCH 115/151 lnet: safe access in debug print
In reply to James SimmonsFrom: Amir Shehata <[email protected]>
Move debug print within the cpt lock to keep
peer access safe.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9919
Lustre-commit: 7c9ffeac1b69 ("LU-9919 lnet: safe access in debug print")
Reviewed-on: https://review.whamcloud.com/28771
--- net/lnet/lnet/lib-move.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
net/lnet/lnet/lib-move.c +4 -5
@@ -1422,11 +1422,10 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats, msg->msg_rtr_nid_param = rtr_nid; msg->msg_sending =0 ;list_add_tail (&msg->msg_list, &peer->lp_dc_pendq); -lnet_peer_ni_decref_locked (lpni); -lnet_net_unlock (cpt); -CDEBUG (D_NET ,"%s pending discovery\n" ,libcfs_nid2str (peer->lp_primary_nid)); +lnet_peer_ni_decref_locked (lpni); +lnet_net_unlock (cpt);return LNET_DC_WAIT ; }
@@ -1560,10 +1559,10 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats, best_lpni->lpni_net->net_id, cpt);/* If there is no best_ni we don't have a route */ if (!best_ni) { -lnet_net_unlock (cpt);CERROR ("no path to %s from net %s\n" ,libcfs_nid2str (best_lpni->lpni_nid),libcfs_net2str (best_lpni->lpni_net->net_id)); +lnet_net_unlock (cpt);return -EHOSTUNREACH ; } lpni = list_first_entry(&peer_net->lpn_peer_nis,
@@ -1718,9 +1717,9 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,* move onto the next peer_ni in the peer */ if (!best_gw) { -lnet_net_unlock (cpt);LCONSOLE_WARN ("No route to peer from %s\n" ,libcfs_nid2str (best_ni->ni_nid)); +lnet_net_unlock (cpt);return -EHOSTUNREACH ; }
Signature · 1 line
1.8.3.1
PATCH 116/151 lnet: Remove LASSERT on userspace data
In reply to James SimmonsFrom: Sonia Sharma <[email protected]>
If the net information is not provided while adding NI, it results in an LBUG. Remove the LASSERT on userspace input and handle it gracefully.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10554
Lustre-commit: 8059dbbe97a6 ("LU-10554 lnet: Remove LASSERT on userspace data")
Reviewed-on: https://review.whamcloud.com/31100
--- net/lnet/lnet/api-ni.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
net/lnet/lnet/api-ni.c +7 -3
@@ -1816,8 +1816,6 @@ static void lnet_push_target_fini(void)if (lnet_net_unique (net->net_id, &the_lnet.ln_nets, &net_l)) { lnd_type =LNET_NETTYP (net->net_id); -LASSERT (libcfs_isknown_lnd (lnd_type)); -mutex_lock (&the_lnet.ln_lnd_mutex); lnd =lnet_find_lnd_by_type (lnd_type);
@@ -2715,7 +2713,7 @@ int lnet_dyn_add_ni(struct lnet_ioctl_config_ni *conf)struct lnet_ni *ni;struct lnet_ioctl_config_lnd_tunables *tun =NULL ;int rc, i; -u32 net_id; +u32 net_id, lnd_type;/* get the tunables if they are available */ if (conf->lic_cfg_hdr.ioc_len >=
@@ -2729,6 +2727,12 @@ int lnet_dyn_add_ni(struct lnet_ioctl_config_ni *conf) tun); net_id =LNET_NIDNET (conf->lic_nid); + lnd_type =LNET_NETTYP (net_id); + +if (!libcfs_isknown_lnd (lnd_type)) { +CERROR ("No valid net and lnd information provided\n" ); +return -EINVAL ; + } net =lnet_net_alloc (net_id,NULL );if (!net)
Signature · 1 line
1.8.3.1
PATCH 117/151 lustre: flr: split a mirror from mirrored file
In reply to James SimmonsFrom: Bobi Jam <[email protected]>
Splits a mirror with mirror_id out of a mirrored file.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10420
Lustre-commit: 23b2d4781899 ("LU-10420 flr: split a mirror from mirrored file")
Reviewed-on: https://review.whamcloud.com/30388
--- fs/lustre/include/lu_object.h | 1 + fs/lustre/include/lustre_mds.h | 5 +++ fs/lustre/include/obd.h | 2 ++ fs/lustre/llite/file.c | 54 +++++++++++++++++++++++++++++++-- fs/lustre/llite/llite_lib.c | 3 +- fs/lustre/mdc/mdc_lib.c | 4 ++- include/uapi/linux/lustre/lustre_idl.h | 8 +++-- include/uapi/linux/lustre/lustre_user.h | 3 +- 8 files changed, 72 insertions(+), 8 deletions(-)
fs/lustre/include/lu_object.h +1 -0
@@ -847,6 +847,7 @@ enum lu_xattr_flags {LU_XATTR_REPLACE = (1 <<0 ),LU_XATTR_CREATE =BIT (1 ),LU_XATTR_MERGE =BIT (2 ), + LU_XATTR_SPLIT = BIT(3), };/** @} helpers */
fs/lustre/include/lustre_mds.h +5 -0
@@ -54,6 +54,11 @@ struct mds_group_info {int group; }; +struct md_rejig_data { +struct md_object *mrd_obj; +u16 mrd_mirror_id; +}; +#define MDD_OBD_NAME "mdd_obd"#define MDD_OBD_UUID "mdd_obd_uuid"
fs/lustre/include/obd.h +2 -0
@@ -780,6 +780,8 @@ struct md_op_data {u32 op_default_stripe_offset;u32 op_projid; + +u16 op_mirror_id; };struct md_callback {
fs/lustre/llite/file.c +52 -2
89 lines not on this page · raw message
fs/lustre/llite/llite_lib.c +1 -2
@@ -2427,11 +2427,10 @@ struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data, op_data->op_fsuid =from_kuid (&init_user_ns,current_fsuid ()); op_data->op_fsgid =from_kgid (&init_user_ns,current_fsgid ()); op_data->op_cap =current_cap (); + op_data->op_mds =0 ;if ((opc ==LUSTRE_OPC_CREATE ) && name &&filename_is_volatile (name, namelen, &op_data->op_mds)) op_data->op_bias |=MDS_CREATE_VOLATILE ; -else - op_data->op_mds =0 ; op_data->op_data = data;return op_data;
fs/lustre/mdc/mdc_lib.c +3 -1
@@ -451,7 +451,9 @@ static void mdc_close_intent_pack(struct ptlrpc_request *req, data->cd_data_version = op_data->op_data_version; data->cd_fid = op_data->op_fid2; -if (bias &MDS_CLOSE_RESYNC_DONE ) { +if (bias &MDS_CLOSE_LAYOUT_SPLIT ) { + data->cd_mirror_id = op_data->op_mirror_id; + }else if (bias &MDS_CLOSE_RESYNC_DONE ) {struct close_data_resync_done *sync = &data->cd_resync;BUILD_BUG_ON (sizeof (data->cd_resync) >sizeof (data->cd_reserved));
include/uapi/linux/lustre/lustre_idl.h +6 -2
@@ -1654,10 +1654,12 @@ enum mds_op_bias {MDS_CLOSE_LAYOUT_SWAP =1 <<14 ,MDS_CLOSE_LAYOUT_MERGE =1 <<15 ,MDS_CLOSE_RESYNC_DONE =1 <<16 , + MDS_CLOSE_LAYOUT_SPLIT = 1 << 17, }; -#define MDS_CLOSE_INTENT (MDS_HSM_RELEASE | MDS_CLOSE_LAYOUT_SWAP | \ - MDS_CLOSE_LAYOUT_MERGE | MDS_CLOSE_RESYNC_DONE) +#define MDS_CLOSE_INTENT (MDS_HSM_RELEASE | MDS_CLOSE_LAYOUT_SWAP | \ + MDS_CLOSE_LAYOUT_MERGE | MDS_CLOSE_LAYOUT_SPLIT | \ + MDS_CLOSE_RESYNC_DONE)/* instance of mdt_reint_rec */ struct mdt_rec_create {
@@ -2863,6 +2865,8 @@ struct close_data {union {__u64 cd_reserved[8 ];struct close_data_resync_done cd_resync; +/* split close */ +__u16 cd_mirror_id; }; };
include/uapi/linux/lustre/lustre_user.h +2 -1
@@ -254,6 +254,7 @@ enum ll_lease_flags {LL_LEASE_RESYNC =0x1 ,LL_LEASE_RESYNC_DONE =0x2 ,LL_LEASE_LAYOUT_MERGE =0x4 , + LL_LEASE_LAYOUT_SPLIT = 0x8, };#define IOC_IDS_MAX 4096
@@ -766,7 +767,7 @@ struct identity_downcall_data { };/* lustre volatile file support -* file name header: .^L^S^T^R:volatile" +* file name header: ".^L^S^T^R:volatile" */ #define LUSTRE_VOLATILE_HDR ".\x0c\x13\x14\x12:VOLATILE"#define LUSTRE_VOLATILE_HDR_LEN 14
Signature · 1 line
1.8.3.1
PATCH 118/151 lustre: llite: deny 2.10 clients to open mirrored files
In reply to James SimmonsFrom: Jinshan Xiong <[email protected]>
2.10 clients would manipulate mirrored layout as PFL layout, which would damage mirrored files.
This patch only allows mirrored files to be opened by clients who understand mirror layout.
It also fixes the problem that it should check OBD_CONNECT_FLAGS2 first before checking OBD_CONNECT2_XXX flags.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10286
Lustre-commit: 21e39775a0f4 ("LU-10286 llite: deny 2.10 clients to open mirrored files")
Reviewed-on: https://review.whamcloud.com/30957
--- fs/lustre/include/lustre_export.h | 9 ++++++++- fs/lustre/llite/llite_lib.c | 2 +- include/uapi/linux/lustre/lustre_idl.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-)
fs/lustre/include/lustre_export.h +8 -1
@@ -156,7 +156,9 @@ static inline u64 *exp_connect_flags2_ptr(struct obd_export *exp)static inline u64 exp_connect_flags2 (struct obd_export *exp) { -return *exp_connect_flags2_ptr (exp); +if (exp_connect_flags (exp) &OBD_CONNECT_FLAGS2 ) +return *exp_connect_flags2_ptr (exp); +return 0 ; }static inline int exp_max_brw_size (struct obd_export *exp)
@@ -262,6 +264,11 @@ static inline int exp_connect_lockahead(struct obd_export *exp)return !!(exp_connect_flags2 (exp) &OBD_CONNECT2_LOCKAHEAD ); } +static inline int exp_connect_flr (struct obd_export *exp) +{ +return !!(exp_connect_flags2 (exp) &OBD_CONNECT2_FLR ); +} +struct obd_export *class_conn2export (struct lustre_handle *conn);#define KKUC_CT_DATA_MAGIC 0x092013cea
fs/lustre/llite/llite_lib.c +1 -1
@@ -208,7 +208,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)OBD_CONNECT_GRANT_PARAM |OBD_CONNECT_SHORTIO |OBD_CONNECT_FLAGS2 ; - data->ocd_connect_flags2 =0 ; + data->ocd_connect_flags2 =OBD_CONNECT2_FLR ;if (sbi->ll_flags &LL_SBI_LRU_RESIZE ) data->ocd_connect_flags |=OBD_CONNECT_LRU_RESIZE ;
include/uapi/linux/lustre/lustre_idl.h +1 -0
@@ -791,6 +791,7 @@ struct ptlrpc_body_v2 {#define OBD_CONNECT2_LOCKAHEAD 0x2ULL/* ladvise lockahead * v2 */ +#define OBD_CONNECT2_FLR 0x20ULL/* FLR support */ /* XXX README XXX: * Please DO NOT add flag values here before first ensuring that this same
Signature · 1 line
1.8.3.1
PATCH 119/151 lustre: uapi: rename LCM_FL_NOT_FLR to LCM_FL_NONE
In reply to James SimmonsFrom: Andreas Dilger <[email protected]>
Having "lfs getstripe" print out "lcm_flags: not_flr" is not very useful, as the composite files may not relate to FLR (e.g. PFL). Rename "LCM_FL_NOT_FLR" to "LCM_FL_NONE" so it is more clear there are no composite flags on the layout.
Print out "0" for flags if no flags are set, to match old behaviour.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: fa15e5347c2e ("LU-9771 util: rename LCM_FL_NOT_FLR to LCM_FL_NONE")
Reviewed-on: https://review.whamcloud.com/31047
--- fs/lustre/lov/lov_cl_internal.h | 4 ++-- fs/lustre/lov/lov_object.c | 4 ++-- fs/lustre/ptlrpc/wiretest.c | 4 ++-- include/uapi/linux/lustre/lustre_user.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
fs/lustre/lov/lov_cl_internal.h +2 -2
@@ -354,14 +354,14 @@ static inline struct lov_stripe_md_entry *lov_lse(struct lov_object *lov, int i)static inline unsigned int lov_flr_state (const struct lov_object *lov) {if (lov->lo_type !=LLT_COMP ) -return LCM_FL_NOT_FLR ; +return LCM_FL_NONE ;return lov->u.composite.lo_flags &LCM_FL_FLR_MASK ; }static inline bool lov_is_flr (const struct lov_object *lov) { -return lov_flr_state (lov) !=LCM_FL_NOT_FLR ; +return lov_flr_state (lov) !=LCM_FL_NONE ; }static inline struct lov_layout_entry *lov_entry (struct lov_object *lov,int i)
fs/lustre/lov/lov_object.c +2 -2
@@ -629,7 +629,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, comp->lo_entry_count = lsm->lsm_entry_count; comp->lo_preferred_mirror =-1 ; -if (equi (flr_state ==LCM_FL_NOT_FLR , comp->lo_mirror_count >1 )) +if (equi (flr_state ==LCM_FL_NONE , comp->lo_mirror_count >1 ))return -EINVAL ; comp->lo_mirrors = kcalloc(comp->lo_mirror_count,
@@ -669,7 +669,7 @@ static int lov_init_composite(const struct lu_env *env, struct lov_device *dev, lle->lle_extent = &lle->lle_lsme->lsme_extent; lle->lle_valid = !(lle->lle_lsme->lsme_flags &LCME_FL_STALE ); -if (flr_state !=LCM_FL_NOT_FLR ) +if (flr_state !=LCM_FL_NONE ) mirror_id =mirror_id_of (lle->lle_lsme->lsme_id); lre = &comp->lo_mirrors[j];
fs/lustre/ptlrpc/wiretest.c +2 -2
@@ -1542,8 +1542,8 @@ void lustre_assert_wire_constants(void)LASSERTF ((int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_entries[0 ]) ==48 ,"found %lld\n" , (long long )(int )sizeof (((struct lov_comp_md_v1 *)0 )->lcm_entries[0 ]));BUILD_BUG_ON (LOV_MAGIC_COMP_V1 != (0x0BD60000 |0x0BD0 )); -LASSERTF (LCM_FL_NOT_FLR ==0 ,"found %lld\n" , - (long long )LCM_FL_NOT_FLR ); +LASSERTF (LCM_FL_NONE ==0 ,"found %lld\n" , + (long long )LCM_FL_NONE );LASSERTF (LCM_FL_RDONLY ==1 ,"found %lld\n" , (long long )LCM_FL_RDONLY ); LASSERTF(LCM_FL_WRITE_PENDING == 2, "found %lld\n",
include/uapi/linux/lustre/lustre_user.h +1 -1
@@ -530,7 +530,7 @@ static inline __u16 mirror_id_of(__u32 id)*/ enum lov_comp_md_flags {/* the least 2 bits are used by FLR to record file state */ -LCM_FL_NOT_FLR =0 , +LCM_FL_NONE =0 ,LCM_FL_RDONLY =1 ,LCM_FL_WRITE_PENDING =2 ,LCM_FL_SYNC_PENDING =3 ,
Signature · 1 line
1.8.3.1
PATCH 120/151 lustre: flr: layout truncate compatibility
In reply to James SimmonsFrom: Bobi Jam <[email protected]>
In PFL design, client issues [0, size) intent to MDS to instantiate objects in this extent. While in FLR design, the intent serves two
purposes: 1) make objects across [size, EOF) on other mirrors stale, and 2) instantiate objects in the chosen write mirror. And original FLR chose to use [size, EOF) as the extent of truncate write intent request.
This patch reverts the choice, and still uses [0, size) as the truncate write intent extent.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10438
Lustre-commit: 795ca68f1360 ("LU-10438 flr: layout truncate compatibility")
Reviewed-on: https://review.whamcloud.com/30786
--- fs/lustre/lov/lov_io.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
fs/lustre/lov/lov_io.c +16 -8
@@ -357,6 +357,16 @@ static int lov_io_mirror_init(struct lov_io *lio, struct lov_object *obj,PFID (lu_object_fid (lov2lu (obj))), lio->lis_pos, lio->lis_endpos); +if (cl_io_is_trunc (io)) { +/** +* for truncate, we uses [size, EOF) to judge whether +* a write intent needs to be send, but we need to +* restore the write extent to [0, size). +*/ + io->ci_write_intent.e_start =0 ; + io->ci_write_intent.e_end = + io->u.ci_setattr.sa_attr.lvb_size; + }/* stop cl_io_init() loop */ return 1 ; }
@@ -441,7 +451,6 @@ static int lov_io_mirror_init(struct lov_io *lio, struct lov_object *obj,static int lov_io_slice_init (struct lov_io *lio,struct lov_object *obj,struct cl_io *io) { -struct lu_extent ext;int index;int result =0 ;
@@ -538,20 +547,19 @@ static int lov_io_slice_init(struct lov_io *lio, struct lov_object *obj, goto out; } - io->ci_write_intent.e_start = lio->lis_pos; - io->ci_write_intent.e_end = lio->lis_endpos; - - ext = io->ci_write_intent;/* for truncate, it only needs to instantiate the components * before the truncated size. */ if (cl_io_is_trunc (io)) { - ext.e_start =0 ; - ext.e_end = io->u.ci_setattr.sa_attr.lvb_size; + io->ci_write_intent.e_start =0 ; + io->ci_write_intent.e_end = io->u.ci_setattr.sa_attr.lvb_size; + }else { + io->ci_write_intent.e_start = lio->lis_pos; + io->ci_write_intent.e_end = lio->lis_endpos; } index =0 ; - lov_foreach_io_layout(index, lio, &ext) { + lov_foreach_io_layout(index, lio, &io->ci_write_intent) {if (!lsm_entry_inited (obj->lo_lsm, index)) { io->ci_need_write_intent =1 ;break ;
Signature · 1 line
1.8.3.1
PATCH 121/151 lustre: mdc: high-priority request handling for DOM
In reply to James SimmonsFrom: Mikhal Pershin <[email protected]>
Implement high-priority request handling and lock prolongation for Data-on-MDT BRW requests to avoid incorrect timeouts and client eviction under heavy MDS load.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10181
Lustre-commit: 9e338ee25609 ("LU-10181 mdc: high-priority request handling for DOM")
Reviewed-on: https://review.whamcloud.com/29968
--- fs/lustre/mdc/mdc_dev.c | 72 +++++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 26 deletions(-)
fs/lustre/mdc/mdc_dev.c +46 -26
@@ -937,6 +937,34 @@ static int mdc_async_upcall(void *a, int rc)return 0 ; } +static int mdc_get_lock_handle (const struct lu_env *env,struct osc_object *osc, +pgoff_t index,struct lustre_handle *lh) +{ +struct ldlm_lock *lock; +int rc =0 ; + +/* find DOM lock protecting object */ + lock =mdc_dlmlock_at_pgoff (env, osc, index, +OSC_DAP_FL_TEST_LOCK | +OSC_DAP_FL_CANCELING ); +if (!lock) { +struct ldlm_resource *res; +struct ldlm_res_id *resname; + + resname = &osc_env_info (env)->oti_resname; +fid_build_reg_res_name (lu_object_fid (osc2lu (osc)), resname); + res =ldlm_resource_get (osc_export (osc)->exp_obd->obd_namespace, +NULL , resname,LDLM_IBITS ,0 ); +ldlm_resource_dump (D_ERROR , res); +libcfs_debug_dumpstack (NULL ); + rc = -ENOENT ; + }else { + *lh = lock->l_remote_handle; +LDLM_LOCK_PUT (lock); + } +return rc; +} +static int mdc_io_setattr_start (const struct lu_env *env,const struct cl_io_slice *slice) {
@@ -1008,6 +1036,11 @@ static int mdc_io_setattr_start(const struct lu_env *env,if (oio->oi_lockless) { oa->o_flags =OBD_FL_SRVLOCK ; oa->o_valid |=OBD_MD_FLFLAGS ; + }else { + rc =mdc_get_lock_handle (env,cl2osc (obj),CL_PAGE_EOF , + &oa->o_handle); +if (!rc) + oa->o_valid |=OBD_MD_FLHANDLE ; }init_completion (&cbargs->opc_sync);
@@ -1157,35 +1190,22 @@ static void mdc_req_attr_set(const struct lu_env *env, struct cl_object *obj, attr->cra_oa->o_valid |=OBD_MD_FLID ;if (flags &OBD_MD_FLHANDLE ) { -struct ldlm_lock *lock;/* _some_ lock protecting @apage */ struct osc_page *opg; opg =osc_cl_page_osc (attr->cra_page,cl2osc (obj)); - lock =mdc_dlmlock_at_pgoff (env,cl2osc (obj),osc_index (opg), -OSC_DAP_FL_TEST_LOCK |OSC_DAP_FL_CANCELING ); -if (!lock && !opg->ops_srvlock) { -struct ldlm_resource *res; -struct ldlm_res_id *resname; - -CL_PAGE_DEBUG (D_ERROR , env, attr->cra_page, -"uncovered page!\n" ); - - resname = &osc_env_info (env)->oti_resname; -mdc_build_res_name (cl2osc (obj), resname); - res =ldlm_resource_get ( -osc_export (cl2osc (obj))->exp_obd->obd_namespace, -NULL , resname,LDLM_IBITS ,0 ); -ldlm_resource_dump (D_ERROR , res); - -libcfs_debug_dumpstack (NULL ); -LBUG (); - } - -/* check for lockless io. */ -if (lock) { - attr->cra_oa->o_handle = lock->l_remote_handle; - attr->cra_oa->o_valid |=OBD_MD_FLHANDLE ; -LDLM_LOCK_PUT (lock); +if (!opg->ops_srvlock) { +int rc; + + rc =mdc_get_lock_handle (env,cl2osc (obj), +osc_index (opg), + &attr->cra_oa->o_handle); +if (rc) { +CL_PAGE_DEBUG (D_ERROR , env, attr->cra_page, +"uncovered page!\n" ); +LBUG (); + }else { + attr->cra_oa->o_valid |=OBD_MD_FLHANDLE ; + } } } }
Signature · 1 line
1.8.3.1
PATCH 122/151 lustre: llite: Add tiny write support
In reply to James SimmonsFrom: Patrick Farrell <[email protected]>
If a page is already dirty in the page cache, we can write to it without a full i/o. This improves performance for writes of < 1 page dramatically.
Append writes are a bit tricky, requiring us to take the range lock (which we can normally avoid), but they are still much faster than the normal i/o path.
Performance numbers with dd, on a VM with an older Xeon.
All numbers in MiB/s.
8 bytes 1KiB
Without patch: .75 75 With patch: 6.5 153
WC-bug-id: https://jira.whamcloud.com/browse/LU-9409
Cray-bug-id: LUS-1705
Lustre-commit: 94470f7eeab5 ("LU-9409 llite: Add tiny write support")
Reviewed-on: https://review.whamcloud.com/27903
--- fs/lustre/include/cl_object.h | 9 ++++ fs/lustre/llite/file.c | 122 ++++++++++++++++++++++++++++++++++++++++-- fs/lustre/llite/rw26.c | 71 ++++++++++++++++++++++-- fs/lustre/obdclass/cl_page.c | 13 +++++ fs/lustre/osc/osc_internal.h | 2 + fs/lustre/osc/osc_io.c | 16 ++---- fs/lustre/osc/osc_page.c | 12 ++++- 7 files changed, 224 insertions(+), 21 deletions(-)
fs/lustre/include/cl_object.h +9 -0
@@ -865,6 +865,13 @@ struct cl_page_operations {*/ int (*cpo_is_vmlocked)(const struct lu_env *env,const struct cl_page_slice *slice); + +/** +* Update file attributes when all we have is this page. Used for tiny +* writes to update attributes when we don't have a full cl_io. +*/ +void (*cpo_page_touch)(const struct lu_env *env, +const struct cl_page_slice *slice,size_t to);/** * Page destruction. */
@@ -2203,6 +2210,8 @@ void cl_page_discard(const struct lu_env *env, struct cl_io *io, struct cl_page *pg);void cl_page_delete (const struct lu_env *env,struct cl_page *pg);int cl_page_is_vmlocked (const struct lu_env *env,const struct cl_page *pg); +void cl_page_touch (const struct lu_env *env,const struct cl_page *pg, +size_t to);void cl_page_export (const struct lu_env *env,struct cl_page *pg,int uptodate);loff_t cl_offset (const struct cl_object *obj,pgoff_t idx);pgoff_t cl_index (const struct cl_object *obj,loff_t offset);
fs/lustre/llite/file.c +119 -3
144 lines not on this page · raw message
fs/lustre/llite/rw26.c +66 -5
124 lines not on this page · raw message
fs/lustre/obdclass/cl_page.c +13 -0
@@ -681,6 +681,19 @@ int cl_page_is_vmlocked(const struct lu_env *env, const struct cl_page *pg) }EXPORT_SYMBOL (cl_page_is_vmlocked); +void cl_page_touch (const struct lu_env *env,const struct cl_page *pg, +size_t to) +{ +const struct cl_page_slice *slice; + +list_for_each_entry (slice, &pg->cp_layers, cpl_linkage) { +if (slice->cpl_ops->cpo_page_touch) + (*slice->cpl_ops->cpo_page_touch)(env, slice, to); + } + +} +EXPORT_SYMBOL (cl_page_touch); +static enum cl_page_state cl_req_type_state (enum cl_req_type crt) {return crt ==CRT_WRITE ?CPS_PAGEOUT :CPS_PAGEIN ;
fs/lustre/osc/osc_internal.h +2 -0
@@ -143,6 +143,8 @@ int osc_quotactl(struct obd_device *unused, struct obd_export *exp,void osc_inc_unstable_pages (struct ptlrpc_request *req);void osc_dec_unstable_pages (struct ptlrpc_request *req);bool osc_over_unstable_soft_limit (struct client_obd *cli); +void osc_page_touch_at (const struct lu_env *env,struct cl_object *obj, +pgoff_t idx,size_t to); struct ldlm_lock *osc_obj_dlmlock_at_pgoff(const struct lu_env *env, struct osc_object *obj,
fs/lustre/osc/osc_io.c +4 -12
@@ -216,14 +216,13 @@ int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,EXPORT_SYMBOL (osc_io_submit);/** -* This is called when a page is accessed within file in a way that creates -* new page, if one were missing (i.e., if there were a hole at that place in -* the file, or accessed page is beyond the current file size). +* This is called to update the attributes when modifying a specific page, +* both when making new pages and when doing updates to existing cached pages. * * Expand stripe KMS if necessary. */ -static void osc_page_touch_at (const struct lu_env *env, -struct cl_object *obj,pgoff_t idx,size_t to) +void osc_page_touch_at (const struct lu_env *env,struct cl_object *obj, +pgoff_t idx,size_t to) {struct lov_oinfo *loi =cl2osc (obj)->oo_oinfo;struct cl_attr *attr = &osc_env_info (env)->oti_attr;
@@ -234,13 +233,6 @@ static void osc_page_touch_at(const struct lu_env *env, kms =cl_offset (obj, idx) + to;cl_object_attr_lock (obj); -/* -* XXX old code used -* -* ll_inode_size_lock(inode, 0); lov_stripe_lock(lsm); -* -* here -*/ CDEBUG (D_INODE ,"stripe KMS %sincreasing %llu->%llu %llu\n" , kms > loi->loi_kms ?"" :"not " , loi->loi_kms, kms, loi->loi_lvb.lvb_size);
fs/lustre/osc/osc_page.c +11 -1
@@ -228,11 +228,21 @@ static int osc_page_flush(const struct lu_env *env,return rc; } +static void osc_page_touch (const struct lu_env *env, +const struct cl_page_slice *slice,size_t to) +{ +struct osc_page *opg =cl2osc_page (slice); +struct cl_object *obj = opg->ops_cl.cpl_obj; + +osc_page_touch_at (env, obj,osc_index (opg), to); +} +static const struct cl_page_operations osc_page_ops = { .cpo_print = osc_page_print, .cpo_delete = osc_page_delete, .cpo_clip = osc_page_clip, - .cpo_flush = osc_page_flush + .cpo_flush = osc_page_flush, + .cpo_page_touch = osc_page_touch, }; int osc_page_init(const struct lu_env *env, struct cl_object *obj,
Signature · 1 line
1.8.3.1
PATCH 123/151 lustre: mdc: add CL_GETXATTR for Changelogs
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
Record GETXATTR events in Changelogs, and add a new changelog extension named changelog_ext_xattr to hold xattr name. A GETXATTR changlog entry is in the following form:
8 23GXATR 09:22:55.886793012 2017.07.27 0x0 t=[0x200000402:0x1:0x0] ef=0xf u=500:500 nid=10.128.11.159 at tcp x=user.name0
Also, rename CL_XATTR type to CL_SETXATTR.
By default, disable recording of GETXATTR events in Changelogs.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9727
Lustre-commit: c722371c1880 ("LU-9727 mdc: add CL_GETXATTR for Changelogs")
Reviewed-on: https://review.whamcloud.com/28251
--- fs/lustre/mdc/mdc_changelog.c | 3 +- include/uapi/linux/lustre/lustre_idl.h | 3 +- include/uapi/linux/lustre/lustre_user.h | 56 +++++++++++++++++++++++++++++---- 3 files changed, 54 insertions(+), 8 deletions(-)
fs/lustre/mdc/mdc_changelog.c +2 -1
@@ -239,7 +239,8 @@ static int chlg_load(void *args)LLOG_F_EXT_EXTRA_FLAGS |LLOG_F_EXT_X_UIDGID |LLOG_F_EXT_X_NID | -LLOG_F_EXT_X_OMODE , +LLOG_F_EXT_X_OMODE | +LLOG_F_EXT_X_XATTR , NULL);if (rc) { CERROR("%s: fail to init llog handle: rc = %d\n",
include/uapi/linux/lustre/lustre_idl.h +2 -1
@@ -2541,6 +2541,7 @@ enum llog_flag {LLOG_F_EXT_X_UIDGID =0x40 ,LLOG_F_EXT_X_NID =0x80 ,LLOG_F_EXT_X_OMODE =0x100 , + LLOG_F_EXT_X_XATTR = 0x200,/* * Note: Flags covered by LLOG_F_EXT_MASK will be inherited from
@@ -2550,7 +2551,7 @@ enum llog_flag {*/ LLOG_F_EXT_MASK =LLOG_F_EXT_JOBID |LLOG_F_EXT_EXTRA_FLAGS |LLOG_F_EXT_X_UIDGID |LLOG_F_EXT_X_NID | - LLOG_F_EXT_X_OMODE, + LLOG_F_EXT_X_OMODE | LLOG_F_EXT_X_XATTR, };/* On-disk header structure of each log object, stored in little endian order */
include/uapi/linux/lustre/lustre_user.h +50 -6
137 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 124/151 lustre: uapi: record denied OPEN in Changelogs
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
Record denied OPEN events in Changelogs, in the same format as successful OPEN events.
Recording denied OPEN events is useful for security audit, in order to find out who tried to get access to some data. An NOPEN changlog entry is in the form:
4 24NOPEN 15:45:44.947406626 2017.08.31 0x2 t=[0x200000402:0x1:0x0] ef=0xf u=500:500 nid=10.128.11.158 at tcp m=-w-
By default, disable recording of NOPEN events in Changelogs.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9727
Lustre-commit: ccb6fe4b5994 ("LU-9727 lustre: record denied OPEN in Changelogs")
Reviewed-on: https://review.whamcloud.com/28812
--- include/uapi/linux/lustre/lustre_user.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/lustre/lustre_user.h +2 -1
@@ -941,6 +941,7 @@ enum changelog_rec_type {CL_FLRW =21 ,/* FLR: file was firstly written */ CL_RESYNC =22 ,/* FLR: file was resync-ed */ CL_GETXATTR =23 , +CL_DN_OPEN =24 ,/* denied open */ CL_LAST };
@@ -950,7 +951,7 @@ static inline const char *changelog_type2str(int type)"MARK" ,"CREAT" ,"MKDIR" ,"HLINK" ,"SLINK" ,"MKNOD" ,"UNLNK" ,"RMDIR" ,"RENME" ,"RNMTO" ,"OPEN" ,"CLOSE" ,"LYOUT" ,"TRUNC" ,"SATTR" ,"XATTR" ,"HSM" ,"MTIME" ,"CTIME" ,"ATIME" ,"" , - "FLRW", "RESYNC", "GXATTR", + "FLRW", "RESYNC", "GXATTR", "NOPEN", };if (type >=0 && type <CL_LAST )
Signature · 1 line
1.8.3.1
PATCH 125/151 lustre: llite: have ll_write_end to sync for DIO
In reply to James SimmonsFrom: Vladimir Saveliev <[email protected]>
direct IO write uses buffered write for pages which could not be released. If not adjacent pages are not releasable, vio->u.write.vui_queue list becomes non-contiguos which makes page_list_sanity_check() to fail.
Have ll_write_commit to do vvp_io_write_commit() when it is called in course of direct IO.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10356
Cray-bug-id: MRP-4415
Lustre-commit: 6ea9171769db ("LU-10356 llite: have ll_write_end to sync for DIO")
Reviewed-on: https://review.whamcloud.com/30659
--- fs/lustre/llite/rw26.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/lustre/llite/rw26.c +1 -2
@@ -684,8 +684,7 @@ static int ll_write_end(struct file *file, struct address_space *mapping, unplug = true; } -if (unplug || - file->f_flags &O_SYNC ||IS_SYNC (file_inode (file))) +if (unplug || io->u.ci_wr.wr_sync) result =vvp_io_write_commit (env, io);if (result <0 )
Signature · 1 line
1.8.3.1
PATCH 126/151 lustre: obd: add check to obd_statfs
In reply to James SimmonsFrom: Alexander Boyko <[email protected]>
The race could happened between mount and lctl get_param. Because procfs files are ready before a full obd initialization. For example:
3372:0:(dt_object.h:2509:dt_statfs()) ASSERTION( dev ) 3372:0:(dt_object.h:2509:dt_statfs()) LBUG
Pid: 3372, comm: lctl
Call Trace:
libcfs_call_trace+0x4e/0x60[libcfs]
lbug_with_loc+0x4c/0xb0[libcfs]
tgt_statfs_internal+0x2ea/0x350[ptlrpc]
ofd_statfs+0x66/0x470 [ofd]
lprocfs_filesfree_seq_show+0xf6/0x520 [obdclass]
ofd_filesfree_seq_show+0x12/0x20 [ofd]The patch adds a check of completed obd_setup to obd_statfs().
WC-bug-id: https://jira.whamcloud.com/browse/LU-10650
ray-bug-id: LUS-2665
Lustre-commit: 4f40429775c4 ("LU-10650 obd: add check to obd_statfs")
Reviewed-on: https://review.whamcloud.com/31243
--- fs/lustre/include/obd_class.h | 4 ++++ 1 file changed, 4 insertions(+)
fs/lustre/include/obd_class.h +4 -0
@@ -924,6 +924,10 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp,if (!obd)return -EINVAL ; + rc =obd_check_dev_active (obd); +if (rc) +return rc; +if (!obd->obd_type || !obd->obd_type->typ_dt_ops->statfs) {CERROR ("%s: no %s operation\n" , obd->obd_name, __func__);return -EOPNOTSUPP ;
Signature · 1 line
1.8.3.1
PATCH 127/151 lustre: obd: fix statfs handling
In reply to James SimmonsThe comment 'use the value of cfs_time_current + HZ' for obd_statfs() and obd_statfs_async() needs to updated to the time64_t case.
Simplify llite_statfs_internal() handling by calculating max_age inside of llite_statfs_internal(). This makes the code cleaner.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10570
Lustre-commit: 87577f4988c1 ("LU-10570 obd: fix statfs handling")
Reviewed-on: https://review.whamcloud.com/31158
--- fs/lustre/include/obd_class.h | 8 ++++---- fs/lustre/llite/llite_internal.h | 2 +- fs/lustre/llite/llite_lib.c | 9 +++++---- fs/lustre/llite/lproc_llite.c | 24 ++++++------------------ 4 files changed, 16 insertions(+), 27 deletions(-)
fs/lustre/include/obd_class.h +4 -4
@@ -868,9 +868,9 @@ static inline int obd_destroy_export(struct obd_export *exp) }/* -* @max_age is the oldest time in jiffies that we accept using a cached data. +* @max_age is the oldest time in seconds that we accept using a cached data. * If the cache is older than @max_age we will get a new value from the -* target. Use a value of "jiffies + HZ" to guarantee freshness. +* target. Use a value of 'ktime_get_seconds() + X' to guarantee freshness. */ static inline int obd_statfs_async(struct obd_export *exp, struct obd_info *oinfo,
@@ -910,9 +910,9 @@ static inline int obd_statfs_async(struct obd_export *exp, }/* -* @max_age is the oldest time in jiffies that we accept using a cached data. +* @max_age is the oldest time in seconds that we accept using a cached data. * If the cache is older than @max_age we will get a new value from the -* target. Use a value of "jiffies + HZ" to guarantee freshness. +* target. Use a value of 'ktime_get_seconds() + X' to guarantee freshness. */ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, struct obd_statfs *osfs, time64_t max_age,
fs/lustre/llite/llite_internal.h +1 -1
@@ -878,7 +878,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr,int ll_setattr (struct dentry *de,struct iattr *attr);int ll_statfs (struct dentry *de,struct kstatfs *sfs);int ll_statfs_internal (struct ll_sb_info *sbi,struct obd_statfs *osfs, -time64_t max_age,__u32 flags); +u32 flags);int ll_update_inode (struct inode *inode,struct lustre_md *md);void ll_update_inode_flags (struct inode *inode,int ext_flags);int ll_read_inode2 (struct inode *inode,void *opaque);
fs/lustre/llite/llite_lib.c +5 -4
@@ -1716,11 +1716,14 @@ int ll_setattr(struct dentry *de, struct iattr *attr) }int ll_statfs_internal (struct ll_sb_info *sbi,struct obd_statfs *osfs, -time64_t max_age,u32 flags) +u32 flags) {struct obd_statfs obd_osfs; +time64_t max_age;int rc; + max_age =ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS ; + rc =obd_statfs (NULL , sbi->ll_md_exp, osfs, max_age, flags);if (rc) {CERROR ("md_statfs fails: rc = %d\n" , rc);
@@ -1774,9 +1777,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs)ll_stats_ops_tally (ll_s2sbi (sb),LPROC_LL_STAFS ,1 );/* Some amount of caching on the client is allowed */ - rc =ll_statfs_internal (ll_s2sbi (sb), &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -0 ); + rc =ll_statfs_internal (ll_s2sbi (sb), &osfs,0 );if (rc)return rc;
fs/lustre/llite/lproc_llite.c +6 -18
@@ -140,9 +140,7 @@ static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr,struct obd_statfs osfs;int rc; - rc =ll_statfs_internal (sbi, &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -OBD_STATFS_NODELAY ); + rc =ll_statfs_internal (sbi, &osfs,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -192,9 +190,7 @@ static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr,u64 result;int rc; - rc =ll_statfs_internal (sbi, &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -OBD_STATFS_NODELAY ); + rc =ll_statfs_internal (sbi, &osfs,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -218,9 +214,7 @@ static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr,u64 result;int rc; - rc =ll_statfs_internal (sbi, &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -OBD_STATFS_NODELAY ); + rc =ll_statfs_internal (sbi, &osfs,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -244,9 +238,7 @@ static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr,u64 result;int rc; - rc =ll_statfs_internal (sbi, &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -OBD_STATFS_NODELAY ); + rc =ll_statfs_internal (sbi, &osfs,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -268,9 +260,7 @@ static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr,struct obd_statfs osfs;int rc; - rc =ll_statfs_internal (sbi, &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -OBD_STATFS_NODELAY ); + rc =ll_statfs_internal (sbi, &osfs,OBD_STATFS_NODELAY );if (rc)return rc;
@@ -286,9 +276,7 @@ static ssize_t filesfree_show(struct kobject *kobj, struct attribute *attr,struct obd_statfs osfs;int rc; - rc =ll_statfs_internal (sbi, &osfs, -ktime_get_seconds () -OBD_STATFS_CACHE_SECONDS , -OBD_STATFS_NODELAY ); + rc =ll_statfs_internal (sbi, &osfs,OBD_STATFS_NODELAY );if (rc)return rc;
Signature · 1 line
1.8.3.1
PATCH 128/151 lustre: dom: support DATA_VERSION IO type
In reply to James SimmonsFrom: Mikhail Pershin <[email protected]>
add support for DATA_VERSION IO type, return from MDT data version and layout version if requested by CLIO. Also ensure that version is changed on punch and write operations.
This fixes HSM archive with DOM files.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10318
Lustre-commit: 1e7fc14bbf48 ("LU-10318 dom: support DATA_VERSION IO type")
Reviewed-on: https://review.whamcloud.com/30449
--- fs/lustre/mdc/mdc_dev.c | 119 ++++++++++++++++++++++++++++++++- fs/lustre/mdc/mdc_request.c | 1 - fs/lustre/ptlrpc/pack_generic.c | 4 +- fs/lustre/ptlrpc/wiretest.c | 85 ++++++++++++++++------- include/uapi/linux/lustre/lustre_idl.h | 4 +- 5 files changed, 181 insertions(+), 32 deletions(-)
fs/lustre/mdc/mdc_dev.c +116 -3
@@ -1114,6 +1114,120 @@ int mdc_io_fsync_start(const struct lu_env *env,return result; } +struct mdc_data_version_args { +struct osc_io *dva_oio; +}; + +static int +mdc_data_version_interpret (const struct lu_env *env,struct ptlrpc_request *req, +void *arg,int rc) +{ +struct mdc_data_version_args *dva = arg; +struct osc_io *oio = dva->dva_oio; +const struct mdt_body *body; + +if (rc <0 ) + goto out; + + body =req_capsule_server_get (&req->rq_pill, &RMF_MDT_BODY ); +if (!body) { + rc = -EPROTO ; + goto out; + } + +/* Prepare OBDO from mdt_body for CLIO */ + oio->oi_oa.o_valid = body->mbo_valid; + oio->oi_oa.o_flags = body->mbo_flags; + oio->oi_oa.o_data_version = body->mbo_version; + oio->oi_oa.o_layout_version = body->mbo_layout_gen; + +out: + oio->oi_cbarg.opc_rc = rc; +complete (&oio->oi_cbarg.opc_sync); +return 0 ; +} + +static int mdc_io_data_version_start (const struct lu_env *env, +const struct cl_io_slice *slice) +{ +struct cl_data_version_io *dv = &slice->cis_io->u.ci_data_version; +struct osc_io *oio =cl2osc_io (env, slice); +struct osc_async_cbargs *cbargs = &oio->oi_cbarg; +struct osc_object *obj =cl2osc (slice->cis_obj); +struct obd_export *exp =osc_export (obj); +struct ptlrpc_request *req; +struct mdt_body *body; +struct mdc_data_version_args *dva; +int rc; + +memset (&oio->oi_oa,0 ,sizeof (oio->oi_oa)); + oio->oi_oa.o_oi.oi_fid = *lu_object_fid (osc2lu (obj)); + oio->oi_oa.o_valid =OBD_MD_FLID ; + +init_completion (&cbargs->opc_sync); + + req =ptlrpc_request_alloc (class_exp2cliimp (exp), &RQF_MDS_GETATTR ); +if (!req) +return -ENOMEM ; + + rc =ptlrpc_request_pack (req,LUSTRE_MDS_VERSION ,MDS_GETATTR ); +if (rc <0 ) { +ptlrpc_request_free (req); +return rc; + } + + body =req_capsule_client_get (&req->rq_pill, &RMF_MDT_BODY ); + body->mbo_fid1 = *lu_object_fid (osc2lu (obj)); + body->mbo_valid =OBD_MD_FLID ; +/* Indicate that data version is needed */ + body->mbo_valid |=OBD_MD_FLDATAVERSION ; + body->mbo_flags =0 ; + +if (dv->dv_flags & (LL_DV_RD_FLUSH |LL_DV_WR_FLUSH )) { + body->mbo_valid |=OBD_MD_FLFLAGS ; + body->mbo_flags |=OBD_FL_SRVLOCK ; +if (dv->dv_flags &LL_DV_WR_FLUSH ) + body->mbo_flags |=OBD_FL_FLUSH ; + } + +req_capsule_set_size (&req->rq_pill, &RMF_ACL ,RCL_SERVER ,0 ); +req_capsule_set_size (&req->rq_pill, &RMF_MDT_MD ,RCL_SERVER ,0 ); +ptlrpc_request_set_replen (req); + + req->rq_interpret_reply = mdc_data_version_interpret; +BUILD_BUG_ON (sizeof (*dva) >sizeof (req->rq_async_args)); + dva =ptlrpc_req_async_args (req); + dva->dva_oio = oio; + +ptlrpcd_add_req (req); + +return 0 ; +} + +static void mdc_io_data_version_end (const struct lu_env *env, +const struct cl_io_slice *slice) +{ +struct cl_data_version_io *dv = &slice->cis_io->u.ci_data_version; +struct osc_io *oio =cl2osc_io (env, slice); +struct osc_async_cbargs *cbargs = &oio->oi_cbarg; + +wait_for_completion (&cbargs->opc_sync); + +if (cbargs->opc_rc !=0 ) { + slice->cis_io->ci_result = cbargs->opc_rc; + }else { + slice->cis_io->ci_result =0 ; +if (!(oio->oi_oa.o_valid & + (OBD_MD_LAYOUT_VERSION |OBD_MD_FLDATAVERSION ))) + slice->cis_io->ci_result = -ENOTSUPP ; + +if (oio->oi_oa.o_valid &OBD_MD_LAYOUT_VERSION ) + dv->dv_layout_version = oio->oi_oa.o_layout_version; +if (oio->oi_oa.o_valid &OBD_MD_FLDATAVERSION ) + dv->dv_data_version = oio->oi_oa.o_data_version; + } +} +static struct cl_io_operations mdc_io_ops = { .op = { [CIT_READ ] = {
@@ -1133,10 +1247,9 @@ int mdc_io_fsync_start(const struct lu_env *env, .cio_start = mdc_io_setattr_start, .cio_end = osc_io_setattr_end, }, -/* no support for data version so far */ [CIT_DATA_VERSION] = { - .cio_start = NULL, - .cio_end = NULL, + .cio_start = mdc_io_data_version_start, + .cio_end = mdc_io_data_version_end, }, [CIT_FAULT] = { .cio_iter_init = osc_io_iter_init,
fs/lustre/mdc/mdc_request.c +0 -1
@@ -722,7 +722,6 @@ int mdc_set_open_replay_data(struct obd_export *exp, } rec->cr_fid2 = body->mbo_fid1; - rec->cr_ioepoch = body->mbo_ioepoch; rec->cr_old_handle.cookie = body->mbo_handle.cookie; open_req->rq_replay_cb = mdc_replay_open;if (!fid_is_sane (&body->mbo_fid1)) {
fs/lustre/ptlrpc/pack_generic.c +2 -2
@@ -1741,7 +1741,7 @@ void lustre_swab_mdt_body(struct mdt_body *b)__swab64s (&b->mbo_atime);__swab64s (&b->mbo_ctime);__swab64s (&b->mbo_blocks); -__swab64s (&b->mbo_ioepoch); +__swab64s (&b->mbo_version);__swab64s (&b->mbo_t_state);__swab32s (&b->mbo_fsuid);__swab32s (&b->mbo_fsgid);
@@ -1752,7 +1752,7 @@ void lustre_swab_mdt_body(struct mdt_body *b)__swab32s (&b->mbo_flags);__swab32s (&b->mbo_rdev);__swab32s (&b->mbo_nlink); - BUILD_BUG_ON(offsetof(typeof(*b), mbo_unused2) == 0); +__swab32s (&b->mbo_layout_gen);__swab32s (&b->mbo_suppgid);__swab32s (&b->mbo_eadatasize);__swab32s (&b->mbo_aclsize);
fs/lustre/ptlrpc/wiretest.c +61 -24
127 lines not on this page · raw message
include/uapi/linux/lustre/lustre_idl.h +2 -2
@@ -1539,7 +1539,7 @@ struct mdt_body {__s64 mbo_atime;__s64 mbo_ctime;__u64 mbo_blocks;/* XID, in the case of MDS_READPAGE */ -__u64 mbo_ioepoch; +__u64 mbo_version;/* was mbo_ioepoch before 2.11 */ __u64 mbo_t_state;/* transient file state defined in * enum md_transient_state * was "ino" until 2.4.0
@@ -1553,7 +1553,7 @@ struct mdt_body {__u32 mbo_flags;/* LUSTRE_*_FL file attributes */ __u32 mbo_rdev;__u32 mbo_nlink;/* #bytes to read in the case of MDS_READPAGE */ -__u32 mbo_unused2;/* was "generation" until 2.4.0 */ +__u32 mbo_layout_gen;/* was "generation" until 2.4.0 */ __u32 mbo_suppgid;__u32 mbo_eadatasize;__u32 mbo_aclsize;
Signature · 1 line
1.8.3.1