lustre: update to 2.11 support
Subsystems (2)
PATCH 129/151 lnet: fix contiguous range support
In reply to James SimmonsFrom: Kit Westneat <[email protected]>
This patch fixes the contiguous range check to allow the addition of multiple "full" ([0-255]) ranges. As part of this change, is_contiguous and find_min_max are combined as they were always called together and the logic is fairly similar. This also removes the multiple range expression support, since it was broken.
WC-bug-id: https://jira.whamcloud.com/browse/LU-LU-8912
Lustre-commit: eac95a6587af ("LU-8912 nodemap: fix contiguous range support")
Reviewed-on: https://review.whamcloud.com/24397
--- include/uapi/linux/lnet/nidstr.h | 8 +- net/lnet/lnet/nidstrings.c | 324 ++++++++++++++++----------------------- 2 files changed, 133 insertions(+), 199 deletions(-)
include/uapi/linux/lnet/nidstr.h +3 -5
@@ -97,9 +97,8 @@ static inline char *libcfs_nid2str(lnet_nid_t nid)int cfs_ip_addr_parse (char *str,int len,struct list_head *list);int cfs_ip_addr_match (__u32 addr,struct list_head *list); -bool cfs_nidrange_is_contiguous (struct list_head *nidlist); -void cfs_nidrange_find_min_max (struct list_head *nidlist,char *min_nid, -char *max_nid,size_t nidstr_length); +int cfs_nidrange_find_min_max (struct list_head *nidlist,char *min_nid, +char *max_nid,size_t nidstr_length);struct netstrfns {__u32 nf_type;
@@ -112,8 +111,7 @@ struct netstrfns {int (*nf_print_addrlist)(char *buffer,int count,struct list_head *list);int (*nf_match_addr)(__u32 addr,struct list_head *list); -bool (*nf_is_contiguous)(struct list_head *nidlist); -void (*nf_min_max)(struct list_head *nidlist,__u32 *min_nid, +int (*nf_min_max)(struct list_head *nidlist,__u32 *min_nid,__u32 *max_nid); };
net/lnet/lnet/nidstrings.c +130 -194
466 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 130/151 lustre: osc: add a bit to indicate osc_page in cache tree
In reply to James SimmonsFrom: Bobi Jam <[email protected]>
Add osc_page::ops_intree to indicate whether the osc_page is in the osc_object's cache tree, so that when page cannot insert in the cache as race happens, the cleanup code won't try to remove it from the cache.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10244
Lustre-commit: ed91ee6bd642 ("LU-10244 osc: add a bit to indicate osc_page in cache tree")
Reviewed-on: https://review.whamcloud.com/30096
--- fs/lustre/include/lustre_osc.h | 6 +++++- fs/lustre/osc/osc_page.c | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-)
fs/lustre/include/lustre_osc.h +5 -1
@@ -524,7 +524,11 @@ struct osc_page {/* * Set if the page must be transferred with OBD_BRW_SRVLOCK. */ - ops_srvlock:1 ; + ops_srvlock:1 , +/** +* If the page is in osc_object::oo_tree. +*/ + ops_intree:1;/* * lru page list. See osc_lru_{del|use}() in osc_page.c for usage. */
fs/lustre/osc/osc_page.c +12 -5
@@ -192,12 +192,17 @@ static void osc_page_delete(const struct lu_env *env,osc_lru_del (osc_cli (obj), opg);if (slice->cpl_page->cp_type ==CPT_CACHEABLE ) { -void *value; +void *value =NULL ;spin_lock (&obj->oo_tree_lock); - value =radix_tree_delete (&obj->oo_tree,osc_index (opg)); -if (value) - --obj->oo_npages; +if (opg->ops_intree) { + value =radix_tree_delete (&obj->oo_tree, +osc_index (opg)); +if (value) { + --obj->oo_npages; + opg->ops_intree =0 ; + } + }spin_unlock (&obj->oo_tree_lock);LASSERT (ergo (value, value == opg));
@@ -275,8 +280,10 @@ int osc_page_init(const struct lu_env *env, struct cl_object *obj,spin_lock (&osc->oo_tree_lock); result =radix_tree_insert (&osc->oo_tree, index, opg); -if (result ==0 ) +if (result ==0 ) { ++osc->oo_npages; + opg->ops_intree =1 ; + }spin_unlock (&osc->oo_tree_lock);radix_tree_preload_end ();
Signature · 1 line
1.8.3.1
PATCH 131/151 lustre: ldlm: fix export reference
In reply to James SimmonsFrom: Hongchao Zhang <[email protected]>
In ptlrpc_connect_interpert, the export reference could be leaked if there is error before the following class_exp_put.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10656
Lustre-commit: e52f2ea40e55 ("LU-10656 ldlm: fix export reference")
Reviewed-on: https://review.whamcloud.com/31139
--- fs/lustre/ptlrpc/import.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/lustre/ptlrpc/import.c +6 -1
@@ -935,7 +935,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env,u64 old_connect_flags;int msg_flags;struct obd_connect_data *ocd; -struct obd_export *exp; +struct obd_export *exp =NULL ;int ret;spin_lock (&imp->imp_lock);
@@ -1040,6 +1040,8 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, rc =ptlrpc_connect_set_flags (imp, ocd, old_connect_flags, exp, aa->pcaa_initial_connect);class_export_put (exp); + exp =NULL ; +if (rc) goto out;
@@ -1205,6 +1207,9 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, imp->imp_connect_tried =1 ;spin_unlock (&imp->imp_lock); +if (exp) +class_export_put (exp); +if (rc !=0 ) {IMPORT_SET_STATE (imp,LUSTRE_IMP_DISCON );if (rc == -EACCES ) {
Signature · 1 line
1.8.3.1
PATCH 132/151 lustre: llite: Add exit for filedata allocation failed
In reply to James SimmonsFrom: Ben Evans <[email protected]>
When the filedata allocation fails, we need to exit to a later point than out_openerr, which calls deauthorize_statahead and ll_file_data_put, neither of which is valid. (This leads to a panic.)
WC-bug-id: https://jira.whamcloud.com/browse/LU-10662
Cray-bug-id: LUS-1321
Lustre-commit: d9edfa50683a ('LU-10662 llite: Add exit for filedata allocation failed")
Reviewed-on: https://review.whamcloud.com/31296
--- fs/lustre/llite/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/lustre/llite/file.c +2 -1
@@ -540,7 +540,7 @@ int ll_file_open(struct inode *inode, struct file *file) fd =ll_file_data_get ();if (!fd) { rc = -ENOMEM ; - goto out_openerr; + goto out_nofiledata; } fd->fd_file = file;
@@ -723,6 +723,7 @@ int ll_file_open(struct inode *inode, struct file *file)ll_stats_ops_tally (ll_i2sbi (inode),LPROC_LL_OPEN ,1 ); } +out_nofiledata:if (it &&it_disposition (it,DISP_ENQ_OPEN_REF )) {ptlrpc_req_finished (it->it_request);it_clear_disposition (it,DISP_ENQ_OPEN_REF );
Signature · 1 line
1.8.3.1
PATCH 133/151 lustre: misc: Wrong checksum return value
In reply to James SimmonsFrom: Qian Yingjin <[email protected]>
In the checksum calculation functions: tgt_checksum_niobuf and osc_checksum_bulk, it is wrongly taken the error return value of cfs_crypto_hash_init as the checksum value.
This patch fixes the problem.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10737
Lustre-commit: 28b8f3d9296d ("LU-10737 misc: Wrong checksum return value")
Reviewed-on: https://review.whamcloud.com/31448
--- fs/lustre/osc/osc_request.c | 51 ++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 19 deletions(-)
fs/lustre/osc/osc_request.c +32 -19
@@ -1028,11 +1028,11 @@ static inline int can_merge_pages(struct brw_page *p1, struct brw_page *p2)return (p1->off + p1->count == p2->off); } -static u32 osc_checksum_bulk (int nob,u32 pg_count, +static int osc_checksum_bulk (int nob,u32 pg_count,struct brw_page **pga,int opc, -enum cksum_type cksum_type) +enum cksum_type cksum_type, +u32 *cksum) { -u32 cksum;int i =0 ;struct ahash_request *hdesc;unsigned int bufsize;
@@ -1076,16 +1076,16 @@ static u32 osc_checksum_bulk(int nob, u32 pg_count, i++; } - bufsize =sizeof (cksum); -cfs_crypto_hash_final (hdesc, (unsigned char *)&cksum, &bufsize); + bufsize =sizeof (*cksum); +cfs_crypto_hash_final (hdesc, (unsigned char *)cksum, &bufsize);/* For sending we only compute the wrong checksum instead * of corrupting the data so it is still correct on a redo */ if (opc ==OST_WRITE &&OBD_FAIL_CHECK (OBD_FAIL_OSC_CHECKSUM_SEND )) - cksum++; + (*cksum)++; -return cksum; +return 0 ; } static int osc_brw_prep_request(int cmd, struct client_obd *cli,
@@ -1296,12 +1296,18 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli, body->oa.o_flags |=cksum_type_pack (cksum_type); body->oa.o_valid |=OBD_MD_FLCKSUM |OBD_MD_FLFLAGS ; - body->oa.o_cksum =osc_checksum_bulk (requested_nob, - page_count, pga, -OST_WRITE , - cksum_type); + + rc =osc_checksum_bulk (requested_nob, page_count, + pga,OST_WRITE , cksum_type, + &body->oa.o_cksum); +if (rc <0 ) { +CDEBUG (D_PAGE ,"failed to checksum, rc = %d\n" , + rc); + goto out; + }CDEBUG (D_PAGE ,"checksum@write origin: %x\n" , body->oa.o_cksum); +/* save this in 'oa', too, for later checking */ oa->o_valid |=OBD_MD_FLCKSUM |OBD_MD_FLFLAGS ; oa->o_flags |=cksum_type_pack (cksum_type);
@@ -1427,6 +1433,7 @@ static int check_write_checksum(struct obdo *oa,u32 new_cksum;char *msg;enum cksum_type cksum_type; +int rc;if (server_cksum == client_cksum) {CDEBUG (D_PAGE ,"checksum %x confirmed\n" , client_cksum);
@@ -1439,10 +1446,13 @@ static int check_write_checksum(struct obdo *oa, cksum_type =cksum_type_unpack (oa->o_valid &OBD_MD_FLFLAGS ? oa->o_flags :0 ); - new_cksum =osc_checksum_bulk (aa->aa_requested_nob, aa->aa_page_count, - aa->aa_ppga,OST_WRITE , cksum_type); + rc =osc_checksum_bulk (aa->aa_requested_nob, aa->aa_page_count, + aa->aa_ppga,OST_WRITE , cksum_type, + &new_cksum); -if (cksum_type !=cksum_type_unpack (aa->aa_oa->o_flags)) +if (rc <0 ) + msg ="failed to calculate the client write checksum" ; +else if (cksum_type !=cksum_type_unpack (aa->aa_oa->o_flags)) msg ="the server did not use the checksum type specified in the original request - likely a protocol problem" ;else if (new_cksum == server_cksum) msg ="changed on the client after we checksummed it - likely false positive due to mmap IO (bug 11742)" ;
@@ -1599,13 +1609,16 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)char *router ="" ;enum cksum_type cksum_type; - cksum_type =cksum_type_unpack (body->oa.o_valid & -OBD_MD_FLFLAGS ? + cksum_type =cksum_type_unpack (body->oa.o_valid &OBD_MD_FLFLAGS ? body->oa.o_flags :0 ); - client_cksum =osc_checksum_bulk (rc, aa->aa_page_count, - aa->aa_ppga,OST_READ , - cksum_type); + rc =osc_checksum_bulk (rc, aa->aa_page_count, aa->aa_ppga, +OST_READ , cksum_type, &client_cksum); +if (rc <0 ) { +CDEBUG (D_PAGE , +"failed to calculate checksum, rc = %d\n" , rc); + goto out; + }if (req->rq_bulk && peer->nid != req->rq_bulk->bd_sender) { via =" via " ;
Signature · 1 line
1.8.3.1
PATCH 134/151 lustre: llite: fix mount error handing
In reply to James SimmonsFrom: Vladimir Saveliev <[email protected]>
lustre_fill_super() allocates lsi and assumes that on failures lsi will be freed by server_fill_super() or ll_fill_super().
- server_fill_super() does not free lsi when lsi_prepare() fails.
- ll_fill_super() does not free lsi when OBD_ALLOC_PTR(cfg) orll_init_sbi() fail.
WC-bug-id: https://jira.whamcloud.com/browse/LU-5991
Cray-bug-id: MRP-2229
Lustre-commit: acabfb9594c9 ("LU-5991 llite: fix mount error handing")
Reviewed-on: https://review.whamcloud.com/12959
--- fs/lustre/llite/llite_lib.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
fs/lustre/llite/llite_lib.c +12 -9
@@ -939,7 +939,7 @@ int ll_fill_super(struct super_block *sb) {struct lustre_profile *lprof =NULL ;struct lustre_sb_info *lsi =s2lsi (sb); -struct ll_sb_info *sbi; +struct ll_sb_info *sbi =NULL ;char *dt =NULL , *md =NULL ;char *profilenm =get_profile_name (sb);struct config_llog_instance *cfg;
@@ -950,21 +950,20 @@ int ll_fill_super(struct super_block *sb)CDEBUG (D_VFSTRACE ,"VFS Op: sb %p\n" , sb); +try_module_get (THIS_MODULE ); + cfg =kzalloc (sizeof (*cfg),GFP_NOFS );if (!cfg) { -ll_common_put_super (sb); -return -ENOMEM ; + err = -ENOMEM ; + goto out_free; } -try_module_get (THIS_MODULE );/* client additional sb info */ sbi =ll_init_sbi (); lsi->lsi_llsbi = sbi;if (!sbi) { -module_put (THIS_MODULE ); -kfree (cfg); -ll_common_put_super (sb); -return -ENOMEM ; + err = -ENOMEM ; + goto out_free; } err =ll_options (lsi->lsi_lmd->lmd_opts, &sbi->ll_flags);
@@ -1048,12 +1047,12 @@ int ll_fill_super(struct super_block *sb)kfree (dt);if (lprof)class_put_profile (lprof); +kfree (cfg);if (err)ll_put_super (sb);else if (sbi->ll_flags &LL_SBI_VERBOSE )LCONSOLE_WARN ("Mounted %s\n" , profilenm); -kfree (cfg);return err; }/* ll_fill_super */
@@ -1073,6 +1072,9 @@ void ll_put_super(struct super_block *sb)int next, force =1 , rc =0 ;long ccc_count; +if (!sbi) + goto out_no_sbi; +CDEBUG (D_VFSTRACE ,"VFS Op: sb %p - %s\n" , sb, profilenm); cfg.cfg_instance = sb;
@@ -1125,6 +1127,7 @@ void ll_put_super(struct super_block *sb)ll_free_sbi (sb); lsi->lsi_llsbi =NULL ; +out_no_sbi:ll_common_put_super (sb);cl_env_cache_purge (~0 );
Signature · 1 line
1.8.3.1
PATCH 135/151 lustre: llite: Disable tiny writes for append
In reply to James SimmonsFrom: Patrick Farrell <[email protected]>
Unfortunately, tiny writes do not work correctly with appending to files. When appending to a file, we must take DLM locks to EOF on all stripes, in order to protect file size so we can append correctly.
If we dirty a page with a normal write then append to it with a tiny write, these DLM locks are not present, and we can use an incorrect size if another client writes to a different stripe, increasing the size without cancelling the lock which is protecting our dirty page.
We could theoretically check to make sure the required DLM locks are held, but this would be time consuming.
The simplest solution is to just not allow tiny writes when appending.
Also add option to disable tiny writes at runtime.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10681
Cray-bug-id: LUS-5723
Lustre-commit: d79ffa3ff746 ("LU-10681 llite: Disable tiny writes for append")
Reviewed-on: https://review.whamcloud.com/31353
--- fs/lustre/llite/file.c | 70 +++++++++------------------------------- fs/lustre/llite/llite_internal.h | 8 +++++ fs/lustre/llite/llite_lib.c | 1 + fs/lustre/llite/lproc_llite.c | 36 +++++++++++++++++++++ 4 files changed, 61 insertions(+), 54 deletions(-)
fs/lustre/llite/file.c +16 -54
@@ -1484,70 +1484,29 @@ static ssize_t ll_file_read_iter(struct kiocb *iocb, struct iov_iter *to)* and will write it out. This saves a lot of processing time. * * All writes here are within one page, so exclusion is handled by the page -* lock on the vm page. Exception is appending, which requires locking the -* full file to handle size issues. We do not do tiny writes for writes which -* touch multiple pages because it's very unlikely multiple sequential pages +* lock on the vm page. We do not do tiny writes for writes which touch +* multiple pages because it's very unlikely multiple sequential pages are * are already dirty. * * We limit these to < PAGE_SIZE because PAGE_SIZE writes are relatively common * and are unlikely to be to already dirty pages. * -* Attribute updates are important here, we do it in ll_tiny_write_end. +* Attribute updates are important here, we do them in ll_tiny_write_end. */ static ssize_t ll_do_tiny_write (struct kiocb *iocb,struct iov_iter *iter) {ssize_t count =iov_iter_count (iter);struct file *file = iocb->ki_filp;struct inode *inode =file_inode (file); -struct ll_inode_info *lli =ll_i2info (inode); -struct range_lock range;ssize_t result =0 ; -bool append = false; - -/* NB: we can't do direct IO for tiny writes because they use the page -* cache, and we can't do sync writes because tiny writes can't flush -* pages. -*/ -if (file->f_flags & (O_DIRECT |O_SYNC )) -return 0 ; -/* It is relatively unlikely we will overwrite a full dirty page, so -* limit tiny writes to < PAGE_SIZE +/* Restrict writes to single page and < PAGE_SIZE. See comment@top +* of function for why. */ -if (count >=PAGE_SIZE ) +if (count >=PAGE_SIZE || + (iocb->ki_pos & (PAGE_SIZE -1 )) + count >PAGE_SIZE )return 0 ; -/* For append writes, we must take the range lock to protect size -* and also move pos to current size before writing. -*/ -if (file->f_flags &O_APPEND ) { -struct lu_env *env; -u16 refcheck; - - append = true; -range_lock_init (&range,0 ,LUSTRE_EOF ); - result =range_lock (&lli->lli_write_tree, &range); -if (result) -return result; - env =cl_env_get (&refcheck); -if (IS_ERR (env)) { - result =PTR_ERR (env); - goto out; - } -ll_merge_attr (env, inode); -cl_env_put (env, &refcheck); - iocb->ki_pos =i_size_read (inode); - } - -/* Does this write touch multiple pages? -* -* This partly duplicates the PAGE_SIZE check above, but must come -* after range locking for append writes because it depends on the -* write position (ki_pos). -*/ -if ((iocb->ki_pos & (PAGE_SIZE -1 )) + count >PAGE_SIZE ) - goto out; - result =__generic_file_write_iter (iocb, iter);/* If the page is not already dirty, ll_tiny_write_begin returns
@@ -1562,10 +1521,6 @@ static ssize_t ll_do_tiny_write(struct kiocb *iocb, struct iov_iter *iter)set_bit (LLIF_DATA_MODIFIED , &ll_i2info (inode)->lli_flags); } -out: -if (append) -range_unlock (&lli->lli_write_tree, &range); -CDEBUG (D_VFSTRACE ,"result: %zu, original count %zu\n" , result, count);return result;
@@ -1578,10 +1533,17 @@ static ssize_t ll_file_write_iter(struct kiocb *iocb, struct iov_iter *from) {struct lu_env *env;struct vvp_io_args *args; -ssize_t rc_tiny, rc_normal; +ssize_t rc_tiny =0 , rc_normal;u16 refcheck; - rc_tiny =ll_do_tiny_write (iocb, from); +/* NB: we can't do direct IO for tiny writes because they use the page +* cache, we can't do sync writes because tiny writes can't flush +* pages, and we can't do append writes because we can't guarantee the +* required DLM locks are held to protect file size. +*/ +if (ll_sbi_has_tiny_write (ll_i2sbi (file_inode (iocb->ki_filp))) && + !(iocb->ki_filp->f_flags & (O_DIRECT |O_SYNC |O_APPEND ))) + rc_tiny =ll_do_tiny_write (iocb, from);/* In case of error, go on and try normal write - Only stop if tiny * write completed I/O.
fs/lustre/llite/llite_internal.h +8 -0
@@ -419,6 +419,7 @@ enum stats_track_type {#define LL_SBI_FILE_SECCTX 0x800000/* set file security context at * create */ +#define LL_SBI_TINY_WRITE 0x2000000/* tiny write support */ #define LL_SBI_FLAGS { \ "nolck", \
@@ -445,6 +446,8 @@ enum stats_track_type {"always_ping" , \"fast_read" , \"file_secctx" , \ +"pio" , \ + "tiny_write", \ }/*
@@ -705,6 +708,11 @@ static inline bool ll_sbi_has_fast_read(struct ll_sb_info *sbi)return !!(sbi->ll_flags &LL_SBI_FAST_READ ); } +static inline bool ll_sbi_has_tiny_write (struct ll_sb_info *sbi) +{ +return !!(sbi->ll_flags &LL_SBI_TINY_WRITE ); +} +void ll_ras_enter (struct file *f);/* llite/lcommon_misc.c */
fs/lustre/llite/llite_lib.c +1 -0
@@ -125,6 +125,7 @@ static struct ll_sb_info *ll_init_sbi(void)atomic_set (&sbi->ll_agl_total,0 ); sbi->ll_flags |=LL_SBI_AGL_ENABLED ; sbi->ll_flags |=LL_SBI_FAST_READ ; + sbi->ll_flags |=LL_SBI_TINY_WRITE ;/* root squash */ sbi->ll_squash.rsi_uid =0 ;
fs/lustre/llite/lproc_llite.c +36 -0
@@ -1024,6 +1024,41 @@ static ssize_t xattr_cache_store(struct kobject *kobj, }LUSTRE_RW_ATTR (xattr_cache); +static ssize_t tiny_write_show (struct kobject *kobj, +struct attribute *attr, +char *buf) +{ + struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, + ll_kset.kobj); + +return sprintf (buf,"%u\n" , !!(sbi->ll_flags &LL_SBI_TINY_WRITE )); +} + +static ssize_t tiny_write_store (struct kobject *kobj, +struct attribute *attr, +const char *buffer, +size_t count) +{ + struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, + ll_kset.kobj); +bool val; +int rc; + + rc =kstrtobool (buffer, &val); +if (rc) +return rc; + +spin_lock (&sbi->ll_lock); +if (val) + sbi->ll_flags |=LL_SBI_TINY_WRITE ; +else + sbi->ll_flags &= ~LL_SBI_TINY_WRITE ; +spin_unlock (&sbi->ll_lock); + +return count; +} +LUSTRE_RW_ATTR (tiny_write); +static ssize_t fast_read_show (struct kobject *kobj,struct attribute *attr,char *buf)
@@ -1225,6 +1260,7 @@ static ssize_t ll_nosquash_nids_seq_write(struct file *file, &lustre_attr_default_easize.attr, &lustre_attr_xattr_cache.attr, &lustre_attr_fast_read.attr, + &lustre_attr_tiny_write.attr, NULL, };
Signature · 1 line
1.8.3.1
PATCH 136/151 lustre: uapi: replace FMODE_{READ, WRITE} with MDS_* equivs
In reply to James SimmonsFrom: Sebastien Buisson <[email protected]>
In UAPI header file lustre/lustre_user.h, replace direct use of FMODE_READ and FMODE_WRITE with MDS_* equivalents. That will avoid name clashes with the kernel symbols, and avoid problems if their values ever change.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10483
Lustre-commit: 5185ba6381ac ("LU-10483 lustre: replace FMODE_{READ,WRITE} with MDS_* equivs")
Reviewed-on: https://review.whamcloud.com/30824
--- fs/lustre/mdc/mdc_lib.c | 8 ++++++-- fs/lustre/mdc/mdc_locks.c | 4 ++-- fs/lustre/obdclass/genops.c | 2 +- include/uapi/linux/lustre/lustre_user.h | 3 +++ 4 files changed, 12 insertions(+), 5 deletions(-)
fs/lustre/mdc/mdc_lib.c +6 -2
@@ -196,8 +196,12 @@ void mdc_create_pack(struct ptlrpc_request *req, struct md_op_data *op_data,static inline u64 mds_pack_open_flags (u64 flags) { -u64 cr_flags = (flags & (FMODE_READ |FMODE_WRITE | -MDS_OPEN_FL_INTERNAL )); +u64 cr_flags = (flags &MDS_OPEN_FL_INTERNAL ); + +if (flags &FMODE_READ ) + cr_flags |=MDS_FMODE_READ ; +if (flags &FMODE_WRITE ) + cr_flags |=MDS_FMODE_WRITE ;if (flags &O_CREAT ) cr_flags |=MDS_OPEN_CREAT ;if (flags &O_EXCL )
fs/lustre/mdc/mdc_locks.c +2 -2
@@ -263,12 +263,12 @@ static int mdc_save_lovea(struct ptlrpc_request *req,/* If inode is known, cancel conflicting OPEN locks. */ if (fid_is_sane (&op_data->op_fid2)) {if (it->it_flags &MDS_OPEN_LEASE ) {/* try to get lease */ -if (it->it_flags &FMODE_WRITE ) +if (it->it_flags &MDS_FMODE_WRITE ) mode =LCK_EX ;else mode =LCK_PR ; }else { -if (it->it_flags & (FMODE_WRITE |MDS_OPEN_TRUNC )) +if (it->it_flags & (MDS_FMODE_WRITE |MDS_OPEN_TRUNC )) mode =LCK_CW ;else if (it->it_flags & __FMODE_EXEC) mode =LCK_PR ;
fs/lustre/obdclass/genops.c +1 -1
@@ -1540,7 +1540,7 @@ static inline bool obd_skip_mod_rpc_slot(const struct lookup_intent *it)if (it && (it->it_op ==IT_GETATTR || it->it_op ==IT_LOOKUP || it->it_op ==IT_READDIR || - (it->it_op ==IT_LAYOUT && !(it->it_flags &FMODE_WRITE )))) + (it->it_op ==IT_LAYOUT && !(it->it_flags &MDS_FMODE_WRITE ))))return true;return false; }
include/uapi/linux/lustre/lustre_user.h +3 -0
@@ -866,6 +866,9 @@ enum la_valid { LA_REMOTE_ATTR_SET = (LA_UID | LA_GID | LA_PROJID | LA_LAYOUT_VERSION) }; +#define MDS_FMODE_READ 00000001 +#define MDS_FMODE_WRITE 00000002 +#define MDS_FMODE_CLOSED 00000000#define MDS_FMODE_EXEC 00000004/* MDS_FMODE_EPOCH 01000000 obsolete since 2.8.0 */
Signature · 1 line
1.8.3.1
PATCH 137/151 lnet: reduce discovery timeout
In reply to James SimmonsFrom: Amir Shehata <[email protected]>
Discovery protocol sends a ping (GET) to the peer and expects a REPLY back with the interface information. Discovery uses the DEFAULT_PEER_TIMEOUT which 180s. This could lead to extended delay during mounting if the OSTs are down or if the ping fails for any reason.
This patch adds a module parameter lnet_transaction_timeout which defaults to 5 seconds. lnet_transaction_timeout is used for the discovery timeout.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10800
Lustre-commit: 1cf929df259a ("LU-10800 lnet: reduce discovery timeout")
Reviewed-on: https://review.whamcloud.com/31663
--- include/linux/lnet/lib-lnet.h | 1 + net/lnet/lnet/api-ni.c | 44 +++++++++++++++++++++++++++++++++++++++++++ net/lnet/lnet/peer.c | 16 ++++++++-------- 3 files changed, 53 insertions(+), 8 deletions(-)
include/linux/lnet/lib-lnet.h +1 -0
@@ -477,6 +477,7 @@ struct lnet_ni *bool lnet_is_ni_healthy_locked (struct lnet_ni *ni);struct lnet_net *lnet_get_net_locked (u32 net_id); +extern unsigned int lnet_transaction_timeout;extern unsigned int lnet_numa_range;extern unsigned int lnet_peer_discovery_disabled;extern int portal_rotor;
net/lnet/lnet/api-ni.c +44 -0
56 lines not on this page · raw message
net/lnet/lnet/peer.c +8 -8
@@ -2942,7 +2942,7 @@ static int lnet_peer_rediscover(struct lnet_peer *lp)* obsessively re-check the clock. The oldest discovery request will * be at the head of the queue. */ -static struct lnet_peer *lnet_peer_dc_timed_out (time64_t now) +static struct lnet_peer *lnet_peer_get_dc_timed_out (time64_t now) {struct lnet_peer *lp;
@@ -2950,7 +2950,7 @@ static struct lnet_peer *lnet_peer_dc_timed_out(time64_t now)return NULL ; lp =list_first_entry (&the_lnet.ln_dc_working, struct lnet_peer, lp_dc_list); -if (now < lp->lp_last_queued +DEFAULT_PEER_TIMEOUT ) +if (now < lp->lp_last_queued + lnet_transaction_timeout)return NULL ;return lp; }
@@ -2961,7 +2961,7 @@ static struct lnet_peer *lnet_peer_dc_timed_out(time64_t now)* lnet_discovery_event_handler() will proceed from here and complete * the cleanup. */ -static void lnet_peer_discovery_timeout (struct lnet_peer *lp) +static void lnet_peer_cancel_discovery (struct lnet_peer *lp) {struct lnet_handle_md ping_mdh;struct lnet_handle_md push_mdh;
@@ -3010,7 +3010,7 @@ static int lnet_peer_discovery_wait_for_work(void)break ;if (!list_empty (&the_lnet.ln_msg_resend))break ; -if (lnet_peer_dc_timed_out (ktime_get_real_seconds ())) +if (lnet_peer_get_dc_timed_out (ktime_get_real_seconds ()))break ;lnet_net_unlock (cpt);
@@ -3177,14 +3177,14 @@ static int lnet_peer_discovery(void *arg)* taking too long. Move all that are found to the * ln_dc_expired queue and time out any pending * Ping or Push. We have to drop the lnet_net_lock -* in the loop because lnet_peer_discovery_timeout() +* in the loop because lnet_peer_cancel_discovery() * calls LNetMDUnlink(). */ now =ktime_get_real_seconds (); -while ((lp =lnet_peer_dc_timed_out (now)) !=NULL ) { +while ((lp =lnet_peer_get_dc_timed_out (now)) !=NULL ) {list_move (&lp->lp_dc_list, &the_lnet.ln_dc_expired);lnet_net_unlock (LNET_LOCK_EX ); -lnet_peer_discovery_timeout (lp); +lnet_peer_cancel_discovery (lp);lnet_net_lock (LNET_LOCK_EX ); }
@@ -3208,7 +3208,7 @@ static int lnet_peer_discovery(void *arg) struct lnet_peer, lp_dc_list);list_move (&lp->lp_dc_list, &the_lnet.ln_dc_expired);lnet_net_unlock (LNET_LOCK_EX ); -lnet_peer_discovery_timeout (lp); +lnet_peer_cancel_discovery (lp);lnet_net_lock (LNET_LOCK_EX ); }lnet_net_unlock (LNET_LOCK_EX );
Signature · 1 line
1.8.3.1
PATCH 138/151 lustre: update version to 2.10.99
In reply to James SimmonsWith all of the the missing patches from the lustre 2.11 version merged upstream its time to update the upstream clients version.
--- include/uapi/linux/lustre/lustre_ver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/lustre/lustre_ver.h +2 -2
@@ -2,10 +2,10 @@#define _LUSTRE_VER_H_#define LUSTRE_MAJOR 2 -#define LUSTRE_MINOR 9 +#define LUSTRE_MINOR 10#define LUSTRE_PATCH 99#define LUSTRE_FIX 0 -#define LUSTRE_VERSION_STRING "2.9.99" +#define LUSTRE_VERSION_STRING "2.10.99"#define OBD_OCD_VERSION (major, minor, patch, fix) \ (((major) << 24) + ((minor) << 16) + ((patch) << 8) + (fix))
Signature · 1 line
1.8.3.1
PATCH 139/151 lustre: ptlrpc: clarify 64 bit time usage
In reply to James SimmonsIn the lustre code various small bits are left for the move to 64 bit time handling. This finishes some of the last bits left. To make clear that a value is in seconds change unsigned int values used for seconds to time64_t. Migrate scp_at_checktime to ktime.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9019
Lustre-commit: fdb5d3d508ed ("libcfs: remove the remaining cfs_time wrappers")
Reviewed-on: https://review.whamcloud.com/31068
--- fs/lustre/include/lustre_net.h | 4 ++-- fs/lustre/ldlm/ldlm_pool.c | 4 ++-- fs/lustre/ptlrpc/import.c | 2 +- fs/lustre/ptlrpc/service.c | 19 ++++++++++--------- net/lnet/libcfs/debug.c | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-)
fs/lustre/include/lustre_net.h +2 -2
@@ -1558,7 +1558,7 @@ struct ptlrpc_service_part {struct list_head scp_rqbd_posted;/** incoming reqs */ struct list_head scp_req_incoming; -/** timeout before re-posting reqs, in tick */ +/** timeout before re-posting reqs, in jiffies */ long scp_rqbd_timeout;/** * all threads sleep on this. This wait-queue is signalled when new
@@ -1611,7 +1611,7 @@ struct ptlrpc_service_part {/** early reply timer */ struct timer_list scp_at_timer;/** debug */ -unsigned long scp_at_checktime; +ktime_t scp_at_checktime;/** check early replies */ unsigned scp_at_check;/** @} */
fs/lustre/ldlm/ldlm_pool.c +2 -2
@@ -887,7 +887,7 @@ static void ldlm_pools_recalc(struct work_struct *ws)struct ldlm_namespace *ns;struct ldlm_namespace *ns_old =NULL ;/* seconds of sleep if no active namespaces */ -int time =LDLM_POOL_CLI_DEF_RECALC_PERIOD ; +time64_t time =LDLM_POOL_CLI_DEF_RECALC_PERIOD ;int nr;/*
@@ -953,7 +953,7 @@ static void ldlm_pools_recalc(struct work_struct *ws)* After setup is done - recalc the pool. */ if (!skip) { -int ttime =ldlm_pool_recalc (&ns->ns_pool); +time64_t ttime =ldlm_pool_recalc (&ns->ns_pool);if (ttime < time) time = ttime;
fs/lustre/ptlrpc/import.c +1 -1
@@ -242,7 +242,7 @@ void ptlrpc_deactivate_import(struct obd_import *imp)return dl - now; } -static unsigned int ptlrpc_inflight_timeout (struct obd_import *imp) +static time64_t ptlrpc_inflight_timeout (struct obd_import *imp) {time64_t now =ktime_get_real_seconds ();struct ptlrpc_request *req, *n;
fs/lustre/ptlrpc/service.c +10 -9
@@ -342,7 +342,7 @@ static void ptlrpc_at_timer(struct timer_list *t) svcpt =from_timer (svcpt, t, scp_at_timer); svcpt->scp_at_check =1 ; - svcpt->scp_at_checktime = jiffies; + svcpt->scp_at_checktime =ktime_get ();wake_up (&svcpt->scp_waitq); }
@@ -933,7 +933,7 @@ static int ptlrpc_check_req(struct ptlrpc_request *req)static void ptlrpc_at_set_timer (struct ptlrpc_service_part *svcpt) {struct ptlrpc_at_array *array = &svcpt->scp_at_array; -s32 next; +time64_t next;if (array->paa_count ==0 ) {del_timer (&svcpt->scp_at_timer);
@@ -941,13 +941,14 @@ static void ptlrpc_at_set_timer(struct ptlrpc_service_part *svcpt) }/* Set timer for closest deadline */ - next = (s32)(array->paa_deadline -ktime_get_real_seconds () - - at_early_margin); + next = array->paa_deadline -ktime_get_real_seconds () - + at_early_margin;if (next <=0 ) {ptlrpc_at_timer (&svcpt->scp_at_timer); }else { -mod_timer (&svcpt->scp_at_timer, jiffies + next *HZ ); -CDEBUG (D_INFO ,"armed %s at %+ds\n" , +mod_timer (&svcpt->scp_at_timer, + jiffies +nsecs_to_jiffies (next *NSEC_PER_SEC )); +CDEBUG (D_INFO ,"armed %s at %+llds\n" , svcpt->scp_service->srv_name, next); } }
@@ -1181,7 +1182,7 @@ static void ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)u32 index, count;time64_t deadline;time64_t now =ktime_get_real_seconds (); -long delay; +s64 delay;int first, counter =0 ;spin_lock (&svcpt->scp_at_lock);
@@ -1189,7 +1190,7 @@ static void ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)spin_unlock (&svcpt->scp_at_lock);return ; } - delay = jiffies - svcpt->scp_at_checktime; + delay =ktime_ms_delta (ktime_get (), svcpt->scp_at_checktime); svcpt->scp_at_check =0 ;if (array->paa_count ==0 ) {
@@ -1254,7 +1255,7 @@ static void ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)*/ LCONSOLE_WARN ("%s: This server is not able to keep up with request traffic (cpu-bound).\n" , svcpt->scp_service->srv_name); -CWARN ("earlyQ=%d reqQ=%d recA=%d, svcEst=%d, delay=%ld(jiff)\n" , +CWARN ("earlyQ=%d reqQ=%d recA=%d, svcEst=%d, delay=%lld\n" , counter, svcpt->scp_nreqs_incoming, svcpt->scp_nreqs_active,at_get (&svcpt->scp_at_estimate), delay);
net/lnet/libcfs/debug.c +1 -1
@@ -129,7 +129,7 @@ static int param_get_delay(char *buffer, const struct kernel_param *kp) {unsigned int d = *(unsigned int *)kp->arg; -return sprintf (buffer,"%u" , (unsigned int )(d *100 ) /HZ ); +return sprintf (buffer,"%lu" ,jiffies_to_msecs (d *10 ) /MSEC_PER_SEC ); }unsigned int libcfs_console_max_delay;
Signature · 1 line
1.8.3.1
PATCH 140/151 lustre: ptlrpc: add watchdog for ptlrpc service threads.
In reply to James SimmonsFrom: NeilBrown <[email protected]>
If a ptlrpc thread takes longer than expected, it can be used to get a stack trace to see where the problem is.
This patch restores this functionality by using a delayed work struct to report a back trace of the thread if it ever fires.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9859
Lustre-commit: fc9de679a4c2 ("LU-9859 ptlrpc: add watchdog for ptlrpc service threads")
Reviewed-on: https://review.whamcloud.com/33018
--- fs/lustre/include/lustre_net.h | 11 ++---- fs/lustre/ptlrpc/service.c | 79 ++++++++++++++++++++++++++++++------- include/linux/libcfs/libcfs_debug.h | 1 + net/lnet/libcfs/debug.c | 3 ++ net/lnet/libcfs/module.c | 12 ++++++ 5 files changed, 84 insertions(+), 22 deletions(-)
fs/lustre/include/lustre_net.h +4 -7
@@ -1298,18 +1298,15 @@ struct ptlrpc_thread {*/ unsigned int t_id;/** -* service thread pid +* service thread */ +struct task_struct *t_task; +ktime_t t_touched;pid_t t_pid;/** * put watchdog in the structure per thread b=14840 -* -* Lustre watchdog is removed for client in the hope -* of a generic watchdog can be merged in kernel. -* When that happens, we should add below back. -* -* struct lc_watchdog *t_watchdog; */ +struct delayed_work t_watchdog;/** * the svc this thread belonged to b=18582 */
fs/lustre/ptlrpc/service.c +64 -15
128 lines not on this page · raw message
include/linux/libcfs/libcfs_debug.h +1 -0
@@ -49,6 +49,7 @@extern unsigned int libcfs_stack;extern unsigned int libcfs_debug;extern unsigned int libcfs_printk; +extern unsigned int libcfs_watchdog_ratelimit;extern unsigned int libcfs_console_ratelimit;extern unsigned int libcfs_console_max_delay;extern unsigned int libcfs_console_min_delay;
net/lnet/libcfs/debug.c +3 -0
@@ -214,6 +214,9 @@ static int param_set_uintpos(const char *val, const struct kernel_param *kp)unsigned int libcfs_catastrophe;EXPORT_SYMBOL (libcfs_catastrophe); +unsigned int libcfs_watchdog_ratelimit =300 ; +EXPORT_SYMBOL (libcfs_watchdog_ratelimit); +unsigned int libcfs_panic_on_lbug =1 ;module_param (libcfs_panic_on_lbug, uint,0644 );MODULE_PARM_DESC (libcfs_panic_on_lbug,"Lustre kernel panic on LBUG" );
net/lnet/libcfs/module.c +12 -0
@@ -336,6 +336,9 @@ static int proc_dobitmasks(struct ctl_table *table, int write,return rc; } +static int min_watchdog_ratelimit;/* disable ratelimiting */ +static int max_watchdog_ratelimit = (24 *60 *60 );/* limit to once per day */ +static int proc_dump_kernel (struct ctl_table *table,int write,void __user *buffer,size_t *lenp,loff_t *ppos) {
@@ -531,6 +534,15 @@ static int proc_cpt_distance(struct ctl_table *table, int write, .proc_handler = &proc_daemon_file, }, { + .procname = "watchdog_ratelimit", + .data = &libcfs_watchdog_ratelimit, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .extra1 = &min_watchdog_ratelimit, + .extra2 = &max_watchdog_ratelimit, + }, + { .procname = "force_lbug", .data = NULL, .maxlen = 0,
Signature · 1 line
1.8.3.1
PATCH 141/151 lustre: handles: discard h_owner in favour of h_ops
In reply to James SimmonsFrom: NeilBrown <[email protected]>
lustre_handles assigned a 64bit unique identifier (a 'cookie') to objects of various types and stored them in a hash table, allowing them to be accessed by the cookie.
There is a facility for type checking by recording an 'owner' for each object, and checking the owner on lookup. Unfortunately this is not used - owner is always zero for the client.
Each object also contains an h_ops pointer which can be used to reliably identify an owner.
So discard h_owner, pass and 'ops' pointer to class_handle2object(), and only return objects for which the h_ops matches.
Note: this h_owner is now quiet different from the similar h_owner in the server code. When the server code is merged the "med" pointer should be stored in the "mfd" and validated separately.
This reduces the size of the portals_handle by one pointer, which benefits various other structures including struct ldlm_lock which can be very populous and so is best keep small.
WC-bug-id: https://jira.whamcloud.com/browse/LU-12542
Lustre-commit: 9bda0a5cad19 ("LU-12542 handles: discard h_owner in favour of h_ops")
Reviewed-on: https://review.whamcloud.com/35739
--- fs/lustre/include/lustre_handles.h | 7 +++---- fs/lustre/ldlm/ldlm_lock.c | 2 +- fs/lustre/obdclass/genops.c | 4 +++- fs/lustre/obdclass/lustre_handles.c | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-)
fs/lustre/include/lustre_handles.h +3 -4
@@ -65,8 +65,7 @@ struct portals_handle_ops {struct portals_handle {struct list_head h_link;u64 h_cookie; -const void *h_owner; -struct portals_handle_ops *h_ops; +const struct portals_handle_ops *h_ops;/* newly added fields to handle the RCU issue. -jxiong */ struct rcu_head h_rcu;
@@ -79,9 +78,9 @@ struct portals_handle {/* Add a handle to the hash table */ void class_handle_hash (struct portals_handle *, -struct portals_handle_ops *ops); +const struct portals_handle_ops *ops);void class_handle_unhash (struct portals_handle *); -void *class_handle2object (u64 cookie,const void *owner); +void *class_handle2object (u64 cookie,const struct portals_handle_ops *ops);void class_handle_free_cb (struct rcu_head *rcu);int class_handle_init (void );void class_handle_cleanup (void );
fs/lustre/ldlm/ldlm_lock.c +1 -1
@@ -518,7 +518,7 @@ struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,LASSERT (handle); - lock =class_handle2object (handle->cookie,NULL ); + lock =class_handle2object (handle->cookie, &lock_handle_ops);if (!lock)return NULL ;
fs/lustre/obdclass/genops.c +3 -1
@@ -680,6 +680,8 @@ int obd_init_caches(void)return -ENOMEM ; } +static struct portals_handle_ops export_handle_ops; +/* map connection to client */ struct obd_export *class_conn2export (struct lustre_handle *conn) {
@@ -696,7 +698,7 @@ struct obd_export *class_conn2export(struct lustre_handle *conn) }CDEBUG (D_INFO ,"looking for export cookie %#llx\n" , conn->cookie); - export =class_handle2object (conn->cookie,NULL ); + export =class_handle2object (conn->cookie, &export_handle_ops);return export; }EXPORT_SYMBOL (class_conn2export);
fs/lustre/obdclass/lustre_handles.c +3 -3
@@ -59,7 +59,7 @@* global (per-node) hash-table. */ void class_handle_hash (struct portals_handle *h, -struct portals_handle_ops *ops) +const struct portals_handle_ops *ops) {struct handle_bucket *bucket;
@@ -132,7 +132,7 @@ void class_handle_unhash(struct portals_handle *h) }EXPORT_SYMBOL (class_handle_unhash); -void *class_handle2object (u64 cookie,const void *owner) +void *class_handle2object (u64 cookie,const struct portals_handle_ops *ops) {struct handle_bucket *bucket;struct portals_handle *h;
@@ -147,7 +147,7 @@ void *class_handle2object(u64 cookie, const void *owner)rcu_read_lock ();list_for_each_entry_rcu (h, &bucket->head, h_link) { -if (h->h_cookie != cookie || h->h_owner != owner) +if (h->h_cookie != cookie || h->h_ops != ops)continue ;spin_lock (&h->h_lock);
Signature · 1 line
1.8.3.1
PATCH 142/151 lustre: ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab
In reply to James SimmonsFrom: NeilBrown <[email protected]>
ldlm_locks are always freed with kfree_rcu(), so there is no need for the underlying pages to also be freed after a grace period. So remove this flag, it is not useful.
WC-bug-id: https://jira.whamcloud.com/browse/LU-11568
Lustre-commit: 82d014e71e14 ("LU-11568 ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab")
Reviewed-on: https://review.whamcloud.com/34147
--- fs/lustre/ldlm/ldlm_lockd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/lustre/ldlm/ldlm_lockd.c +1 -2
@@ -1115,8 +1115,7 @@ int ldlm_init(void) ldlm_lock_slab =kmem_cache_create ("ldlm_locks" ,sizeof (struct ldlm_lock ),0 , -SLAB_HWCACHE_ALIGN | -SLAB_TYPESAFE_BY_RCU ,NULL ); +SLAB_HWCACHE_ALIGN ,NULL );if (!ldlm_lock_slab) goto out_resource;
Signature · 1 line
1.8.3.1
PATCH 143/151 lustre: ldlm: simplify lock_mode_to_index()
In reply to James SimmonsFrom: NeilBrown <[email protected]>
This function has the same effect as ilog2(), so just use ilog2 directly.
WC-bug-id: https://jira.whamcloud.com/browse/LU-12542
Lustre-commit: 32ae82e57cf8 ("LU-12542 ldlm: simplify lock_mode_to_index()")
Reviewed-on: https://review.whamcloud.com/35486
--- fs/lustre/ldlm/ldlm_extent.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/lustre/ldlm/ldlm_extent.c +1 -2
@@ -139,8 +139,7 @@ static inline int lock_mode_to_index(enum ldlm_mode mode)LASSERT (mode !=0 );LASSERT (is_power_of_2 (mode)); -for (index =-1 ; mode; index++) - mode >>=1 ; + index =ilog2 (mode);LASSERT (index <LCK_MODE_NUM );return index; }
Signature · 1 line
1.8.3.1
PATCH 144/151 lustre: ptlrpc: use list_move where appropriate.
In reply to James SimmonsFrom: NeilBrown <[email protected]>
There are several places in lustre where "list_del" (or occasionally "list_del_init") is followed by "list_add" or "list_add_tail" which moves the object to a different list.
These can be combined into "list_move" or "list_move_tail".
WC-bug-id: https://jira.whamcloud.com/browse/LU-4423
Lustre-commit: a71948a4e6de ("LU-4423 ptlrpc: use list_move where appropriate")
Reviewed-on: https://review.whamcloud.com/35507
--- fs/lustre/ldlm/ldlm_lib.c | 5 ++--- fs/lustre/ldlm/ldlm_request.c | 3 +-- fs/lustre/ptlrpc/client.c | 10 ++++------ fs/lustre/ptlrpc/import.c | 3 +-- fs/lustre/ptlrpc/service.c | 13 ++++--------- 5 files changed, 12 insertions(+), 22 deletions(-)
fs/lustre/ldlm/ldlm_lib.c +2 -3
@@ -86,9 +86,8 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,list_for_each_entry (item, &imp->imp_conn_list, oic_item) {if (obd_uuid_equals (uuid, &item->oic_uuid)) {if (priority) { -list_del (&item->oic_item); -list_add (&item->oic_item, - &imp->imp_conn_list); +list_move (&item->oic_item, + &imp->imp_conn_list); item->oic_last_attempt =0 ; } CDEBUG(D_HA, "imp %p@%s: found existing conn %s%s\n",
fs/lustre/ldlm/ldlm_request.c +1 -2
@@ -1132,8 +1132,7 @@ int ldlm_cli_cancel_list_local(struct list_head *cancels, int count,*/ if (!(flags &LCF_BL_AST ) && (rc ==LDLM_FL_BL_AST )) {LDLM_DEBUG (lock,"Cancel lock separately" ); -list_del_init (&lock->l_bl_ast); -list_add (&lock->l_bl_ast, &head); +list_move (&lock->l_bl_ast, &head); bl_ast++;continue ; }
fs/lustre/ptlrpc/client.c +4 -6
@@ -1833,9 +1833,8 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)* put on delay list - only if we wait * recovery finished - before send */ -list_del_init (&req->rq_list); -list_add_tail (&req->rq_list, - &imp->imp_delayed_list); +list_move_tail (&req->rq_list, + &imp->imp_delayed_list);spin_unlock (&imp->imp_lock);continue ; }
@@ -1856,9 +1855,8 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) goto interpret; } -list_del_init (&req->rq_list); -list_add_tail (&req->rq_list, - &imp->imp_sending_list); +list_move_tail (&req->rq_list, + &imp->imp_sending_list);spin_unlock (&imp->imp_lock);
fs/lustre/ptlrpc/import.c +1 -2
@@ -753,8 +753,7 @@ static int ptlrpc_connect_set_flags(struct obd_import *imp,static bool warned;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); +list_move (&imp->imp_conn_current->oic_item, &imp->imp_conn_list); imp->imp_last_success_conn = imp->imp_conn_current->oic_last_attempt;spin_unlock (&imp->imp_lock);
fs/lustre/ptlrpc/service.c +4 -9
@@ -307,11 +307,10 @@ void ptlrpc_dispatch_difficult_reply(struct ptlrpc_reply_state *rs) rqbd =list_first_entry (&svcpt->scp_rqbd_idle, struct ptlrpc_request_buffer_desc, rqbd_list); -list_del (&rqbd->rqbd_list);/* assume we will post successfully */ svcpt->scp_nrqbds_posted++; -list_add (&rqbd->rqbd_list, &svcpt->scp_rqbd_posted); +list_move (&rqbd->rqbd_list, &svcpt->scp_rqbd_posted);spin_unlock (&svcpt->scp_lock);
@@ -325,8 +324,7 @@ void ptlrpc_dispatch_difficult_reply(struct ptlrpc_reply_state *rs)spin_lock (&svcpt->scp_lock); svcpt->scp_nrqbds_posted--; -list_del (&rqbd->rqbd_list); -list_add_tail (&rqbd->rqbd_list, &svcpt->scp_rqbd_idle); +list_move_tail (&rqbd->rqbd_list, &svcpt->scp_rqbd_idle);/* Don't complain if no request buffers are posted right now; LNET * won't drop requests because we set the portal lazy!
@@ -769,9 +767,7 @@ static void ptlrpc_server_drop_request(struct ptlrpc_request *req) refcount = --(rqbd->rqbd_refcount);if (refcount ==0 ) {/* request buffer is now idle: add to history */ -list_del (&rqbd->rqbd_list); - -list_add_tail (&rqbd->rqbd_list, &svcpt->scp_hist_rqbds); +list_move_tail (&rqbd->rqbd_list, &svcpt->scp_hist_rqbds); svcpt->scp_hist_nrqbds++;/* cull some history?
@@ -2416,8 +2412,7 @@ static void ptlrpc_svcpt_stop_threads(struct ptlrpc_service_part *svcpt) struct ptlrpc_thread, t_link)) != NULL) {if (thread_is_stopped (thread)) { -list_del (&thread->t_link); -list_add (&thread->t_link, &zombie); +list_move (&thread->t_link, &zombie);continue ; }spin_unlock (&svcpt->scp_lock);
Signature · 1 line
1.8.3.1
PATCH 145/151 lustre: ptlrpc: simplify locking in ptlrpc_add_rqs_to_pool()
In reply to James SimmonsFrom: NeilBrown <[email protected]>
This spinlock is only needed in this function to
protect the list_add_tail(), so make that more
obvious.
This change means that prp_rq_size is set outside of the spinlock, but as it is only ever read outside of the spinlock, that cannot matter.
WC-bug-id: https://jira.whamcloud.com/browse/LU-4423
Lustre-commit: a0240c3ef723 ("LU-4423 ptlrpc: simplify locking in ptlrpc_add_rqs_to_pool()")
Reviewed-on: https://review.whamcloud.com/35511
--- fs/lustre/ptlrpc/client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/lustre/ptlrpc/client.c +1 -3
@@ -566,13 +566,11 @@ int ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq)"Trying to change pool size with nonempty pool from %d to %d bytes\n" , pool->prp_rq_size, size); -spin_lock (&pool->prp_lock); pool->prp_rq_size = size;for (i =0 ; i < num_rq; i++) {struct ptlrpc_request *req;struct lustre_msg *msg; -spin_unlock (&pool->prp_lock); req =ptlrpc_request_cache_alloc (GFP_KERNEL );if (!req)return i;
@@ -586,8 +584,8 @@ int ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq) req->rq_pool = pool;spin_lock (&pool->prp_lock);list_add_tail (&req->rq_list, &pool->prp_req_list); +spin_unlock (&pool->prp_lock); } -spin_unlock (&pool->prp_lock);return num_rq; }EXPORT_SYMBOL (ptlrpc_add_rqs_to_pool);
Signature · 1 line
1.8.3.1
PATCH 146/151 lustre: ptlrpc: incorporate BUILD_BUG_ON into ptlrpc_req_async_args()
In reply to James SimmonsFrom: NeilBrown <[email protected]>
Every call to ptlrpc_req_async_args() should be preceded by a BUILD_BUG_ON() (aka LASSERT()), though a few aren't.
To improve maintainability, include the BUILD_BUG_ON into the ptlrpc_req_async_args() macro.
WC-bug-id: https://jira.whamcloud.com/browse/LU-4423
Lustre-commit: b56177451975 ("LU-4423 ptlrpc: incorporate BUILD_BUG_ON into ptlrpc_req_async_args()")
Reviewed-on: https://review.whamcloud.com/35509
--- fs/lustre/include/lustre_net.h | 7 +++++-- fs/lustre/ldlm/ldlm_request.c | 3 +-- fs/lustre/mdc/mdc_dev.c | 5 ++--- fs/lustre/mdc/mdc_locks.c | 7 +++---- fs/lustre/osc/osc_io.c | 3 +-- fs/lustre/osc/osc_request.c | 29 ++++++++++------------------- fs/lustre/ptlrpc/client.c | 6 ++---- fs/lustre/ptlrpc/import.c | 3 +-- 8 files changed, 25 insertions(+), 38 deletions(-)
fs/lustre/include/lustre_net.h +5 -2
@@ -309,8 +309,11 @@#define OBD_MAX_SHORT_IO_BYTES (min(max(PAGE_SIZE, 16UL * 1024UL), \ OST_SHORT_IO_SPACE & PAGE_MASK)) -/* Macro to hide a typecast. */ -#define ptlrpc_req_async_args (req) ((void *)&req->rq_async_args) +/* Macro to hide a typecast and BUILD_BUG. */ +#define ptlrpc_req_async_args (_var, req) ({ \ + BUILD_BUG_ON(sizeof(*_var) > sizeof(req->rq_async_args)); \ + (typeof(_var))&req->rq_async_args; \ + })struct ptlrpc_replay_async_args {int praa_old_state;
fs/lustre/ldlm/ldlm_request.c +1 -2
@@ -2016,8 +2016,7 @@ static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock)LDLM_DEBUG (lock,"replaying lock:" );atomic_inc (&req->rq_import->imp_replay_inflight); -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req); aa->lock_handle = body->lock_handle[0 ]; req->rq_interpret_reply = (ptlrpc_interpterer_t )replay_lock_interpret;ptlrpcd_add_req (req);
fs/lustre/mdc/mdc_dev.c +2 -3
@@ -733,7 +733,7 @@ int mdc_enqueue_send(const struct lu_env *env, struct obd_export *exp,if (!rc) {struct osc_enqueue_args *aa; - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req); aa->oa_exp = exp; aa->oa_mode = einfo->ei_mode; aa->oa_type = einfo->ei_type;
@@ -1195,8 +1195,7 @@ static int mdc_io_data_version_start(const struct lu_env *env,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 =ptlrpc_req_async_args (dva, req); dva->dva_oio = oio;ptlrpcd_add_req (req);
fs/lustre/mdc/mdc_locks.c +3 -4
@@ -49,8 +49,8 @@#include "mdc_internal.h" struct mdc_getattr_args { -struct obd_export *ga_exp; -struct md_enqueue_info *ga_minfo; +struct obd_export *ga_exp; +struct md_enqueue_info *ga_minfo; };int it_open_error (int phase,struct lookup_intent *it)
@@ -1329,8 +1329,7 @@ int mdc_intent_getattr_async(struct obd_export *exp,return rc; } -BUILD_BUG_ON (sizeof (*ga) >sizeof (req->rq_async_args)); - ga =ptlrpc_req_async_args (req); + ga =ptlrpc_req_async_args (ga, req); ga->ga_exp = exp; ga->ga_minfo = minfo;
fs/lustre/osc/osc_io.c +1 -2
@@ -689,8 +689,7 @@ static int osc_io_data_version_start(const struct lu_env *env,ptlrpc_request_set_replen (req); req->rq_interpret_reply = osc_data_version_interpret; -BUILD_BUG_ON (sizeof (*dva) >sizeof (req->rq_async_args)); - dva =ptlrpc_req_async_args (req); + dva =ptlrpc_req_async_args (dva, req); dva->dva_oio = oio;ptlrpcd_add_req (req);
fs/lustre/osc/osc_request.c +10 -19
@@ -236,8 +236,7 @@ int osc_setattr_async(struct obd_export *exp, struct obdo *oa, req->rq_interpret_reply = (ptlrpc_interpterer_t )osc_setattr_interpret; -BUILD_BUG_ON (sizeof (*sa) >sizeof (req->rq_async_args)); - sa =ptlrpc_req_async_args (req); + sa =ptlrpc_req_async_args (sa, req); sa->sa_oa = oa; sa->sa_upcall = upcall; sa->sa_cookie = cookie;
@@ -321,8 +320,7 @@ int osc_ladvise_base(struct obd_export *exp, struct obdo *oa, } req->rq_interpret_reply = osc_ladvise_interpret; -BUILD_BUG_ON (sizeof (*la) >sizeof (req->rq_async_args)); - la =ptlrpc_req_async_args (req); + la =ptlrpc_req_async_args (la, req); la->la_oa = oa; la->la_upcall = upcall; la->la_cookie = cookie;
@@ -417,8 +415,7 @@ int osc_punch_send(struct obd_export *exp, struct obdo *oa,ptlrpc_request_set_replen (req); req->rq_interpret_reply = (ptlrpc_interpterer_t )osc_setattr_interpret; -BUILD_BUG_ON (sizeof (*sa) >sizeof (req->rq_async_args)); - sa =ptlrpc_req_async_args (req); + sa =ptlrpc_req_async_args (sa, req); sa->sa_oa = oa; sa->sa_upcall = upcall; sa->sa_cookie = cookie;
@@ -497,8 +494,7 @@ int osc_sync_base(struct osc_object *obj, struct obdo *oa,ptlrpc_request_set_replen (req); req->rq_interpret_reply = osc_sync_interpret; -BUILD_BUG_ON (sizeof (*fa) >sizeof (req->rq_async_args)); - fa =ptlrpc_req_async_args (req); + fa =ptlrpc_req_async_args (fa, req); fa->fa_obj = obj; fa->fa_oa = oa; fa->fa_upcall = upcall;
@@ -1338,8 +1334,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli, }ptlrpc_request_set_replen (req); -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req); aa->aa_oa = oa; aa->aa_requested_nob = requested_nob; aa->aa_nio_count = niocount;
@@ -1725,7 +1720,7 @@ static int osc_brw_redo_request(struct ptlrpc_request *request, new_req->rq_generation_set =1 ; new_req->rq_import_generation = request->rq_import_generation; - new_aa =ptlrpc_req_async_args (new_req); + new_aa =ptlrpc_req_async_args (new_aa, new_req);INIT_LIST_HEAD (&new_aa->aa_oaps);list_splice_init (&aa->aa_oaps, &new_aa->aa_oaps);
@@ -2074,8 +2069,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,cl_req_attr_set (env,osc2cl (obj), crattr);lustre_msg_set_jobid (req->rq_reqmsg, crattr->cra_jobid); -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req);INIT_LIST_HEAD (&aa->aa_oaps);list_splice_init (&rpc_list, &aa->aa_oaps);INIT_LIST_HEAD (&aa->aa_exts);
@@ -2365,8 +2359,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,if (!rc) {struct osc_enqueue_args *aa; -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req); aa->oa_exp = exp; aa->oa_mode = einfo->ei_mode; aa->oa_type = einfo->ei_type;
@@ -2519,8 +2512,7 @@ static int osc_statfs_async(struct obd_export *exp, } req->rq_interpret_reply = (ptlrpc_interpterer_t )osc_statfs_interpret; -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req); aa->aa_oi = oinfo;ptlrpc_set_add_req (rqset, req);
@@ -2725,8 +2717,7 @@ int osc_set_info_async(const struct lu_env *env, struct obd_export *exp,struct osc_brw_async_args *aa;struct obdo *oa; -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req); oa =kmem_cache_zalloc (obdo_cachep,GFP_NOFS );if (!oa) {ptlrpc_req_finished (req);
fs/lustre/ptlrpc/client.c +2 -4
@@ -2926,8 +2926,7 @@ int ptlrpc_replay_req(struct ptlrpc_request *req)LASSERT (req->rq_import->imp_state ==LUSTRE_IMP_REPLAY ); -BUILD_BUG_ON (sizeof (*aa) >sizeof (req->rq_async_args)); - aa =ptlrpc_req_async_args (req); + aa =ptlrpc_req_async_args (aa, req);memset (aa,0 ,sizeof (*aa));/* Prepare request to be resent with ptlrpcd */
@@ -3258,8 +3257,7 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, req->rq_no_resend =1 ; req->rq_pill.rc_fmt = (void *)&worker_format; -BUILD_BUG_ON (sizeof (*args) >sizeof (req->rq_async_args)); - args =ptlrpc_req_async_args (req); + args =ptlrpc_req_async_args (args, req); args->cb = cb; args->cbdata = cbdata;
fs/lustre/ptlrpc/import.c +1 -2
@@ -696,8 +696,7 @@ int ptlrpc_connect_import(struct obd_import *imp)ptlrpc_request_set_replen (request); request->rq_interpret_reply = ptlrpc_connect_interpret; -BUILD_BUG_ON (sizeof (*aa) >sizeof (request->rq_async_args)); - aa =ptlrpc_req_async_args (request); + aa =ptlrpc_req_async_args (aa, request);memset (aa,0 ,sizeof (*aa)); aa->pcaa_peer_committed = committed_before_reconnect;
Signature · 1 line
1.8.3.1
PATCH 147/151 lustre: introduce CONFIG_LUSTRE_FS_POSIX_ACL
In reply to James SimmonsFrom: NeilBrown <[email protected]>
Lustre (or any file system) should not conditionally compile code based on CONFIG_FS_POSIX_ACL. This config option enables library support.
A file system can define it's own config option, which then selects CONFIG_FS_POSIX_ACL (if needed). It should act on its own option, not the library one.
This patch makes that change.
WC-bug-id: https://jira.whamcloud.com/browse/LU-6142
Lustre-commit: 19b2bc9bbc25 ("LU-6142 lustre: introduce CONFIG_LUSTRE_FS_POSIX_ACL")
Reviewed-on: https://review.whamcloud.com/36085
--- fs/lustre/Kconfig | 11 +++++++++++ fs/lustre/include/lustre_acl.h | 6 +++--- fs/lustre/include/obd.h | 2 +- fs/lustre/llite/Makefile | 2 +- fs/lustre/llite/llite_internal.h | 4 ++-- fs/lustre/llite/llite_lib.c | 10 +++++----- fs/lustre/llite/xattr.c | 4 ++-- fs/lustre/mdc/mdc_request.c | 6 +++--- 8 files changed, 28 insertions(+), 17 deletions(-)
fs/lustre/Kconfig +11 -0
@@ -30,6 +30,17 @@ config LUSTRE_FS See also http://wiki.lustre.org/ +config LUSTRE_FS_POSIX_ACL + bool "Lustre POSIX Access Control Lists" + depends on LUSTRE_FS + select FS_POSIX_ACL + help + POSIX Access Control Lists (ACLs) support permissions for users and + groups beyond the owner/group/world scheme. + Lustre can support these ACLs. + + In in doubt, say Y. + config LUSTRE_DEBUG_EXPENSIVE_CHECK bool "Enable Lustre DEBUG checks" depends on LUSTRE_FS
fs/lustre/include/lustre_acl.h +3 -3
@@ -38,7 +38,7 @@#include <linux/fs.h> #include <linux/dcache.h> -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL #include <linux/posix_acl_xattr.h> #define LUSTRE_POSIX_ACL_MAX_ENTRIES 32
@@ -46,8 +46,8 @@ (sizeof (struct posix_acl_xattr_header ) + \ LUSTRE_POSIX_ACL_MAX_ENTRIES * sizeof(struct posix_acl_xattr_entry)) -#else /* ! CONFIG_FS_POSIX_ACL */ +#else /* ! CONFIG_LUSTRE_FS_POSIX_ACL */ #define LUSTRE_POSIX_ACL_MAX_SIZE_OLD 0 -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ #endif
fs/lustre/include/obd.h +1 -1
@@ -903,7 +903,7 @@ struct lustre_md {struct mdt_body *body;struct lu_buf layout;struct lmv_stripe_md *lmv; -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL struct posix_acl *posix_acl;#endif struct mdt_remote_perm *remote_perm;
fs/lustre/llite/Makefile +1 -1
@@ -9,4 +9,4 @@ lustre-y := dcache.o dir.o file.o llite_lib.o llite_nfs.o \ vvp_dev.o vvp_page.o vvp_io.o vvp_object.o \ lproc_llite.o -lustre-$(CONFIG_FS_POSIX_ACL) += acl.o +lustre-$(CONFIG_LUSTRE_FS_POSIX_ACL) += acl.o
fs/lustre/llite/llite_internal.h +2 -2
@@ -825,13 +825,13 @@ enum ldlm_mode ll_take_md_lock(struct inode *inode, u64 bits,int ll_md_real_close (struct inode *inode,fmode_t fmode);int ll_getattr (const struct path *path,struct kstat *stat,u32 request_mask,unsigned int flags); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL struct posix_acl *ll_get_acl (struct inode *inode,int type);int ll_set_acl (struct inode *inode,struct posix_acl *acl,int type);#else #define ll_get_acl NULL#define ll_set_acl NULL -#endif /* CONFIG_FS_POSIX_ACL */ +#endif /* CONFIG_LUSTRE_FS_POSIX_ACL */ int ll_migrate (struct inode *parent,struct file *file,int mdtidx,const char *name,int namelen);
fs/lustre/llite/llite_lib.c +5 -5
@@ -213,7 +213,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)if (sbi->ll_flags &LL_SBI_LRU_RESIZE ) data->ocd_connect_flags |=OBD_CONNECT_LRU_RESIZE ; -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL data->ocd_connect_flags |=OBD_CONNECT_ACL |OBD_CONNECT_UMASK |OBD_CONNECT_LARGE_ACL ;#endif
@@ -542,7 +542,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)ptlrpc_req_finished (request);if (IS_ERR (root)) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (lmd.posix_acl) {posix_acl_release (lmd.posix_acl); lmd.posix_acl =NULL ;
@@ -1425,7 +1425,7 @@ void ll_clear_inode(struct inode *inode)ll_xattr_cache_destroy (inode); -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL forget_all_cached_acls (inode);if (lli->lli_posix_acl) {posix_acl_release (lli->lli_posix_acl);
@@ -1857,7 +1857,7 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)return rc; } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (body->mbo_valid &OBD_MD_FLACL ) {spin_lock (&lli->lli_lock);if (lli->lli_posix_acl)
@@ -2272,7 +2272,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, sbi->ll_flags & LL_SBI_32BIT_API), &md);if (IS_ERR (*inode)) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL if (md.posix_acl) {posix_acl_release (md.posix_acl); md.posix_acl =NULL ;
fs/lustre/llite/xattr.c +2 -2
@@ -422,7 +422,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,if (rc)return rc; -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL /* posix acl is under protection of LOOKUP lock. when calling to this, * we just have path resolution to the target inode, so we have great * chance that cached ACL is uptodate.
@@ -665,7 +665,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) &ll_user_xattr_handler, &ll_trusted_xattr_handler, &ll_security_xattr_handler, -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL &ll_acl_access_xattr_handler, &ll_acl_default_xattr_handler, #endif
fs/lustre/mdc/mdc_request.c +3 -3
@@ -440,7 +440,7 @@ static int mdc_getxattr(struct obd_export *exp, const struct lu_fid *fid, req); } -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL static int mdc_unpack_acl (struct ptlrpc_request *req,struct lustre_md *md) {struct req_capsule *pill = &req->rq_pill;
@@ -567,7 +567,7 @@ static int mdc_get_lustre_md(struct obd_export *exp, rc =mdc_unpack_acl (req, md);if (rc) goto out; -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL }else { md->posix_acl =NULL ;#endif
@@ -576,7 +576,7 @@ static int mdc_get_lustre_md(struct obd_export *exp, out:if (rc) { -#ifdef CONFIG_FS_POSIX_ACL +#ifdef CONFIG_LUSTRE_FS_POSIX_ACL posix_acl_release (md->posix_acl);#endif }
Signature · 1 line
1.8.3.1
PATCH 148/151 lustre: ptlrpc: discard a server-only waitq.
In reply to James SimmonsFrom: NeilBrown <[email protected]>
This is needed on the client. The server should probably be used wait_var_event() / wake_up_var().
--- fs/lustre/include/lustre_net.h | 1 - fs/lustre/ptlrpc/client.c | 1 - 2 files changed, 2 deletions(-)
fs/lustre/include/lustre_net.h +0 -1
@@ -1235,7 +1235,6 @@ struct ptlrpc_bulk_desc {/** Back pointer to the request */ struct ptlrpc_request *bd_req;const struct ptlrpc_bulk_frag_ops *bd_frag_ops; -wait_queue_head_t bd_waitq;/* server side only WQ */ int bd_iov_count;/* # entries in bd_iov */ int bd_max_iov;/* allocated size of bd_iov */ int bd_nob;/* # bytes covered */
fs/lustre/ptlrpc/client.c +0 -1
@@ -166,7 +166,6 @@ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned int nfrags, }spin_lock_init (&desc->bd_lock); -init_waitqueue_head (&desc->bd_waitq); desc->bd_max_iov = nfrags; desc->bd_iov_count =0 ; desc->bd_portal = portal;
Signature · 1 line
1.8.3.1
PATCH 149/151 lustre: llite: remove // comments.
In reply to James SimmonsFrom: NeilBrown <[email protected]>
Apart from the SPDX-License-Identifier comments, the only remaining // comments are now themselves inside /* */ comments, so they don't really count as comments.
The comments about rw_semaphore alignment are completely outdated.
--- fs/lustre/llite/llite_internal.h | 7 ------- 1 file changed, 7 deletions(-)
fs/lustre/llite/llite_internal.h +0 -7
@@ -183,13 +183,6 @@ struct ll_inode_info {struct {struct mutex lli_size_mutex;char *lli_symlink_name; -/* -* struct rw_semaphore { -* signed long count; // align d.d_def_acl -* spinlock_t wait_lock; // align d.d_sa_lock -* struct list_head wait_list; -* } -*/ struct rw_semaphore lli_trunc_sem;struct range_lock_tree lli_write_tree;
Signature · 1 line
1.8.3.1
PATCH 150/151 lustre: remove outdated comments about ->ap_* functions.
In reply to James SimmonsFrom: NeilBrown <[email protected]>
->ap_make_ready, ->ap_completion, ap_refresh count all no longer exist.
So remove these comments.
--- fs/lustre/include/obd.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
fs/lustre/include/obd.h +1 -8
@@ -224,14 +224,7 @@ struct client_obd {*/ /* * ->cl_loi_list_lock protects consistency of -* ->cl_loi_{ready,read,write}_list. ->ap_make_ready() and -* ->ap_completion() call-backs are executed under this lock. As we -* cannot guarantee that these call-backs never block on all platforms -* (as a matter of fact they do block on Mac OS X), type of -* ->cl_loi_list_lock is platform dependent: it's a spin-lock on Linux -* and blocking mutex on Mac OS X. (Alternative is to make this lock -* blocking everywhere, but we don't want to slow down fast-path of -* our main platform.) +* ->cl_loi_{ready,read,write}_list. * * NB by Jinshan: though field names are still _loi_, but actually * osc_object{}s are in the list.
Signature · 1 line
1.8.3.1
PATCH 151/151 lustre: clean up some comment alignment.
In reply to James SimmonsFrom: NeilBrown <[email protected]>
This patch resulted from search for "<tab><space>/*" and cleaning up the alignment, often removing the space and possibly inserting a tab, but sometimes leaving spaces after tabs, particularly in structure declarations.
--- fs/lustre/include/lprocfs_status.h | 2 +- fs/lustre/include/lustre_import.h | 4 +- fs/lustre/include/lustre_net.h | 8 +-- fs/lustre/include/obd.h | 14 ++--- fs/lustre/include/obd_support.h | 2 +- fs/lustre/ldlm/ldlm_lockd.c | 2 +- fs/lustre/llite/llite_internal.h | 10 ++-- fs/lustre/mdc/mdc_lib.c | 2 +- fs/lustre/obdclass/llog.c | 2 +- fs/lustre/obdclass/lprocfs_status.c | 4 +- fs/lustre/obdecho/echo_client.c | 2 +- fs/lustre/ptlrpc/client.c | 4 +- fs/lustre/ptlrpc/niobuf.c | 4 +- fs/lustre/ptlrpc/pack_generic.c | 2 +- fs/lustre/ptlrpc/sec_null.c | 4 +- fs/lustre/ptlrpc/sec_plain.c | 6 +- fs/lustre/ptlrpc/service.c | 10 ++-- fs/lustre/ptlrpc/wiretest.c | 12 ++-- include/linux/libcfs/libcfs_debug.h | 4 +- include/linux/lnet/lib-types.h | 8 +-- include/uapi/linux/lustre/lustre_idl.h | 34 +++++------ include/uapi/linux/lustre/lustre_param.h | 28 +++++----- include/uapi/linux/lustre/lustre_user.h | 32 +++++------ net/lnet/klnds/o2iblnd/o2iblnd.c | 6 +- net/lnet/klnds/o2iblnd/o2iblnd.h | 78 +++++++++++++++----------- net/lnet/klnds/o2iblnd/o2iblnd_cb.c | 84 ++++++++++++++-------------- net/lnet/klnds/socklnd/socklnd.c | 10 ++-- net/lnet/klnds/socklnd/socklnd_cb.c | 26 ++++----- net/lnet/klnds/socklnd/socklnd_lib.c | 8 +-- net/lnet/libcfs/debug.c | 4 +- net/lnet/libcfs/tracefile.c | 8 +-- net/lnet/lnet/acceptor.c | 6 +- net/lnet/lnet/config.c | 6 +- net/lnet/lnet/lib-move.c | 16 +++--- net/lnet/lnet/lo.c | 2 +- net/lnet/lnet/router.c | 8 +-- net/lnet/selftest/conrpc.c | 2 +- net/lnet/selftest/conrpc.h | 16 +++--- net/lnet/selftest/console.h | 96 ++++++++++++++++---------------- net/lnet/selftest/framework.c | 14 ++--- net/lnet/selftest/rpc.h | 28 +++++----- net/lnet/selftest/selftest.h | 38 ++++++------- 42 files changed, 336 insertions(+), 320 deletions(-)
fs/lustre/include/lprocfs_status.h +1 -1
@@ -216,7 +216,7 @@ struct lprocfs_stats {static inline int opcode_offset (u32 opc) {if (opc <OST_LAST_OPC ) { -/* OST opcode */ +/* OST opcode */ return (opc -OST_FIRST_OPC ); }else if (opc <MDS_LAST_OPC ) {/* MDS opcode */
fs/lustre/include/lustre_import.h +2 -2
@@ -54,8 +54,8 @@* @{ */ #define D_ADAPTTO D_OTHER -#define AT_BINS 4/* "bin" means "N seconds of history" */ -#define AT_FLG_NOHIST 0x1/* use last reported value only */ +#define AT_BINS 4/* "bin" means "N seconds of history" */ +#define AT_FLG_NOHIST 0x1/* use last reported value only */ struct adaptive_timeout {time64_t at_binstart;/* bin start time */
fs/lustre/include/lustre_net.h +4 -4
@@ -418,7 +418,7 @@ struct ptlrpc_request_set {*/ struct ptlrpc_cb_id {void (*cbid_fn)(struct lnet_event *ev);/* specific callback fn */ -void *cbid_arg;/* additional arg */ +void *cbid_arg;/* additional arg */ };/** Maximum number of locks to fit into reply state */
@@ -1235,9 +1235,9 @@ struct ptlrpc_bulk_desc {/** Back pointer to the request */ struct ptlrpc_request *bd_req;const struct ptlrpc_bulk_frag_ops *bd_frag_ops; -int bd_iov_count;/* # entries in bd_iov */ -int bd_max_iov;/* allocated size of bd_iov */ -int bd_nob;/* # bytes covered */ +int bd_iov_count;/* # entries in bd_iov */ +int bd_max_iov;/* allocated size of bd_iov */ +int bd_nob;/* # bytes covered */ int bd_nob_transferred;/* # bytes GOT/PUT */ u64 bd_last_mbits;
fs/lustre/include/obd.h +7 -7
@@ -544,21 +544,21 @@ struct obd_device {char obd_name[MAX_OBD_NAME ];/* bitfield modification is protected by obd_dev_lock */ - unsigned long obd_attached:1, /* finished attach */ - obd_set_up:1, /* finished setup */ + unsigned long obd_attached:1, /* finished attach */ + obd_set_up:1, /* finished setup */ obd_version_recov:1, /* obd uses version checking */ - obd_replayable:1,/* recovery is enabled; inform clients */ - obd_no_transno:1, /* no committed-transno notification */ + obd_replayable:1, /* recovery is enabled; inform clients */ + obd_no_transno:1, /* no committed-transno notification */ obd_no_recov:1, /* fail instead of retry messages */ obd_stopping:1, /* started cleanup */ obd_starting:1, /* started setup */ - obd_force:1, /* cleanup with > 0 obd refcount */ - obd_fail:1, /* cleanup with failover */ + obd_force:1, /* cleanup with > 0 obd refcount */ + obd_fail:1, /* cleanup with failover */ obd_no_conn:1, /* deny new connections */ obd_inactive:1, /* device active/inactive* (for sysfs status only!!) */ - obd_no_ir:1, /* no imperative recovery. */ + obd_no_ir:1, /* no imperative recovery. */ obd_process_conf:1, /* device is processing mgs config */ obd_checksum_dump:1; /* dump pages upon cksum error *//* use separate field as it is set in interrupt to don't mess with
fs/lustre/include/obd_support.h +1 -1
@@ -46,7 +46,7 @@/* obd_timeout should only be used for recovery, not for * networking / disk / timings affected by load (use Adaptive Timeouts) */ -extern unsigned int obd_timeout;/* seconds */ +extern unsigned int obd_timeout;/* seconds */ extern unsigned int obd_timeout_set;extern unsigned int at_min;extern unsigned int at_max;
fs/lustre/ldlm/ldlm_lockd.c +1 -1
@@ -659,7 +659,7 @@ static int ldlm_callback_handler(struct ptlrpc_request *req)ldlm_handle_gl_callback (req, ns, dlm_req, lock);break ;default : -LBUG ();/* checked above */ +LBUG ();/* checked above */ }return 0 ;
fs/lustre/llite/llite_internal.h +5 -5
@@ -330,11 +330,11 @@ struct ll_ra_info {* counted by page index. */ struct ra_io_arg { -unsigned long ria_start;/* start offset of read-ahead*/ -unsigned long ria_end;/* end offset of read-ahead*/ -unsigned long ria_reserved;/* reserved pages for read-ahead */ -unsigned long ria_end_min;/* minimum end to cover current read */ -bool ria_eof;/* reach end of file */ +unsigned long ria_start;/* start offset of read-ahead*/ +unsigned long ria_end;/* end offset of read-ahead*/ +unsigned long ria_reserved;/* reserved pages for read-ahead */ +unsigned long ria_end_min;/* minimum end to cover current read */ +bool ria_eof;/* reach end of file */ /* If stride read pattern is detected, ria_stoff means where * stride read is started. Note: for normal read-ahead, the * value here is meaningless, and also it will not be accessed
fs/lustre/mdc/mdc_lib.c +1 -1
@@ -145,7 +145,7 @@ void mdc_readdir_pack(struct ptlrpc_request *req, u64 pgoff, size_t size, &RMF_MDT_BODY); b->mbo_fid1 = *fid; b->mbo_valid |=OBD_MD_FLID ; - b->mbo_size = pgoff;/* !! */ + b->mbo_size = pgoff;/* !! */ b->mbo_nlink = size;/* !! */ __mdc_pack_body (b,-1 ); b->mbo_mode =LUDA_FID |LUDA_TYPE ;
fs/lustre/obdclass/llog.c +1 -1
@@ -123,7 +123,7 @@ static int llog_read_header(const struct lu_env *env,/* lrh_len should be initialized in llog_init_handle */ handle->lgh_last_idx =0 ;/* header is record with index 0 */ - llh->llh_count =1 ;/* for the header record */ + llh->llh_count =1 ;/* for the header record */ llh->llh_hdr.lrh_type =LLOG_HDR_MAGIC ;LASSERT (handle->lgh_ctxt->loc_chunk_size >=LLOG_MIN_CHUNK_SIZE ); llh->llh_hdr.lrh_len = handle->lgh_ctxt->loc_chunk_size;
fs/lustre/obdclass/lprocfs_status.c +2 -2
@@ -1604,8 +1604,8 @@ char *lprocfs_find_named_value(const char *buffer, const char *name,if (!val)return (char *)buffer; - val +=strlen (name);/* skip prefix */ -while (val < buffer + buflen &&isspace (*val))/* skip separator */ + val +=strlen (name);/* skip prefix */ +while (val < buffer + buflen &&isspace (*val))/* skip separator */ val++; *count =0 ;
fs/lustre/obdecho/echo_client.c +1 -1
@@ -1506,7 +1506,7 @@ static int echo_client_brw_ioctl(const struct lu_env *env, int rw, }switch (cmd) { -case OBD_IOC_CREATE :/* may create echo object */ +case OBD_IOC_CREATE :/* may create echo object */ if (!capable (CAP_SYS_ADMIN )) { rc = -EPERM ; goto out;
fs/lustre/ptlrpc/client.c +2 -2
@@ -277,8 +277,8 @@ int ptlrpc_prep_bulk_frag(struct ptlrpc_bulk_desc *desc,void ptlrpc_free_bulk (struct ptlrpc_bulk_desc *desc) { -LASSERT (desc->bd_iov_count !=LI_POISON );/* not freed already */ -LASSERT (desc->bd_md_count ==0 );/* network hands off */ +LASSERT (desc->bd_iov_count !=LI_POISON );/* not freed already */ +LASSERT (desc->bd_md_count ==0 );/* network hands off */ LASSERT ((desc->bd_export !=NULL ) ^ (desc->bd_import !=NULL ));LASSERT (desc->bd_frag_ops);
fs/lustre/ptlrpc/niobuf.c +2 -2
@@ -171,7 +171,7 @@ static int ptlrpc_register_bulk(struct ptlrpc_request *req) desc->bd_md_count = total_md; md.user_ptr = &desc->bd_cbid; md.eq_handle = ptlrpc_eq_h; - md.threshold =1 ;/* PUT or GET */ + md.threshold =1 ;/* PUT or GET */ for (posted_md =0 ; posted_md < total_md; posted_md++, mbits++) { md.options = PTLRPC_MD_OPTIONS |
@@ -416,7 +416,7 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)CERROR ("not replying on NULL connection\n" );/* bug 9635 */ return -ENOTCONN ; } -ptlrpc_rs_addref (rs);/* +1 ref for the network */ +ptlrpc_rs_addref (rs);/* +1 ref for the network */ rc =sptlrpc_svc_wrap_reply (req);if (unlikely (rc))
fs/lustre/ptlrpc/pack_generic.c +1 -1
@@ -703,7 +703,7 @@ char *lustre_msg_string(struct lustre_msg *m, u32 index, u32 max_len) slen =strnlen (str, blen); -if (slen == blen) {/* not NULL terminated */ +if (slen == blen) {/* not NULL terminated */ CERROR ("can't unpack non-NULL terminated string in msg %p buffer[%d] len %d\n" , m, index, blen);return NULL ;
fs/lustre/ptlrpc/sec_null.c +2 -2
@@ -409,7 +409,7 @@ static void null_init_internal(void)static HLIST_HEAD (__list); null_sec.ps_policy = &null_policy; -atomic_set (&null_sec.ps_refcount,1 );/* always busy */ +atomic_set (&null_sec.ps_refcount,1 );/* always busy */ null_sec.ps_id =-1 ; null_sec.ps_import =NULL ; null_sec.ps_flvr.sf_rpc =SPTLRPC_FLVR_NULL ;
@@ -417,7 +417,7 @@ static void null_init_internal(void) null_sec.ps_part =LUSTRE_SP_ANY ; null_sec.ps_dying =0 ;spin_lock_init (&null_sec.ps_lock); -atomic_set (&null_sec.ps_nctx,1 );/* for "null_cli_ctx" */ +atomic_set (&null_sec.ps_nctx,1 );/* for "null_cli_ctx" */ INIT_LIST_HEAD (&null_sec.ps_gc_list); null_sec.ps_gc_interval =0 ; null_sec.ps_gc_next =0 ;
fs/lustre/ptlrpc/sec_plain.c +3 -3
@@ -76,10 +76,10 @@ static inline struct plain_sec *sec2plsec(struct ptlrpc_sec *sec)#define PLAIN_FL_BULK (0x02)struct plain_header { -u8 ph_ver;/* 0 */ +u8 ph_ver;/* 0 */ u8 ph_flags; -u8 ph_sp;/* source */ -u8 ph_bulk_hash_alg;/* complete flavor desc */ +u8 ph_sp;/* source */ +u8 ph_bulk_hash_alg;/* complete flavor desc */ u8 ph_pad[4 ]; };
fs/lustre/ptlrpc/service.c +5 -5
@@ -712,9 +712,9 @@ static void ptlrpc_server_free_request(struct ptlrpc_request *req)LASSERT (atomic_read (&req->rq_refcount) ==0 );LASSERT (list_empty (&req->rq_timed_list)); -/* DEBUG_REQ() assumes the reply state of a request with a valid -* ref will not be destroyed until that reference is dropped. -*/ +/* DEBUG_REQ() assumes the reply state of a request with a valid +* ref will not be destroyed until that reference is dropped. +*/ ptlrpc_req_drop_rs (req);sptlrpc_svc_ctx_decref (req);
@@ -1852,8 +1852,8 @@ static bool ptlrpc_server_normal_pending(struct ptlrpc_service_part *svcpt, been_handled = rs->rs_handled; rs->rs_handled =1 ; - nlocks = rs->rs_nlocks;/* atomic "steal", but */ - rs->rs_nlocks =0 ;/* locks still on rs_locks! */ + nlocks = rs->rs_nlocks;/* atomic "steal", but */ + rs->rs_nlocks =0 ;/* locks still on rs_locks! */ if (nlocks ==0 && !been_handled) {/* If we see this, we should already have seen the warning
fs/lustre/ptlrpc/wiretest.c +6 -6
@@ -46,12 +46,12 @@void lustre_assert_wire_constants (void ) { -/* Wire protocol assertions generated by 'wirecheck' -* (make -C lustre/utils newwiretest) -* running on Linux centos6-bis 2.6.32-358.0.1.el6-head -* #3 SMP Wed Apr 17 17:37:43 CEST 2013 -* with gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) -*/ +/* Wire protocol assertions generated by 'wirecheck' +* (make -C lustre/utils newwiretest) +* running on Linux centos6-bis 2.6.32-358.0.1.el6-head +* #3 SMP Wed Apr 17 17:37:43 CEST 2013 +* with gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) +*/ /* Constants... */ LASSERTF(PTL_RPC_MSG_REQUEST == 4711, "found %lld\n",
include/linux/libcfs/libcfs_debug.h +2 -2
@@ -101,8 +101,8 @@# define DEBUG_SUBSYSTEM S_UNDEFINED#endif -#define CDEBUG_DEFAULT_MAX_DELAY (600 * HZ)/* jiffies */ -#define CDEBUG_DEFAULT_MIN_DELAY ((HZ + 1) / 2)/* jiffies */ +#define CDEBUG_DEFAULT_MAX_DELAY (600 * HZ)/* jiffies */ +#define CDEBUG_DEFAULT_MIN_DELAY ((HZ + 1) / 2)/* jiffies */ #define CDEBUG_DEFAULT_BACKOFF 2struct cfs_debug_limit_state {unsigned long cdls_next;
include/linux/lnet/lib-types.h +4 -4
@@ -57,7 +57,7 @@struct lnet_msg {struct list_head msg_activelist; -struct list_head msg_list;/* Q for credits/MD */ +struct list_head msg_list;/* Q for credits/MD */ struct lnet_process_id msg_target;/* Primary NID of the source. */
@@ -101,8 +101,8 @@ struct lnet_msg { unsigned int msg_onactivelist:1; /* on the activelist */ unsigned int msg_rdma_get:1; -struct lnet_peer_ni *msg_txpeer;/* peer I'm sending to */ -struct lnet_peer_ni *msg_rxpeer;/* peer I received from */ +struct lnet_peer_ni *msg_txpeer;/* peer I'm sending to */ +struct lnet_peer_ni *msg_rxpeer;/* peer I received from */ void *msg_private;struct lnet_libmd *msg_md;
@@ -470,7 +470,7 @@ struct lnet_peer_ni {unsigned int lpni_ping_notsent;/* # times router went dead<->alive */ int lpni_alive_count; -/* ytes queued for sending */ +/* ytes queued for sending */ long lpni_txqnob;/* time of last aliveness news */ time64_t lpni_timestamp;
include/uapi/linux/lustre/lustre_idl.h +17 -17
@@ -846,22 +846,22 @@ struct obd_connect_data {* may result in out-of-bound memory access and kernel oops. */ __u16 ocd_maxmodrpcs;/* Maximum modify RPCs in parallel */ -__u16 padding0;/* added 2.1.0. also fix lustre_swab_connect */ -__u32 padding1;/* added 2.1.0. also fix lustre_swab_connect */ +__u16 padding0;/* added 2.1.0. also fix lustre_swab_connect */ +__u32 padding1;/* added 2.1.0. also fix lustre_swab_connect */ __u64 ocd_connect_flags2; -__u64 padding3;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 padding4;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 padding5;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 padding6;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 padding7;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 padding8;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 padding9;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 paddingA;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 paddingB;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 paddingC;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 paddingD;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 paddingE;/* added 2.1.0. also fix lustre_swab_connect */ -__u64 paddingF;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding3;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding4;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding5;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding6;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding7;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding8;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 padding9;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 paddingA;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 paddingB;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 paddingC;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 paddingD;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 paddingE;/* added 2.1.0. also fix lustre_swab_connect */ +__u64 paddingF;/* added 2.1.0. also fix lustre_swab_connect */ };/* XXX README XXX:
@@ -2208,8 +2208,8 @@ struct ldlm_reply {enum mgs_cmd {MGS_CONNECT =250 ,MGS_DISCONNECT , -MGS_EXCEPTION ,/* node died, etc. */ -MGS_TARGET_REG ,/* whenever target starts up */ +MGS_EXCEPTION ,/* node died, etc. */ +MGS_TARGET_REG ,/* whenever target starts up */ MGS_TARGET_DEL ,MGS_SET_INFO ,MGS_CONFIG_READ ,
include/uapi/linux/lustre/lustre_param.h +14 -14
@@ -55,20 +55,20 @@/* System global or special params not handled in obd's proc * See mgs_write_log_sys() */ -#define PARAM_TIMEOUT "timeout="/* global */ -#define PARAM_LDLM_TIMEOUT "ldlm_timeout="/* global */ -#define PARAM_AT_MIN "at_min="/* global */ -#define PARAM_AT_MAX "at_max="/* global */ -#define PARAM_AT_EXTRA "at_extra="/* global */ -#define PARAM_AT_EARLY_MARGIN "at_early_margin="/* global */ -#define PARAM_AT_HISTORY "at_history="/* global */ -#define PARAM_JOBID_VAR "jobid_var="/* global */ -#define PARAM_MGSNODE "mgsnode="/* only at mounttime */ -#define PARAM_FAILNODE "failover.node="/* add failover nid */ -#define PARAM_FAILMODE "failover.mode="/* initial mount only */ -#define PARAM_ACTIVE "active="/* activate/deactivate */ -#define PARAM_NETWORK "network="/* bind on nid */ -#define PARAM_ID_UPCALL "identity_upcall="/* identity upcall */ +#define PARAM_TIMEOUT "timeout="/* global */ +#define PARAM_LDLM_TIMEOUT "ldlm_timeout="/* global */ +#define PARAM_AT_MIN "at_min="/* global */ +#define PARAM_AT_MAX "at_max="/* global */ +#define PARAM_AT_EXTRA "at_extra="/* global */ +#define PARAM_AT_EARLY_MARGIN "at_early_margin="/* global */ +#define PARAM_AT_HISTORY "at_history="/* global */ +#define PARAM_JOBID_VAR "jobid_var="/* global */ +#define PARAM_MGSNODE "mgsnode="/* only at mounttime */ +#define PARAM_FAILNODE "failover.node="/* add failover nid */ +#define PARAM_FAILMODE "failover.mode="/* initial mount only */ +#define PARAM_ACTIVE "active="/* activate/deactivate */ +#define PARAM_NETWORK "network="/* bind on nid */ +#define PARAM_ID_UPCALL "identity_upcall="/* identity upcall */ /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */ #define PARAM_OST "ost."
include/uapi/linux/lustre/lustre_user.h +16 -16
@@ -417,12 +417,12 @@ struct lov_user_md_v1 { /* LOV EA user data (host-endian) */__u32 lmm_stripe_size;/* size of stripe in bytes */ __u16 lmm_stripe_count;/* num stripes in use for this object */ union { -__u16 lmm_stripe_offset;/* starting stripe offset in -* lmm_objects, use when writing -*/ -__u16 lmm_layout_gen;/* layout generation number -* used when reading -*/ +__u16 lmm_stripe_offset;/* starting stripe offset in +* lmm_objects, use when writing +*/ +__u16 lmm_layout_gen;/* layout generation number +* used when reading +*/ };struct lov_user_ost_data_v1 lmm_objects[0 ];/* per-stripe data */ } __attribute__((packed, __may_alias__));
@@ -434,12 +434,12 @@ struct lov_user_md_v3 { /* LOV EA user data (host-endian) */__u32 lmm_stripe_size;/* size of stripe in bytes */ __u16 lmm_stripe_count;/* num stripes in use for this object */ union { -__u16 lmm_stripe_offset;/* starting stripe offset in -* lmm_objects, use when writing -*/ -__u16 lmm_layout_gen;/* layout generation number -* used when reading -*/ +__u16 lmm_stripe_offset;/* starting stripe offset in +* lmm_objects, use when writing +*/ +__u16 lmm_layout_gen;/* layout generation number +* used when reading +*/ };char lmm_pool_name[LOV_MAXPOOLNAME +1 ];/* pool name */ struct lov_user_ost_data_v1 lmm_objects[0 ];/* per-stripe data */
@@ -571,13 +571,13 @@ static inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)#ifdef HAVE_LOV_USER_MDS_DATA #define lov_user_mds_data lov_user_mds_data_v1struct lov_user_mds_data_v1 { -lstat_t lmd_st;/* MDS stat struct */ -struct lov_user_md_v1 lmd_lmm;/* LOV EA V1 user data */ +lstat_t lmd_st;/* MDS stat struct */ +struct lov_user_md_v1 lmd_lmm;/* LOV EA V1 user data */ } __packed;struct lov_user_mds_data_v3 { -lstat_t lmd_st;/* MDS stat struct */ -struct lov_user_md_v3 lmd_lmm;/* LOV EA V3 user data */ +lstat_t lmd_st;/* MDS stat struct */ +struct lov_user_md_v3 lmd_lmm;/* LOV EA V3 user data */ } __packed;#endif
net/lnet/klnds/o2iblnd/o2iblnd.c +3 -3
@@ -513,7 +513,7 @@ static int kiblnd_del_peer(struct lnet_ni *ni, lnet_nid_t nid) }kiblnd_del_peer_locked (peer_ni); - rc =0 ;/* matched something */ + rc =0 ;/* matched something */ } }
@@ -730,8 +730,8 @@ struct kib_conn *kiblnd_create_conn(struct kib_peer_ni *peer_ni, conn->ibc_state =IBLND_CONN_INIT ; conn->ibc_version = version; - conn->ibc_peer = peer_ni;/* I take the caller's ref */ - cmid->context = conn;/* for future CM callbacks */ + conn->ibc_peer = peer_ni;/* I take the caller's ref */ + cmid->context = conn;/* for future CM callbacks */ conn->ibc_cmid = cmid; conn->ibc_max_frags = peer_ni->ibp_max_frags; conn->ibc_queue_depth = peer_ni->ibp_queue_depth;
net/lnet/klnds/o2iblnd/o2iblnd.h +47 -31
120 lines not on this page · raw message
net/lnet/klnds/o2iblnd/o2iblnd_cb.c +42 -42
262 lines not on this page · raw message
net/lnet/klnds/socklnd/socklnd.c +5 -5
@@ -74,7 +74,7 @@atomic_set (&route->ksnr_refcount,1 ); route->ksnr_peer =NULL ; - route->ksnr_retry_interval =0 ;/* OK to connect at any time */ + route->ksnr_retry_interval =0 ;/* OK to connect at any time */ route->ksnr_ipaddr = ipaddr; route->ksnr_port = port; route->ksnr_scheduled =0 ;
@@ -427,7 +427,7 @@ struct ksock_peer * route->ksnr_deleted =1 ;list_del (&route->ksnr_list); -ksocknal_route_decref (route);/* drop peer_ni's ref */ +ksocknal_route_decref (route);/* drop peer_ni's ref */ if (list_empty (&peer_ni->ksnp_routes) &&list_empty (&peer_ni->ksnp_conns)) {
@@ -601,7 +601,7 @@ struct ksock_peer *ksocknal_peer_decref (peer_ni);/* ...till here */ - rc =0 ;/* matched! */ + rc =0 ;/* matched! */ } }
@@ -974,7 +974,7 @@ struct ksock_peer *int peer_port; rc =lnet_sock_getaddr (sock,1 , &peer_ip, &peer_port); -LASSERT (!rc);/* we succeeded before */ +LASSERT (!rc);/* we succeeded before */ cr =kzalloc (sizeof (*cr),GFP_NOFS );if (!cr) {
@@ -2564,7 +2564,7 @@ static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id)LASSERT (ksocknal_data.ksnd_nnets >0 );spin_lock_bh (&net->ksnn_lock); - net->ksnn_shutdown =1 ;/* prevent new peers */ + net->ksnn_shutdown =1 ;/* prevent new peers */ spin_unlock_bh (&net->ksnn_lock);/* Delete all peers */
net/lnet/klnds/socklnd/socklnd_cb.c +13 -13
@@ -119,7 +119,7 @@ struct ksock_tx */* Never touch tx->tx_iov inside ksocknal_lib_send_iov() */ rc =ksocknal_lib_send_iov (conn, tx); -if (rc <=0 )/* sent nothing? */ +if (rc <=0 )/* sent nothing? */ return rc; nob = rc;
@@ -157,7 +157,7 @@ struct ksock_tx */* Never touch tx->tx_kiov inside ksocknal_lib_send_kiov() */ rc =ksocknal_lib_send_kiov (conn, tx); -if (rc <=0 )/* sent nothing? */ +if (rc <=0 )/* sent nothing? */ return rc; nob = rc;
@@ -212,7 +212,7 @@ struct ksock_tx * } bufnob = conn->ksnc_sock->sk->sk_wmem_queued; -if (rc >0 )/* sent something? */ +if (rc >0 )/* sent something? */ conn->ksnc_tx_bufnob += rc;/* account it */ if (bufnob < conn->ksnc_tx_bufnob) {
@@ -268,7 +268,7 @@ struct ksock_tx * conn->ksnc_peer->ksnp_last_alive =ktime_get_seconds (); conn->ksnc_rx_deadline =ktime_get_seconds () + *ksocknal_tunables.ksnd_timeout; -mb ();/* order with setting rx_started */ +mb ();/* order with setting rx_started */ conn->ksnc_rx_started =1 ; conn->ksnc_rx_nob_left -= nob;
@@ -522,8 +522,8 @@ struct ksock_tx *LASSERT (!route->ksnr_connecting);LASSERT (ksocknal_route_mask () & ~route->ksnr_connected); - route->ksnr_scheduled =1 ;/* scheduling conn for connd */ -ksocknal_route_addref (route);/* extra ref for connd */ + route->ksnr_scheduled =1 ;/* scheduling conn for connd */ +ksocknal_route_addref (route);/* extra ref for connd */ spin_lock_bh (&ksocknal_data.ksnd_connd_lock);
@@ -906,7 +906,7 @@ struct ksock_route *return -ENOMEM ; } - tx->tx_conn =NULL ;/* set when assigned a conn */ + tx->tx_conn =NULL ;/* set when assigned a conn */ tx->tx_lnetmsg = lntmsg;if (payload_iov) {
@@ -984,9 +984,9 @@ struct ksock_route *ksocknal_lib_eager_ack (conn); } -if (!nob_to_skip) {/* right at next packet boundary now */ +if (!nob_to_skip) {/* right at next packet boundary now */ conn->ksnc_rx_started =0 ; -mb ();/* racing with timeout thread */ +mb ();/* racing with timeout thread */ switch (conn->ksnc_proto->pro_version) {case KSOCK_PROTO_V2 :
@@ -1231,8 +1231,8 @@ struct ksock_route *case SOCKNAL_RX_SLOP :/* starting new packet? */ if (ksocknal_new_packet (conn, conn->ksnc_rx_nob_left)) -return 0 ;/* come back later */ - goto again;/* try to finish reading slop now */ +return 0 ;/* come back later */ + goto again;/* try to finish reading slop now */ default :break ;
@@ -1240,7 +1240,7 @@ struct ksock_route */* Not Reached */ LBUG (); -return -EINVAL ;/* keep gcc happy */ +return -EINVAL ;/* keep gcc happy */ }int
@@ -1449,7 +1449,7 @@ int ksocknal_scheduler(void *arg) did_something =1 ; } -if (!did_something ||/* nothing to do */ +if (!did_something ||/* nothing to do */ ++nloops ==SOCKNAL_RESCHED ) {/* hogging CPU? */ spin_unlock_bh (&sched->kss_lock);
net/lnet/klnds/socklnd/socklnd_lib.c +4 -4
@@ -381,7 +381,7 @@ static int lustre_csum(struct kvec *v, void *context)int rc; rc =ksocknal_connsock_addref (conn); -if (rc)/* being shut down */ +if (rc)/* being shut down */ return ; sk = conn->ksnc_sock->sk;
@@ -416,7 +416,7 @@ static int lustre_csum(struct kvec *v, void *context)read_lock (&ksocknal_data.ksnd_global_lock); conn = sk->sk_user_data; -if (!conn) {/* raced with ksocknal_terminate_conn */ +if (!conn) {/* raced with ksocknal_terminate_conn */ LASSERT (sk->sk_data_ready != &ksocknal_data_ready); sk->sk_data_ready (sk); }else {
@@ -450,7 +450,7 @@ static int lustre_csum(struct kvec *v, void *context) !conn ?"" : (list_empty (&conn->ksnc_tx_queue) ? " empty" : " queued")); -if (!conn) {/* raced with ksocknal_terminate_conn */ +if (!conn) {/* raced with ksocknal_terminate_conn */ LASSERT (sk->sk_write_space != &ksocknal_write_space); sk->sk_write_space (sk);
@@ -458,7 +458,7 @@ static int lustre_csum(struct kvec *v, void *context)return ; } -if (wspace >= min_wpace) {/* got enough space */ +if (wspace >= min_wpace) {/* got enough space */ ksocknal_write_callback (conn);/*
net/lnet/libcfs/debug.c +2 -2
@@ -277,10 +277,10 @@ static const char *libcfs_debug_dbg2str(int debug)continue ; token =fn (i); -if (!token)/* unused bit */ +if (!token)/* unused bit */ continue ; -if (len >0 ) {/* separator? */ +if (len >0 ) {/* separator? */ if (len < size) str[len] =' ' ; len++;
net/lnet/libcfs/tracefile.c +4 -4
@@ -892,17 +892,17 @@ int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,return -EFAULT ; nob =strnlen (knl_buffer, usr_buffer_nob); -while (--nob >=0 )/* strip trailing whitespace */ +while (--nob >=0 )/* strip trailing whitespace */ if (!isspace (knl_buffer[nob]))break ; -if (nob <0 )/* empty string */ +if (nob <0 )/* empty string */ return -EINVAL ; -if (nob == knl_buffer_nob)/* no space to terminate */ +if (nob == knl_buffer_nob)/* no space to terminate */ return -EOVERFLOW ; - knl_buffer[nob +1 ] =0 ;/* terminate */ + knl_buffer[nob +1 ] =0 ;/* terminate */ return 0 ; }EXPORT_SYMBOL (cfs_trace_copyin_string);
net/lnet/lnet/acceptor.c +3 -3
@@ -150,7 +150,7 @@int port;int fatal; -BUILD_BUG_ON (sizeof (cr) >16 );/* too big to be on the stack */ +BUILD_BUG_ON (sizeof (cr) >16 );/* too big to be on the stack */ for (port = LNET_ACCEPTOR_MAX_RESERVED_PORT; port >= LNET_ACCEPTOR_MIN_RESERVED_PORT;
@@ -215,10 +215,10 @@struct lnet_ni *ni;char *str; -LASSERT (sizeof (cr) <=16 );/* not too big for the stack */ +LASSERT (sizeof (cr) <=16 );/* not too big for the stack */ rc =lnet_sock_getaddr (sock,1 , &peer_ip, &peer_port); -LASSERT (!rc);/* we succeeded before */ +LASSERT (!rc);/* we succeeded before */ if (!lnet_accept_magic (magic,LNET_PROTO_ACCEPTOR_MAGIC )) {if (lnet_accept_magic (magic,LNET_PROTO_MAGIC )) {
net/lnet/lnet/config.c +3 -3
@@ -1142,7 +1142,7 @@ struct lnet_ni * tmp2 = &nets;/* expanding nets */ }else if (ntokens ==2 &&lnet_parse_hops (token, &hops)) { - got_hops =1 ;/* got a hop count */ + got_hops =1 ;/* got a hop count */ continue ; }else { tmp2 = &gateways;/* expanding gateways */
@@ -1347,7 +1347,7 @@ struct lnet_ni *if (!matched)return 0 ; -strcpy (net_entry, net);/* replace with matched net */ +strcpy (net_entry, net);/* replace with matched net */ return 1 ; }
@@ -1491,7 +1491,7 @@ struct lnet_ni *list_del (&tb->ltb_list); -if (!rc) {/* no match */ +if (!rc) {/* no match */ lnet_free_text_buf (tb);continue ; }
net/lnet/lnet/lib-move.c +8 -8
@@ -362,11 +362,11 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,unsigned int frag_len;unsigned int niov; -if (!len)/* no data => */ -return 0 ;/* no frags */ +if (!len)/* no data => */ +return 0 ;/* no frags */ LASSERT (src_niov >0 ); -while (offset >= src->iov_len) {/* skip initial frags */ +while (offset >= src->iov_len) {/* skip initial frags */ offset -= src->iov_len; src_niov--; src++;
@@ -424,11 +424,11 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,unsigned int frag_len;unsigned int niov; -if (!len)/* no data => */ -return 0 ;/* no frags */ +if (!len)/* no data => */ +return 0 ;/* no frags */ LASSERT (src_niov >0 ); -while (offset >= src->bv_len) {/* skip initial frags */ +while (offset >= src->bv_len) {/* skip initial frags */ offset -= src->bv_len; src_niov--; src++;
@@ -2507,7 +2507,7 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,* call back lnd_recv() come what may... */ if (!list_empty (&the_lnet.ln_test_peers) &&/* normally we don't */ -fail_peer (src_nid,0 )) {/* shall we now? */ +fail_peer (src_nid,0 )) {/* shall we now? */ CERROR ("%s, src %s: Dropping %s to simulate failure\n" ,libcfs_nid2str (from_nid),libcfs_nid2str (src_nid),lnet_msgtyp2str (type));
@@ -2976,7 +2976,7 @@ struct lnet_msg *LASSERT (the_lnet.ln_refcount >0 );if (!list_empty (&the_lnet.ln_test_peers) &&/* normally we don't */ -fail_peer (target.nid,1 )) {/* shall we now? */ +fail_peer (target.nid,1 )) {/* shall we now? */ CERROR ("Dropping GET to %s: simulated failure\n" ,libcfs_id2str (target));return -EIO ;
net/lnet/lnet/lo.c +1 -1
@@ -50,7 +50,7 @@ {struct lnet_msg *sendmsg = private; -if (lntmsg) {/* not discarding */ +if (lntmsg) {/* not discarding */ if (sendmsg->msg_iov) lnet_copy_iov2iter(to, sendmsg->msg_niov,
net/lnet/lnet/router.c +4 -4
@@ -117,10 +117,10 @@spin_lock (&lp->lpni_lock); lp->lpni_timestamp = when;/* update timestamp */ - lp->lpni_ping_deadline =0 ;/* disable ping timeout */ + lp->lpni_ping_deadline =0 ;/* disable ping timeout */ -if (lp->lpni_alive_count &&/* got old news */ - (!lp->lpni_alive) == (!alive)) {/* new date for old news */ +if (lp->lpni_alive_count &&/* got old news */ + (!lp->lpni_alive) == (!alive)) {/* new date for old news */ spin_unlock (&lp->lpni_lock);CDEBUG (D_NET ,"Old news\n" );return ;
@@ -337,7 +337,7 @@ static void lnet_shuffle_seed(void) (hops != LNET_UNDEFINED_HOPS && (hops < 1 || hops > 255)))return -EINVAL ; -if (lnet_islocalnet (net))/* it's a local network */ +if (lnet_islocalnet (net))/* it's a local network */ return -EEXIST ;/* Assume net, route, all new */
net/lnet/selftest/conrpc.c +1 -1
@@ -294,7 +294,7 @@ void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, struct srpc_msg *,spin_lock (&rpc->crpc_lock);if (!crpc->crp_posted ||/* not posted */ - crpc->crp_stamp_ns) {/* rpc done or aborted already */ + crpc->crp_stamp_ns) {/* rpc done or aborted already */ if (!crpc->crp_stamp_ns) { crpc->crp_stamp_ns =ktime_get_ns (); crpc->crp_status = -EINTR ;
net/lnet/selftest/conrpc.h +8 -8
@@ -74,14 +74,14 @@ struct lstcon_rpc { };struct lstcon_rpc_trans { -struct list_head tas_olink;/* link chain on owner list */ -struct list_head tas_link;/* link chain on global list */ -int tas_opc;/* operation code of transaction */ -unsigned int tas_feats_updated;/* features mask is uptodate */ -unsigned int tas_features;/* test features mask */ -wait_queue_head_t tas_waitq;/* wait queue head */ -atomic_t tas_remaining;/* # of un-scheduled rpcs */ -struct list_head tas_rpcs_list;/* queued requests */ +struct list_head tas_olink;/* link chain on owner list */ +struct list_head tas_link;/* link chain on global list */ +int tas_opc;/* operation code of transaction */ +unsigned int tas_feats_updated;/* features mask is uptodate */ +unsigned int tas_features;/* test features mask */ +wait_queue_head_t tas_waitq;/* wait queue head */ +atomic_t tas_remaining;/* # of un-scheduled rpcs */ +struct list_head tas_rpcs_list;/* queued requests */ };#define LST_TRANS_PRIVATE 0x1000
net/lnet/selftest/console.h +48 -48
143 lines not on this page · raw message
net/lnet/selftest/framework.c +7 -7
@@ -101,13 +101,13 @@#define sfw_batch_active (b) (atomic_read(&(b)->bat_nactive))static struct smoketest_framework { -struct list_head fw_zombie_rpcs;/* RPCs to be recycled */ -struct list_head fw_zombie_sessions;/* stopping sessions */ -struct list_head fw_tests;/* registered test cases */ -atomic_t fw_nzombies;/* # zombie sessions */ -spinlock_t fw_lock;/* serialise */ -struct sfw_session *fw_session;/* _the_ session */ -int fw_shuttingdown;/* shutdown in progress */ +struct list_head fw_zombie_rpcs;/* RPCs to be recycled */ +struct list_head fw_zombie_sessions;/* stopping sessions */ +struct list_head fw_tests;/* registered test cases */ +atomic_t fw_nzombies;/* # zombie sessions */ +spinlock_t fw_lock;/* serialise */ +struct sfw_session *fw_session;/* _the_ session */ +int fw_shuttingdown;/* shutdown in progress */ struct srpc_server_rpc *fw_active_srpc;/* running RPC */ } sfw_data;
net/lnet/selftest/rpc.h +14 -14
@@ -213,29 +213,29 @@ struct srpc_test_reply {/* TEST RPCs */ struct srpc_ping_reqst { -u64 pnr_rpyid; -u32 pnr_magic; -u32 pnr_seq; -u64 pnr_time_sec; -u64 pnr_time_usec; +u64 pnr_rpyid; +u32 pnr_magic; +u32 pnr_seq; +u64 pnr_time_sec; +u64 pnr_time_usec; } __packed;struct srpc_ping_reply { -u32 pnr_status; -u32 pnr_magic; -u32 pnr_seq; +u32 pnr_status; +u32 pnr_magic; +u32 pnr_seq; } __packed;struct srpc_brw_reqst { -u64 brw_rpyid;/* reply buffer matchbits */ -u64 brw_bulkid;/* bulk buffer matchbits */ -u32 brw_rw;/* read or write */ -u32 brw_len;/* bulk data len */ -u32 brw_flags;/* bulk data patterns */ +u64 brw_rpyid;/* reply buffer matchbits */ +u64 brw_bulkid;/* bulk buffer matchbits */ +u32 brw_rw;/* read or write */ +u32 brw_len;/* bulk data len */ +u32 brw_flags;/* bulk data patterns */ } __packed;/* bulk r/w request */ struct srpc_brw_reply { -u32 brw_status; +u32 brw_status; } __packed;/* bulk r/w reply */ #define SRPC_MSG_MAGIC 0xeeb0f00d
net/lnet/selftest/selftest.h +19 -19
@@ -198,23 +198,23 @@ struct srpc_server_rpc {/* client-side state of a RPC */ struct srpc_client_rpc { -struct list_head crpc_list;/* chain on user's lists */ -spinlock_t crpc_lock;/* serialize */ -int crpc_service; -atomic_t crpc_refcount; -int crpc_timeout;/* # seconds to wait for reply */ -struct stt_timer crpc_timer; +struct list_head crpc_list;/* chain on user's lists */ +spinlock_t crpc_lock;/* serialize */ +int crpc_service; +atomic_t crpc_refcount; +int crpc_timeout;/* # seconds to wait for reply */ +struct stt_timer crpc_timer;struct swi_workitem crpc_wi;struct lnet_process_id crpc_dest; -void (*crpc_done)(struct srpc_client_rpc *); -void (*crpc_fini)(struct srpc_client_rpc *); -int crpc_status;/* completion status */ -void *crpc_priv;/* caller data */ +void (*crpc_done)(struct srpc_client_rpc *); +void (*crpc_fini)(struct srpc_client_rpc *); +int crpc_status;/* completion status */ +void *crpc_priv;/* caller data */ /* state flags */ -unsigned int crpc_aborted:1 ;/* being given up */ -unsigned int crpc_closed:1 ;/* completed */ +unsigned int crpc_aborted:1 ;/* being given up */ +unsigned int crpc_closed:1 ;/* completed */ /* RPC events */ struct srpc_event crpc_bulkev;/* bulk event */
@@ -400,17 +400,17 @@ struct sfw_test_instance {#define sfw_id_pages (n) DIV_ROUND_UP(n, SFW_ID_PER_PAGE)struct sfw_test_unit { -struct list_head tsu_list;/* chain on lst_test_instance */ -struct lnet_process_id tsu_dest;/* id of dest node */ -int tsu_loop;/* loop count of the test */ -struct sfw_test_instance *tsu_instance;/* pointer to test instance */ -void *tsu_private;/* private data */ +struct list_head tsu_list;/* chain on lst_test_instance */ +struct lnet_process_id tsu_dest;/* id of dest node */ +int tsu_loop;/* loop count of the test */ +struct sfw_test_instance *tsu_instance;/* pointer to test instance */ +void *tsu_private;/* private data */ struct swi_workitem tsu_worker;/* workitem of the test unit */ };struct sfw_test_case { -struct list_head tsc_list;/* chain on fw_tests */ -struct srpc_service *tsc_srv_service;/* test service */ +struct list_head tsc_list;/* chain on fw_tests */ +struct srpc_service *tsc_srv_service;/* test service */ struct sfw_test_client_ops *tsc_cli_ops;/* ops of test client */ };
Signature · 1 line
1.8.3.1
cover lustre: update to 2.11 support
In reply to James SimmonsQuoted 6 lines · James Simmons
This patchset covers 3 areas. The fix 6 patches resolves critical bugs in the linux client. Mainly for handling of LNet with secondary IP aliases as well as an RCU issue reported with debugging enabled. This consoldation of IP handling makes any kernel API changes in the future easier to handle.
Quoted 8 lines
The last 9 patches cover patches in the lustre-testing that landed to the OpenSFS branch.
The rest of the patches cover all the patches missing from the Lustre 2.11 release. I have done extentsive testing of these patches (sanity, sanity-pfl, sanity-dom, sanity-pfl). Only regression I saw was sanity-flr 200 which needs to be investiaged. So we are in very good shape.
Thanks a lot for these James!
Though I only received up to 133/151 - are 18 missing, or was there a miscount??
I've applied them on top of my "lustre" branch, then rebased everything in my lustre-testing and lustre-backports (upto about 2.12.2) branches on top of that - and checked that it all compiles.
I fixed the issues that I mentioned separately that I found in a few of your patches, and also a couple of issues that I found in some of mine (it is *so* helpful having two people working on this, we can catch each others slip-ups).
I've pushed it all to github on a branch "lustre/lustre-XX" because I couldn't think of a good name.
I'll review the differences between it and lustre-backport, and then probably rename lustre-XX to lustre-backport - after I find out the story about those missing 18 patches.
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/20191001/9fe18df8/attachment.sig>
cover lustre: update to 2.11 support
Quoted 16 lines
Quoted 7 lines
This patchset covers 3 areas. The fix 6 patches resolves critical bugs in the linux client. Mainly for handling of LNet with secondary IP aliases as well as an RCU issue reported with debugging enabled. This consoldation of IP handling makes any kernel API changes in the future easier to handle.
Quoted 8 lines
The last 9 patches cover patches in the lustre-testing that landed to the OpenSFS branch.
The rest of the patches cover all the patches missing from the Lustre 2.11 release. I have done extentsive testing of these patches (sanity, sanity-pfl, sanity-dom, sanity-pfl). Only regression I saw was sanity-flr 200 which needs to be investiaged. So we are in very good shape.
Quoted 3 lines
Thanks a lot for these James!
Though I only received up to 133/151 - are 18 missing, or was there a miscount??
Their should be 151 patches. I have had this problem of patches not making it to my mailbox. That is why I have:
https://patchwork.kernel.org/project/lustre-devel/list
All the patches are there.
Quoted 7 lines
I've applied them on top of my "lustre" branch, then rebased everything in my lustre-testing and lustre-backports (upto about 2.12.2) branches on top of that - and checked that it all compiles.
I fixed the issues that I mentioned separately that I found in a few of your patches, and also a couple of issues that I found in some of mine (it is *so* helpful having two people working on this, we can catch each others slip-ups).
Yes more eyes are always better :-) Thanks for starting the process!!!
Quoted 10 lines
I've pushed it all to github on a branch "lustre/lustre-XX" because I couldn't think of a good name.
I'll review the differences between it and lustre-backport, and then probably rename lustre-XX to lustre-backport - after I find out the story about those missing 18 patches.Thanks,
NeilBrown
cover lustre: update to 2.11 support
Quoted 19 lines · James Simmons
Quoted 15 lines
Quoted 6 lines
This patchset covers 3 areas. The fix 6 patches resolves critical bugs in the linux client. Mainly for handling of LNet with secondary IP aliases as well as an RCU issue reported with debugging enabled. This consoldation of IP handling makes any kernel API changes in the future easier to handle.
Quoted 8 lines
The last 9 patches cover patches in the lustre-testing that landed to the OpenSFS branch.
The rest of the patches cover all the patches missing from the Lustre 2.11 release. I have done extentsive testing of these patches (sanity, sanity-pfl, sanity-dom, sanity-pfl). Only regression I saw was sanity-flr 200 which needs to be investiaged. So we are in very good shape.
Quoted 3 lines
Thanks a lot for these James!
Though I only received up to 133/151 - are 18 missing, or was there a miscount??
Quoted 6 lines
Their should be 151 patches. I have had this problem of patches not making it to my mailbox. That is why I have:
https://patchwork.kernel.org/project/lustre-devel/list
All the patches are there.
So they are. There is even a nice "series" line so I can grab them call.
I wonder why they didn't get delivered to me ...
I've applied them all to my tree with no further issues. I'll push something out later today.
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/5fe40eac/attachment.sig>