Lustre cleanups continued
cover Lustre cleanups continued
From: Oleg Drokin <[email protected]>
These are the cleanup patches that were not applied from the previous patch set due to a missing NFS/fhandle fix that is now applied. Also some defines removal and such.
Please apply.
Oleg Drokin (25):
staging/lustre/llite: Fix style vs open parenthesis alignment staging/lustre/include: Fix style of function declarations staging/lustre/fld: Fix style vs open parenthesis alignment staging/lustre: Remove unused liblustre_check_services prototype staging/lustre: Remove unused lustre_build_lock_params() staging/lustre: Convert ptlrpc_at_check_timed to void staging/lustre: Remove misleading liblustre comments. staging/lustre: Remove liblustre references from explanations staging/lustre/lmv: Remove commented out MDS selection policies staging/lustre: F_SETLKW64 F_SETLK64 F_GETLK64 are always defined staging/lustre: MS_POSIXACL is always defined, don't check for it staging/lustre: Remove RELEASEPAGE_ARG_TYPE compat macro staging/lustre: NEED_QUOTA_DEFS is never defined, drop it. staging/lustre/ptlrpc: Fix style vs open parenthesis alignment staging/lustre/osc: Fix style vs open parenthesis alignment staging/lustre/obdclass: Fix style vs open parenthesis alignment staging/lustre/lov: Fix style vs open parenthesis alignment staging/lustre/mdc: Fix style vs open parenthesis alignment staging/lustre/mgc: Fix style vs open parenthesis alignment staging/lustre/obdecho: Fix style vs open parenthesis alignment staging/lustre/lmv: Fix style vs open parenthesis alignment staging/lustre: Fix lines that start with spaces staging/lustre: Rework MAX_DIO_SIZE macro staging/lustre: Remove unneeded {} in lprocfs_stats_unlock() staging/lustre/ptlrpc: Fix ENABLE_PINGER ifdef
drivers/staging/lustre/lustre/fld/fld_cache.c | 14 +- drivers/staging/lustre/lustre/fld/fld_request.c | 17 +- drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 +- drivers/staging/lustre/lustre/include/cl_object.h | 414 ++++++++++----------- .../staging/lustre/lustre/include/lprocfs_status.h | 16 +- .../lustre/lustre/include/lustre/lustre_idl.h | 10 +- .../lustre/lustre/include/lustre/lustre_user.h | 16 - drivers/staging/lustre/lustre/include/lustre_cfg.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 4 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h | 50 +-- drivers/staging/lustre/lustre/include/lustre_net.h | 20 +- .../lustre/lustre/include/lustre_req_layout.h | 4 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 128 +++---- drivers/staging/lustre/lustre/include/obd.h | 8 +- drivers/staging/lustre/lustre/include/obd_class.h | 14 +- drivers/staging/lustre/lustre/llite/dcache.c | 3 +- drivers/staging/lustre/lustre/llite/dir.c | 6 +- drivers/staging/lustre/lustre/llite/file.c | 78 ++-- drivers/staging/lustre/lustre/llite/llite_close.c | 5 +- .../staging/lustre/lustre/llite/llite_internal.h | 11 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 32 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 18 +- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 8 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 16 +- drivers/staging/lustre/lustre/llite/namei.c | 8 +- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/rw26.c | 42 +-- drivers/staging/lustre/lustre/llite/statahead.c | 18 +- drivers/staging/lustre/lustre/llite/super25.c | 4 +- drivers/staging/lustre/lustre/llite/symlink.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_internal.h | 13 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 14 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 12 +- drivers/staging/lustre/lustre/llite/xattr.c | 8 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 19 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 73 +--- .../staging/lustre/lustre/lov/lov_cl_internal.h | 87 +++-- drivers/staging/lustre/lustre/lov/lov_ea.c | 2 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 6 +- drivers/staging/lustre/lustre/lov/lov_io.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 7 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 35 +- drivers/staging/lustre/lustre/lov/lov_object.c | 40 +- drivers/staging/lustre/lustre/lov/lov_offset.c | 3 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 7 +- drivers/staging/lustre/lustre/lov/lov_page.c | 3 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 6 +- drivers/staging/lustre/lustre/lov/lovsub_lock.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_page.c | 2 +- drivers/staging/lustre/lustre/lov/lproc_lov.c | 16 +- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 26 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 12 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 28 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 20 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 21 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 11 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 10 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 +- drivers/staging/lustre/lustre/obdclass/genops.c | 26 +- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 8 +- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 +- .../lustre/lustre/obdclass/lprocfs_status.c | 125 +++---- drivers/staging/lustre/lustre/obdclass/lu_object.c | 3 +- .../staging/lustre/lustre/obdclass/lustre_peer.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 6 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 8 +- .../staging/lustre/lustre/obdecho/echo_client.c | 22 +- drivers/staging/lustre/lustre/osc/lproc_osc.c | 20 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 18 +- drivers/staging/lustre/lustre/osc/osc_io.c | 5 +- drivers/staging/lustre/lustre/osc/osc_lock.c | 30 +- drivers/staging/lustre/lustre/osc/osc_page.c | 37 +- drivers/staging/lustre/lustre/osc/osc_request.c | 17 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 40 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 49 +-- drivers/staging/lustre/lustre/ptlrpc/layout.c | 35 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 15 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/nrs.c | 19 +- drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c | 2 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 9 +- drivers/staging/lustre/lustre/ptlrpc/recover.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 83 ++--- 94 files changed, 917 insertions(+), 1178 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/25 staging/lustre/llite: Fix style vs open parenthesis alignment
From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/llite/dcache.c | 3 +- drivers/staging/lustre/lustre/llite/dir.c | 6 +- drivers/staging/lustre/lustre/llite/file.c | 72 +++++++++++----------- drivers/staging/lustre/lustre/llite/llite_close.c | 5 +- .../staging/lustre/lustre/llite/llite_internal.h | 11 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 28 ++++----- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 12 ++-- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 8 +-- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 ++--- drivers/staging/lustre/lustre/llite/namei.c | 8 +-- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/rw26.c | 8 +-- drivers/staging/lustre/lustre/llite/statahead.c | 18 +++--- drivers/staging/lustre/lustre/llite/super25.c | 4 +- drivers/staging/lustre/lustre/llite/symlink.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_internal.h | 13 ++-- drivers/staging/lustre/lustre/llite/vvp_io.c | 14 ++--- drivers/staging/lustre/lustre/llite/vvp_page.c | 12 ++-- drivers/staging/lustre/lustre/llite/xattr.c | 8 +-- drivers/staging/lustre/lustre/llite/xattr_cache.c | 19 +++--- 21 files changed, 133 insertions(+), 142 deletions(-)
drivers/staging/lustre/lustre/llite/dcache.c +1 -2
@@ -183,8 +183,7 @@ static int ll_ddelete(const struct dentry *de)int ll_d_init (struct dentry *de) {CDEBUG (D_DENTRY ,"ldd on dentry %pd (%p) parent %p inode %p refc %d\n" , - de, de, de->d_parent,d_inode (de), -d_count (de)); + de, de, de->d_parent,d_inode (de),d_count (de));if (!de->d_fsdata) {struct ll_dentry_data *lld;
drivers/staging/lustre/lustre/llite/dir.c +3 -3
@@ -355,7 +355,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,struct md_op_data *op_data; op_data =ll_prep_md_op_data (NULL , dir, dir,NULL ,0 ,0 , -LUSTRE_OPC_ANY ,NULL ); +LUSTRE_OPC_ANY ,NULL );if (IS_ERR (op_data))return (void *)op_data;
@@ -368,8 +368,8 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,if (request)ptlrpc_req_finished (request);if (rc <0 ) { -CERROR ("lock enqueue: " DFID " at %llu: rc %d\n" , -PFID (ll_inode2fid (dir)), hash, rc); +CERROR ("lock enqueue: " DFID "@%llu: rc %d\n" , +PFID (ll_inode2fid (dir)), hash, rc);return ERR_PTR (rc); }
drivers/staging/lustre/lustre/llite/file.c +37 -35
216 lines not on this page · raw message
drivers/staging/lustre/lustre/llite/llite_close.c +2 -3
@@ -53,8 +53,7 @@ void vvp_write_pending(struct ccc_object *club, struct ccc_page *page)spin_lock (&lli->lli_lock); lli->lli_flags |=LLIF_SOM_DIRTY ;if (page &&list_empty (&page->cpg_pending_linkage)) -list_add (&page->cpg_pending_linkage, - &club->cob_pending_list); +list_add (&page->cpg_pending_linkage, &club->cob_pending_list);spin_unlock (&lli->lli_lock); }
@@ -322,7 +321,7 @@ static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq)if (!list_empty (&lcq->lcq_head)) { lli = list_entry(lcq->lcq_head.next, struct ll_inode_info, - lli_close_list); + lli_close_list);list_del_init (&lli->lli_close_list); }else if (atomic_read (&lcq->lcq_stop)) lli =ERR_PTR (-EALREADY );
drivers/staging/lustre/lustre/llite/llite_internal.h +4 -7
@@ -287,11 +287,8 @@ static inline void ll_layout_version_set(struct ll_inode_info *lli, __u32 gen)int ll_xattr_cache_destroy (struct inode *inode); -int ll_xattr_cache_get (struct inode *inode, -const char *name, -char *buffer, -size_t size, -__u64 valid); +int ll_xattr_cache_get (struct inode *inode,const char *name, +char *buffer,size_t size,__u64 valid);/* * Locking to guarantee consistency of non-atomic updates to long long i_size,
@@ -970,8 +967,8 @@ int ll_close_thread_start(struct ll_close_queue **lcq_ret);int ll_teardown_mmaps (struct address_space *mapping,__u64 first,__u64 last);int ll_file_mmap (struct file *file,struct vm_area_struct *vma); -void policy_from_vma (ldlm_policy_data_t *policy, -struct vm_area_struct *vma,unsigned long addr,size_t count); +void policy_from_vma (ldlm_policy_data_t *policy,struct vm_area_struct *vma, +unsigned long addr,size_t count);struct vm_area_struct *our_vma (struct mm_struct *mm,unsigned long addr,size_t count);
drivers/staging/lustre/lustre/llite/llite_lib.c +14 -14
@@ -254,8 +254,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,* available */ err =obd_statfs (NULL , sbi->ll_md_exp, osfs, -cfs_time_shift_64 (-OBD_STATFS_CACHE_SECONDS ), -OBD_STATFS_FOR_MDT0 ); +cfs_time_shift_64 (-OBD_STATFS_CACHE_SECONDS ), +OBD_STATFS_FOR_MDT0 );if (err) goto out_md_fid;
@@ -536,7 +536,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, sb->s_root =d_make_root (root);if (!sb->s_root) {CERROR ("%s: can't make root dentry\n" , -ll_get_fsname (sb,NULL ,0 )); +ll_get_fsname (sb,NULL ,0 )); err = -ENOMEM ; goto out_lock_cn_cb; }
@@ -601,7 +601,7 @@ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize) size =sizeof (int ); rc =obd_get_info (NULL , sbi->ll_md_exp,sizeof (KEY_DEFAULT_EASIZE ), -KEY_DEFAULT_EASIZE , &size, lmmsize,NULL ); +KEY_DEFAULT_EASIZE , &size, lmmsize,NULL );if (rc)CERROR ("Get default mdsize error rc %d\n" , rc);
@@ -1100,7 +1100,7 @@ void ll_clear_inode(struct inode *inode)#define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)static int ll_md_setattr (struct dentry *dentry,struct md_op_data *op_data, -struct md_open_data **mod) +struct md_open_data **mod) {struct lustre_md md;struct inode *inode =d_inode (dentry);
@@ -1215,11 +1215,11 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)int rc =0 , rc1 =0 ;CDEBUG (D_VFSTRACE , -"%s: setattr inode %p/fid:" DFID -" from %llu to %llu, valid %x, hsm_import %d\n" , -ll_get_fsname (inode->i_sb,NULL ,0 ), inode, -PFID (&lli->lli_fid),i_size_read (inode), attr->ia_size, - attr->ia_valid, hsm_import); +"%s: setattr inode %p/fid:" DFID +" from %llu to %llu, valid %x, hsm_import %d\n" , +ll_get_fsname (inode->i_sb,NULL ,0 ), inode, +PFID (&lli->lli_fid),i_size_read (inode), attr->ia_size, + attr->ia_valid, hsm_import);if (attr->ia_valid &ATTR_SIZE ) {/* Check new size against VFS/VM file size limit and rlimit */
@@ -1826,7 +1826,7 @@ int ll_flush_ctx(struct inode *inode)struct ll_sb_info *sbi =ll_i2sbi (inode);CDEBUG (D_SEC ,"flush context for user %d\n" , -from_kuid (&init_user_ns,current_uid ())); +from_kuid (&init_user_ns,current_uid ())); obd_set_info_async(NULL, sbi->ll_md_exp, sizeof(KEY_FLUSH_CTX), KEY_FLUSH_CTX,
@@ -2127,9 +2127,9 @@ int ll_process_config(struct lustre_cfg *lcfg)/* this function prepares md_op_data hint for passing ot down to MD stack. */ struct md_op_data *ll_prep_md_op_data (struct md_op_data *op_data, -struct inode *i1,struct inode *i2, -const char *name,int namelen, -int mode,__u32 opc,void *data) +struct inode *i1,struct inode *i2, +const char *name,int namelen, +int mode,__u32 opc,void *data) {if (namelen >ll_i2sbi (i1)->ll_namelen)return ERR_PTR (-ENAMETOOLONG );
drivers/staging/lustre/lustre/llite/llite_mmap.c +2 -2
@@ -54,8 +54,8 @@static const struct vm_operations_struct ll_file_vm_ops;void policy_from_vma (ldlm_policy_data_t *policy, -struct vm_area_struct *vma,unsigned long addr, -size_t count) +struct vm_area_struct *vma,unsigned long addr, +size_t count) { policy->l_extent.start = ((addr - vma->vm_start) &CFS_PAGE_MASK ) + (vma->vm_pgoff <<PAGE_CACHE_SHIFT );
drivers/staging/lustre/lustre/llite/llite_nfs.c +6 -6
@@ -191,8 +191,8 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen,int fileid_len =sizeof (struct lustre_nfs_fid ) /4 ;struct lustre_nfs_fid *nfs_fid = (void *)fh; -CDEBUG (D_INFO ,"encoding for (%lu," DFID ") maxlen=%d minlen=%d\n" , - inode->i_ino,PFID (ll_inode2fid (inode)), *plen, fileid_len); +CDEBUG (D_INFO ,"encoding for (%lu," DFID ") maxlen=%d minlen=%d\n" , + inode->i_ino,PFID (ll_inode2fid (inode)), *plen, fileid_len);if (*plen < fileid_len) { *plen = fileid_len;
@@ -298,8 +298,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild) sbi =ll_s2sbi (dir->i_sb); -CDEBUG (D_INFO ,"getting parent for (%lu," DFID ")\n" , - dir->i_ino,PFID (ll_inode2fid (dir))); +CDEBUG (D_INFO ,"getting parent for (%lu," DFID ")\n" , + dir->i_ino,PFID (ll_inode2fid (dir))); rc =ll_get_default_mdsize (sbi, &lmmsize);if (rc !=0 )
@@ -320,8 +320,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild) body =req_capsule_server_get (&req->rq_pill, &RMF_MDT_BODY );LASSERT (body->valid &OBD_MD_FLID ); -CDEBUG (D_INFO ,"parent for " DFID " is " DFID "\n" , -PFID (ll_inode2fid (dir)),PFID (&body->fid1)); +CDEBUG (D_INFO ,"parent for " DFID " is " DFID "\n" , +PFID (ll_inode2fid (dir)),PFID (&body->fid1)); result =ll_iget_for_nfs (dir->i_sb, &body->fid1,NULL );
drivers/staging/lustre/lustre/llite/llite_rmtacl.c +4 -4
@@ -98,7 +98,7 @@ static void rce_free(struct rmtacl_ctl_entry *rce) }static struct rmtacl_ctl_entry *__rct_search (struct rmtacl_ctl_table *rct, -pid_t key) +pid_t key) {struct rmtacl_ctl_entry *rce;struct list_head *head = &rct->rct_entries[rce_hashfunc (key)];
@@ -172,7 +172,7 @@ void rct_fini(struct rmtacl_ctl_table *rct)for (i =0 ; i <RCE_HASHES ; i++)while (!list_empty (&rct->rct_entries[i])) { rce =list_entry (rct->rct_entries[i].next, - struct rmtacl_ctl_entry, rce_list); + struct rmtacl_ctl_entry, rce_list);rce_free (rce); }spin_unlock (&rct->rct_lock);
@@ -208,7 +208,7 @@ void ee_free(struct eacl_entry *ee) }static struct eacl_entry *__et_search_del (struct eacl_table *et,pid_t key, -struct lu_fid *fid,int type) +struct lu_fid *fid,int type) {struct eacl_entry *ee;struct list_head *head = &et->et_entries[ee_hashfunc (key)];
@@ -290,7 +290,7 @@ void et_fini(struct eacl_table *et)for (i =0 ; i <EE_HASHES ; i++)while (!list_empty (&et->et_entries[i])) { ee =list_entry (et->et_entries[i].next, - struct eacl_entry, ee_list); + struct eacl_entry, ee_list);ee_free (ee); }spin_unlock (&et->et_lock);
drivers/staging/lustre/lustre/llite/lproc_llite.c +7 -7
@@ -462,9 +462,9 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file,/* difficult - have to ask OSCs to drop LRU slots. */ tmp = diff <<1 ; rc =obd_set_info_async (NULL , sbi->ll_dt_exp, -sizeof (KEY_CACHE_LRU_SHRINK ), -KEY_CACHE_LRU_SHRINK , -sizeof (tmp), &tmp,NULL ); +sizeof (KEY_CACHE_LRU_SHRINK ), +KEY_CACHE_LRU_SHRINK , +sizeof (tmp), &tmp,NULL );if (rc <0 )break ; }
@@ -1000,7 +1000,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent,CWARN ("Error adding the extent_stats file\n" ); rc =ldebugfs_seq_create (sbi->ll_debugfs_entry, -"extents_stats_per_process" , +"extents_stats_per_process" ,0644 , &ll_rw_extents_stats_pp_fops, sbi);if (rc)CWARN ("Error adding the extents_stats_per_process file\n" );
@@ -1034,7 +1034,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent, llite_opcode_table[id].opname, ptr); } err =ldebugfs_register_stats (sbi->ll_debugfs_entry,"stats" , - sbi->ll_stats); + sbi->ll_stats);if (err) goto out;
@@ -1050,7 +1050,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent, ra_stat_string[id], "pages"); err =ldebugfs_register_stats (sbi->ll_debugfs_entry,"read_ahead_stats" , - sbi->ll_ra_stats); + sbi->ll_ra_stats);if (err) goto out;
@@ -1104,7 +1104,7 @@ void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi)#define pct (a, b) (b ? a * 100 / b : 0)static void ll_display_extents_info (struct ll_rw_extents_info *io_extents, -struct seq_file *seq,int which) +struct seq_file *seq,int which) {unsigned long read_tot =0 , write_tot =0 , read_cum, write_cum;unsigned long start, end, r, w;
drivers/staging/lustre/lustre/llite/namei.c +4 -4
@@ -120,9 +120,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,if (S_ISREG (inode->i_mode) && !ll_i2info (inode)->lli_clob) {CDEBUG (D_INODE , -"%s: apply lsm %p to inode " DFID ".\n" , -ll_get_fsname (sb,NULL ,0 ), md->lsm, -PFID (ll_inode2fid (inode))); +"%s: apply lsm %p to inode " DFID ".\n" , +ll_get_fsname (sb,NULL ,0 ), md->lsm, +PFID (ll_inode2fid (inode))); rc =cl_file_inode_init (inode, md); }if (rc !=0 ) {
@@ -1016,7 +1016,7 @@ static int ll_symlink(struct inode *dir, struct dentry *dentry, dir, 3000, oldname); err =ll_new_node (dir, dentry, oldname,S_IFLNK |S_IRWXUGO , -0 ,LUSTRE_OPC_SYMLINK ); +0 ,LUSTRE_OPC_SYMLINK );if (!err)ll_stats_ops_tally (ll_i2sbi (dir),LPROC_LL_SYMLINK ,1 );
drivers/staging/lustre/lustre/llite/rw.c +3 -3
@@ -626,8 +626,8 @@ static int ll_read_ahead_pages(const struct lu_env *env,RIA_DEBUG (ria); stride_ria = ria->ria_length > ria->ria_pages && ria->ria_pages >0 ; -for (page_idx = ria->ria_start; page_idx <= ria->ria_end && - *reserved_pages >0 ; page_idx++) { +for (page_idx = ria->ria_start; + page_idx <= ria->ria_end && *reserved_pages >0 ; page_idx++) {if (ras_inside_ra_window (page_idx, ria)) {/* If the page is inside the read-ahead window*/ rc = ll_read_ahead_page(env, io, queue,
@@ -869,7 +869,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,unsigned long stride_gap = index - ras->ras_last_readpage -1 ;if (!stride_io_mode (ras) && (stride_gap !=0 || - ras->ras_consecutive_stride_requests ==0 )) { + ras->ras_consecutive_stride_requests ==0 )) { ras->ras_stride_pages = ras->ras_consecutive_pages; ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; }
drivers/staging/lustre/lustre/llite/rw26.c +4 -4
@@ -481,8 +481,8 @@ out: }static int ll_write_begin (struct file *file,struct address_space *mapping, -loff_t pos,unsigned len,unsigned flags, -struct page **pagep,void **fsdata) +loff_t pos,unsigned len,unsigned flags, +struct page **pagep,void **fsdata) {pgoff_t index = pos >>PAGE_CACHE_SHIFT ;struct page *page;
@@ -519,8 +519,8 @@ static int ll_write_end(struct file *file, struct address_space *mapping,#ifdef CONFIG_MIGRATION static int ll_migratepage (struct address_space *mapping, -struct page *newpage,struct page *page, -enum migrate_mode mode +struct page *newpage,struct page *page, +enum migrate_mode mode ) {/* Always fail page migration until we have a proper implementation */
drivers/staging/lustre/lustre/llite/statahead.c +9 -9
@@ -284,7 +284,7 @@ ll_sa_entry_get_byindex(struct ll_statahead_info *sai, __u64 index) }static void ll_sa_entry_cleanup (struct ll_statahead_info *sai, -struct ll_sa_entry *entry) +struct ll_sa_entry *entry) {struct md_enqueue_info *minfo = entry->se_minfo;struct ptlrpc_request *req = entry->se_req;
@@ -303,7 +303,7 @@ static void ll_sa_entry_cleanup(struct ll_statahead_info *sai, }static void ll_sa_entry_put (struct ll_statahead_info *sai, -struct ll_sa_entry *entry) +struct ll_sa_entry *entry) {if (atomic_dec_and_test (&entry->se_refcount)) { CDEBUG(D_READA, "free sa entry %.*s(%p) index %llu\n",
@@ -514,8 +514,8 @@ static void ll_sai_put(struct ll_statahead_info *sai)PFID (&lli->lli_fid), sai->sai_sent, sai->sai_replied); -list_for_each_entry_safe (entry, next, - &sai->sai_entries, se_link) +list_for_each_entry_safe (entry, next, &sai->sai_entries, + se_link)do_sa_entry_fini (sai, entry);LASSERT (list_empty (&sai->sai_entries));
@@ -745,7 +745,7 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, entry->se_handle = handle; wakeup =list_empty (&sai->sai_entries_received);list_add_tail (&entry->se_list, - &sai->sai_entries_received); + &sai->sai_entries_received); } sai->sai_replied++;spin_unlock (&lli->lli_sa_lock);
@@ -1013,8 +1013,8 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai) sai, parent); plli =ll_i2info (d_inode (parent)); - task =kthread_run (ll_agl_thread, parent, -"ll_agl_%u" , plli->lli_opendir_pid); + task =kthread_run (ll_agl_thread, parent,"ll_agl_%u" , + plli->lli_opendir_pid);if (IS_ERR (task)) {CERROR ("can't start ll_agl thread, rc: %ld\n" ,PTR_ERR (task));thread_set_flags (thread,SVC_STOPPED );
@@ -1583,7 +1583,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,struct dentry *alias; alias =ll_splice_alias (inode, - *dentryp); + *dentryp);if (IS_ERR (alias)) {ll_sai_unplug (sai, entry);return PTR_ERR (alias);
@@ -1592,7 +1592,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, }else if (d_inode (*dentryp) != inode) {/* revalidate, but inode is recreated */ CDEBUG(D_READA, - "stale dentry %pd inode %lu/%u, statahead inode %lu/%u\n", + "stale dentry %pd inode %lu/%u, statahead inode %lu/%u\n", *dentryp, d_inode(*dentryp)->i_ino, d_inode(*dentryp)->i_generation,
drivers/staging/lustre/lustre/llite/super25.c +2 -2
@@ -113,8 +113,8 @@ static int __init init_lustre_lite(void) goto out_cache; ll_file_data_slab =kmem_cache_create ("ll_file_data" , -sizeof (struct ll_file_data ),0 , -SLAB_HWCACHE_ALIGN ,NULL ); +sizeof (struct ll_file_data ),0 , +SLAB_HWCACHE_ALIGN ,NULL );if (!ll_file_data_slab) goto out_cache;
drivers/staging/lustre/lustre/llite/symlink.c +1 -1
@@ -91,7 +91,7 @@ static int ll_readlink_internal(struct inode *inode,LASSERT (symlen !=0 );if (body->eadatasize != symlen) {CERROR ("inode %lu: symlink length %d not expected %d\n" , - inode->i_ino, body->eadatasize -1 , symlen -1 ); + inode->i_ino, body->eadatasize -1 , symlen -1 ); rc = -EPROTO ; goto failed; }
drivers/staging/lustre/lustre/llite/vvp_internal.h +6 -7
@@ -44,14 +44,13 @@#include "../include/cl_object.h" #include "llite_internal.h" -int vvp_io_init (const struct lu_env *env, -struct cl_object *obj,struct cl_io *io); -int vvp_lock_init (const struct lu_env *env, -struct cl_object *obj,struct cl_lock *lock, +int vvp_io_init (const struct lu_env *env, +struct cl_object *obj,struct cl_io *io); +int vvp_lock_init (const struct lu_env *env, +struct cl_object *obj,struct cl_lock *lock,const struct cl_io *io); -int vvp_page_init (const struct lu_env *env, -struct cl_object *obj, -struct cl_page *page,struct page *vmpage); +int vvp_page_init (const struct lu_env *env,struct cl_object *obj, +struct cl_page *page,struct page *vmpage);struct lu_object *vvp_object_alloc (const struct lu_env *env,const struct lu_object_header *hdr,struct lu_device *dev);
drivers/staging/lustre/lustre/llite/vvp_io.c +7 -7
@@ -68,7 +68,7 @@ int cl_is_normalio(const struct lu_env *env, const struct cl_io *io)* have to acquire group lock. */ static bool can_populate_pages (const struct lu_env *env,struct cl_io *io, -struct inode *inode) +struct inode *inode) {struct ll_inode_info *lli =ll_i2info (inode);struct ccc_io *cio =ccc_env_io (env);
@@ -501,8 +501,8 @@ static int vvp_io_read_start(const struct lu_env *env, goto out;LU_OBJECT_HEADER (D_INODE , env, &obj->co_lu, -"Read ino %lu, %lu bytes, offset %lld, size %llu\n" , - inode->i_ino, cnt, pos,i_size_read (inode)); +"Read ino %lu, %lu bytes, offset %lld, size %llu\n" , + inode->i_ino, cnt, pos,i_size_read (inode));/* turn off the kernel's read-ahead */ cio->cui_fd->fd_file->f_ra.ra_pages =0 ;
@@ -527,8 +527,8 @@ static int vvp_io_read_start(const struct lu_env *env,break ;case IO_SPLICE : result =generic_file_splice_read (file, &pos, - vio->u.splice.cui_pipe, cnt, - vio->u.splice.cui_flags); + vio->u.splice.cui_pipe, cnt, + vio->u.splice.cui_flags);/* LU-1109: do splice read stripe by stripe otherwise if it * may make nfsd stuck if this read occupied all internal pipe * buffers.
@@ -1202,8 +1202,8 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj, result =0 ;if (result <0 )CERROR ("%s: refresh file layout " DFID " error %d.\n" , -ll_get_fsname (inode->i_sb,NULL ,0 ), -PFID (lu_object_fid (&obj->co_lu)), result); +ll_get_fsname (inode->i_sb,NULL ,0 ), +PFID (lu_object_fid (&obj->co_lu)), result); }return result;
drivers/staging/lustre/lustre/llite/vvp_page.c +5 -7
@@ -263,7 +263,7 @@ static void vvp_vmpage_error(struct inode *inode, struct page *vmpage, int ioretset_bit (AS_EIO , &inode->i_mapping->flags);if ((ioret == -ESHUTDOWN || ioret == -EINTR ) && - obj->cob_discard_page_warned ==0 ) { + obj->cob_discard_page_warned ==0 ) { obj->cob_discard_page_warned =1 ;ll_dirty_page_discard_warn (vmpage, ioret); }
@@ -359,8 +359,7 @@ static int vvp_page_make_ready(const struct lu_env *env,LASSERT (pg->cp_state ==CPS_CACHED );/* This actually clears the dirty bit in the radix tree. */ set_page_writeback (vmpage); -vvp_write_pending (cl2ccc (slice->cpl_obj), -cl2ccc_page (slice)); +vvp_write_pending (cl2ccc (slice->cpl_obj),cl2ccc_page (slice));CL_PAGE_HEADER (D_PAGE , env, pg,"readied\n" ); }else if (pg->cp_state ==CPS_PAGEOUT ) {/* is it possible for osc_flush_async_page() to already
@@ -531,7 +530,7 @@ static const struct cl_page_operations vvp_transient_page_ops = { };int vvp_page_init (const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *vmpage) +struct cl_page *page,struct page *vmpage) {struct ccc_page *cpg =cl_object_page_slice (obj, page);
@@ -544,14 +543,13 @@ int vvp_page_init(const struct lu_env *env, struct cl_object *obj,if (page->cp_type ==CPT_CACHEABLE ) {SetPagePrivate (vmpage); vmpage->private = (unsigned long )page; -cl_page_slice_add (page, &cpg->cpg_cl, obj, - &vvp_page_ops); +cl_page_slice_add (page, &cpg->cpg_cl, obj, &vvp_page_ops); }else {struct ccc_object *clobj =cl2ccc (obj);LASSERT (!inode_trylock (clobj->cob_inode));cl_page_slice_add (page, &cpg->cpg_cl, obj, - &vvp_transient_page_ops); + &vvp_transient_page_ops); clobj->cob_transient_pages++; }return 0 ;
drivers/staging/lustre/lustre/llite/xattr.c +4 -4
@@ -135,7 +135,7 @@ int ll_setxattr_common(struct inode *inode, const char *name,/* b15587: ignore security.capability xattr for now */ if ((xattr_type ==XATTR_SECURITY_T && -strcmp (name,"security.capability" ) ==0 )) +strcmp (name,"security.capability" ) ==0 ))return 0 ;/* LU-549: Disable security.selinux when selinux is disabled */
@@ -311,7 +311,7 @@ int ll_getxattr_common(struct inode *inode, const char *name,/* b15587: ignore security.capability xattr for now */ if ((xattr_type ==XATTR_SECURITY_T && -strcmp (name,"security.capability" ) ==0 )) +strcmp (name,"security.capability" ) ==0 ))return -ENODATA ;/* LU-549: Disable security.selinux when selinux is disabled */
@@ -397,7 +397,7 @@ getxattr_nocache:if (size < body->eadatasize) {CERROR ("server bug: replied size %u > %u\n" , - body->eadatasize, (int )size); + body->eadatasize, (int )size); rc = -ERANGE ; goto out; }
@@ -409,7 +409,7 @@ getxattr_nocache:/* do not need swab xattr data */ xdata =req_capsule_server_sized_get (&req->rq_pill, &RMF_EADATA , - body->eadatasize); + body->eadatasize);if (!xdata) { rc = -EFAULT ; goto out;
drivers/staging/lustre/lustre/llite/xattr_cache.c +8 -11
@@ -133,8 +133,8 @@ static int ll_xattr_cache_add(struct list_head *cache, xattr->xe_vallen = xattr_val_len;list_add (&xattr->xe_list, cache); -CDEBUG (D_CACHE ,"set: [%s]=%.*s\n" , xattr_name, - xattr_val_len, xattr_val); +CDEBUG (D_CACHE ,"set: [%s]=%.*s\n" , xattr_name, xattr_val_len, + xattr_val);return 0 ; err_value:
@@ -191,7 +191,7 @@ static int ll_xattr_cache_list(struct list_head *cache,list_for_each_entry_safe (xattr, tmp, cache, xe_list) {CDEBUG (D_CACHE ,"list: buffer=%p[%d] name=%s\n" , - xld_buffer, xld_tail, xattr->xe_name); + xld_buffer, xld_tail, xattr->xe_name);if (xld_buffer) { xld_size -= xattr->xe_namelen;
@@ -381,9 +381,9 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) }/* do not need swab xattr data */ xdata =req_capsule_server_sized_get (&req->rq_pill, &RMF_EADATA , - body->eadatasize); + body->eadatasize); xval =req_capsule_server_sized_get (&req->rq_pill, &RMF_EAVALS , - body->aclsize); + body->aclsize); xsizes =req_capsule_server_sized_get (&req->rq_pill, &RMF_EAVALS_LENS , body->max_mdsize *sizeof (__u32));if (!xdata || !xval || !xsizes) {
@@ -469,11 +469,8 @@ out_destroy:* \retval -ERANGE the buffer is not large enough * \retval -ENODATA no such attr or the list is empty */ -int ll_xattr_cache_get (struct inode *inode, -const char *name, -char *buffer, -size_t size, -__u64 valid) +int ll_xattr_cache_get (struct inode *inode,const char *name,char *buffer, +size_t size,__u64 valid) {struct lookup_intent oit = { .it_op =IT_GETXATTR };struct ll_inode_info *lli =ll_i2info (inode);
@@ -502,7 +499,7 @@ int ll_xattr_cache_get(struct inode *inode,if (size !=0 ) {if (size >= xattr->xe_vallen)memcpy (buffer, xattr->xe_value, - xattr->xe_vallen); + xattr->xe_vallen);else rc = -ERANGE ; }
Signature · 1 line
2.1.0
PATCH 2/25 staging/lustre/include: Fix style of function declarations
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about "Alignment should match open parenthesis" and "space prohibited between function name and open parenthesis"
--- drivers/staging/lustre/lustre/include/cl_object.h | 410 ++++++++++----------- .../staging/lustre/lustre/include/lprocfs_status.h | 6 +- .../lustre/lustre/include/lustre/lustre_idl.h | 10 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/include/lustre_net.h | 19 +- .../lustre/lustre/include/lustre_req_layout.h | 4 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 128 +++---- drivers/staging/lustre/lustre/include/obd.h | 6 +- drivers/staging/lustre/lustre/include/obd_class.h | 14 +- 9 files changed, 281 insertions(+), 318 deletions(-)
drivers/staging/lustre/lustre/include/cl_object.h +200 -210
@@ -322,7 +322,7 @@ struct cl_object_operations {* to be used instead of newly created. */ int (*coo_page_init)(const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *vmpage); +struct cl_page *page,struct page *vmpage);/** * Initialize lock slice for this layer. Called top-to-bottom through * every object layer when a new cl_lock is instantiated. Layer
@@ -849,7 +849,7 @@ struct cl_page_operations {* \return the underlying VM page. Optional. */ struct page *(*cpo_vmpage)(const struct lu_env *env, -const struct cl_page_slice *slice); +const struct cl_page_slice *slice);/** * Called when \a io acquires this page into the exclusive * ownership. When this method returns, it is guaranteed that the is
@@ -2051,8 +2051,8 @@ struct cl_io_operations {* * \see cl_io_operations::cio_iter_fini() */ -int (*cio_iter_init) (const struct lu_env *env, -const struct cl_io_slice *slice); +int (*cio_iter_init)(const struct lu_env *env, +const struct cl_io_slice *slice);/** * Finalize io iteration. *
@@ -2062,8 +2062,8 @@ struct cl_io_operations {* * \see cl_io_operations::cio_iter_init() */ -void (*cio_iter_fini) (const struct lu_env *env, -const struct cl_io_slice *slice); +void (*cio_iter_fini)(const struct lu_env *env, +const struct cl_io_slice *slice);/** * Collect locks for the current iteration of io. *
@@ -2073,8 +2073,8 @@ struct cl_io_operations {* cl_io_lock_add(). Once all locks are collected, they are * sorted and enqueued in the proper order. */ -int (*cio_lock) (const struct lu_env *env, -const struct cl_io_slice *slice); +int (*cio_lock)(const struct lu_env *env, +const struct cl_io_slice *slice);/** * Finalize unlocking. *
@@ -2099,8 +2099,8 @@ struct cl_io_operations {* Called top-to-bottom at the end of io loop. Here layer * might wait for an unfinished asynchronous io. */ -void (*cio_end) (const struct lu_env *env, -const struct cl_io_slice *slice); +void (*cio_end)(const struct lu_env *env, +const struct cl_io_slice *slice);/** * Called bottom-to-top to notify layers that read/write IO * iteration finished, with \a nob bytes transferred.
@@ -2111,8 +2111,8 @@ struct cl_io_operations {/** * Called once per io, bottom-to-top to release io resources. */ -void (*cio_fini) (const struct lu_env *env, -const struct cl_io_slice *slice); +void (*cio_fini)(const struct lu_env *env, +const struct cl_io_slice *slice); } op[CIT_OP_NR ];struct {/**
@@ -2232,7 +2232,7 @@ struct cl_io_lock_link {struct cl_lock *cill_lock;/** optional destructor */ void (*cill_fini)(const struct lu_env *env, -struct cl_io_lock_link *link); +struct cl_io_lock_link *link); };/**
@@ -2613,7 +2613,7 @@ struct cache_stats { };/** These are not exported so far */ -void cache_stats_init (struct cache_stats *cs,const char *name); +void cache_stats_init (struct cache_stats *cs,const char *name);/** * Client-side site. This represents particular client stack. "Global"
@@ -2637,8 +2637,8 @@ struct cl_site {atomic_t cs_locks_state[CLS_NR ]; }; -int cl_site_init (struct cl_site *s,struct cl_device *top); -void cl_site_fini (struct cl_site *s); +int cl_site_init (struct cl_site *s,struct cl_device *top); +void cl_site_fini (struct cl_site *s);void cl_stack_fini (const struct lu_env *env,struct cl_device *cl);/**
@@ -2740,26 +2740,26 @@ void cl_req_slice_add(struct cl_req *req, struct cl_req_slice *slice,/** \defgroup cl_object cl_object * @{ */ -struct cl_object *cl_object_top (struct cl_object *o); +struct cl_object *cl_object_top (struct cl_object *o);struct cl_object *cl_object_find (const struct lu_env *env,struct cl_device *cd,const struct lu_fid *fid,const struct cl_object_conf *c);int cl_object_header_init (struct cl_object_header *h); -void cl_object_put (const struct lu_env *env,struct cl_object *o); -void cl_object_get (struct cl_object *o); -void cl_object_attr_lock (struct cl_object *o); +void cl_object_put (const struct lu_env *env,struct cl_object *o); +void cl_object_get (struct cl_object *o); +void cl_object_attr_lock (struct cl_object *o);void cl_object_attr_unlock (struct cl_object *o); -int cl_object_attr_get (const struct lu_env *env,struct cl_object *obj, -struct cl_attr *attr); -int cl_object_attr_set (const struct lu_env *env,struct cl_object *obj, -const struct cl_attr *attr,unsigned valid); -int cl_object_glimpse (const struct lu_env *env,struct cl_object *obj, -struct ost_lvb *lvb); -int cl_conf_set (const struct lu_env *env,struct cl_object *obj, -const struct cl_object_conf *conf); -void cl_object_prune (const struct lu_env *env,struct cl_object *obj); -void cl_object_kill (const struct lu_env *env,struct cl_object *obj); +int cl_object_attr_get (const struct lu_env *env,struct cl_object *obj, +struct cl_attr *attr); +int cl_object_attr_set (const struct lu_env *env,struct cl_object *obj, +const struct cl_attr *attr,unsigned valid); +int cl_object_glimpse (const struct lu_env *env,struct cl_object *obj, +struct ost_lvb *lvb); +int cl_conf_set (const struct lu_env *env,struct cl_object *obj, +const struct cl_object_conf *conf); +void cl_object_prune (const struct lu_env *env,struct cl_object *obj); +void cl_object_kill (const struct lu_env *env,struct cl_object *obj);/** * Returns true, iff \a o0 and \a o1 are slices of the same object.
@@ -2796,34 +2796,26 @@ enum {/* callback of cl_page_gang_lookup() */ typedef int (*cl_page_gang_cb_t ) (const struct lu_env *,struct cl_io *,struct cl_page *,void *); -int cl_page_gang_lookup (const struct lu_env *env, -struct cl_object *obj, -struct cl_io *io, -pgoff_t start,pgoff_t end, -cl_page_gang_cb_t cb,void *cbdata); -struct cl_page *cl_page_lookup (struct cl_object_header *hdr, -pgoff_t index); -struct cl_page *cl_page_find (const struct lu_env *env, -struct cl_object *obj, -pgoff_t idx,struct page *vmpage, -enum cl_page_type type); -struct cl_page *cl_page_find_sub (const struct lu_env *env, -struct cl_object *obj, -pgoff_t idx,struct page *vmpage, +int cl_page_gang_lookup (const struct lu_env *env,struct cl_object *obj, +struct cl_io *io,pgoff_t start,pgoff_t end, +cl_page_gang_cb_t cb,void *cbdata); +struct cl_page *cl_page_lookup (struct cl_object_header *hdr,pgoff_t index); +struct cl_page *cl_page_find (const struct lu_env *env,struct cl_object *obj, +pgoff_t idx,struct page *vmpage, +enum cl_page_type type); +struct cl_page *cl_page_find_sub (const struct lu_env *env, +struct cl_object *obj, +pgoff_t idx,struct page *vmpage,struct cl_page *parent); -void cl_page_get (struct cl_page *page); -void cl_page_put (const struct lu_env *env, -struct cl_page *page); -void cl_page_print (const struct lu_env *env,void *cookie, -lu_printer_t printer, -const struct cl_page *pg); -void cl_page_header_print (const struct lu_env *env,void *cookie, -lu_printer_t printer, -const struct cl_page *pg); -struct page *cl_page_vmpage (const struct lu_env *env, -struct cl_page *page); -struct cl_page *cl_vmpage_page (struct page *vmpage,struct cl_object *obj); -struct cl_page *cl_page_top (struct cl_page *page); +void cl_page_get (struct cl_page *page); +void cl_page_put (const struct lu_env *env,struct cl_page *page); +void cl_page_print (const struct lu_env *env,void *cookie,lu_printer_t printer, +const struct cl_page *pg); +void cl_page_header_print (const struct lu_env *env,void *cookie, +lu_printer_t printer,const struct cl_page *pg); +struct page *cl_page_vmpage (const struct lu_env *env,struct cl_page *page); +struct cl_page *cl_vmpage_page (struct page *vmpage,struct cl_object *obj); +struct cl_page *cl_page_top (struct cl_page *page);const struct cl_page_slice *cl_page_at (const struct cl_page *page,const struct lu_device_type *dtype);
@@ -2835,17 +2827,17 @@ const struct cl_page_slice *cl_page_at(const struct cl_page *page,*/ /** @{ */ -int cl_page_own (const struct lu_env *env, -struct cl_io *io,struct cl_page *page); -int cl_page_own_try (const struct lu_env *env, -struct cl_io *io,struct cl_page *page); -void cl_page_assume (const struct lu_env *env, -struct cl_io *io,struct cl_page *page); -void cl_page_unassume (const struct lu_env *env, -struct cl_io *io,struct cl_page *pg); -void cl_page_disown (const struct lu_env *env, -struct cl_io *io,struct cl_page *page); -int cl_page_is_owned (const struct cl_page *pg,const struct cl_io *io); +int cl_page_own (const struct lu_env *env, +struct cl_io *io,struct cl_page *page); +int cl_page_own_try (const struct lu_env *env, +struct cl_io *io,struct cl_page *page); +void cl_page_assume (const struct lu_env *env, +struct cl_io *io,struct cl_page *page); +void cl_page_unassume (const struct lu_env *env, +struct cl_io *io,struct cl_page *pg); +void cl_page_disown (const struct lu_env *env, +struct cl_io *io,struct cl_page *page); +int cl_page_is_owned (const struct cl_page *pg,const struct cl_io *io);/** @} ownership */
@@ -2856,19 +2848,19 @@ int cl_page_is_owned (const struct cl_page *pg, const struct cl_io *io);* tracking transfer state. */ /** @{ */ -int cl_page_prep (const struct lu_env *env,struct cl_io *io, -struct cl_page *pg,enum cl_req_type crt); -void cl_page_completion (const struct lu_env *env, -struct cl_page *pg,enum cl_req_type crt,int ioret); -int cl_page_make_ready (const struct lu_env *env,struct cl_page *pg, -enum cl_req_type crt); -int cl_page_cache_add (const struct lu_env *env,struct cl_io *io, -struct cl_page *pg,enum cl_req_type crt); -void cl_page_clip (const struct lu_env *env,struct cl_page *pg, -int from,int to); -int cl_page_cancel (const struct lu_env *env,struct cl_page *page); -int cl_page_flush (const struct lu_env *env,struct cl_io *io, -struct cl_page *pg); +int cl_page_prep (const struct lu_env *env,struct cl_io *io, +struct cl_page *pg,enum cl_req_type crt); +void cl_page_completion (const struct lu_env *env, +struct cl_page *pg,enum cl_req_type crt,int ioret); +int cl_page_make_ready (const struct lu_env *env,struct cl_page *pg, +enum cl_req_type crt); +int cl_page_cache_add (const struct lu_env *env,struct cl_io *io, +struct cl_page *pg,enum cl_req_type crt); +void cl_page_clip (const struct lu_env *env,struct cl_page *pg, +int from,int to); +int cl_page_cancel (const struct lu_env *env,struct cl_page *page); +int cl_page_flush (const struct lu_env *env,struct cl_io *io, +struct cl_page *pg);/** @} transfer */
@@ -2877,24 +2869,22 @@ int cl_page_flush (const struct lu_env *env, struct cl_io *io,* Functions to discard, delete and export a cl_page. */ /** @{ */ -void cl_page_discard (const struct lu_env *env,struct cl_io *io, -struct cl_page *pg); -void cl_page_delete (const struct lu_env *env,struct cl_page *pg); -int cl_page_unmap (const struct lu_env *env,struct cl_io *io, -struct cl_page *pg); -int cl_page_is_vmlocked (const struct lu_env *env, -const struct cl_page *pg); -void cl_page_export (const struct lu_env *env, -struct cl_page *pg,int uptodate); -int cl_page_is_under_lock (const struct lu_env *env,struct cl_io *io, -struct cl_page *page); -loff_t cl_offset (const struct cl_object *obj,pgoff_t idx); -pgoff_t cl_index (const struct cl_object *obj,loff_t offset); -int cl_page_size (const struct cl_object *obj); -int cl_pages_prune (const struct lu_env *env,struct cl_object *obj); - -void cl_lock_print (const struct lu_env *env,void *cookie, -lu_printer_t printer,const struct cl_lock *lock); +void cl_page_discard (const struct lu_env *env,struct cl_io *io, +struct cl_page *pg); +void cl_page_delete (const struct lu_env *env,struct cl_page *pg); +int cl_page_unmap (const struct lu_env *env,struct cl_io *io, +struct cl_page *pg); +int cl_page_is_vmlocked (const struct lu_env *env,const struct cl_page *pg); +void cl_page_export (const struct lu_env *env,struct cl_page *pg,int uptodate); +int cl_page_is_under_lock (const struct lu_env *env,struct cl_io *io, +struct cl_page *page); +loff_t cl_offset (const struct cl_object *obj,pgoff_t idx); +pgoff_t cl_index (const struct cl_object *obj,loff_t offset); +int cl_page_size (const struct cl_object *obj); +int cl_pages_prune (const struct lu_env *env,struct cl_object *obj); + +void cl_lock_print (const struct lu_env *env,void *cookie, +lu_printer_t printer,const struct cl_lock *lock);void cl_lock_descr_print (const struct lu_env *env,void *cookie,lu_printer_t printer,const struct cl_lock_descr *descr);
@@ -2933,19 +2923,19 @@ static inline struct cl_lock *cl_lock_at_page(const struct lu_env *env,const struct cl_lock_slice *cl_lock_at (const struct cl_lock *lock,const struct lu_device_type *dtype); -void cl_lock_get (struct cl_lock *lock); -void cl_lock_get_trust (struct cl_lock *lock); -void cl_lock_put (const struct lu_env *env,struct cl_lock *lock); -void cl_lock_hold_add (const struct lu_env *env,struct cl_lock *lock, -const char *scope,const void *source); +void cl_lock_get (struct cl_lock *lock); +void cl_lock_get_trust (struct cl_lock *lock); +void cl_lock_put (const struct lu_env *env,struct cl_lock *lock); +void cl_lock_hold_add (const struct lu_env *env,struct cl_lock *lock, +const char *scope,const void *source);void cl_lock_hold_release (const struct lu_env *env,struct cl_lock *lock,const char *scope,const void *source); -void cl_lock_unhold (const struct lu_env *env,struct cl_lock *lock, -const char *scope,const void *source); -void cl_lock_release (const struct lu_env *env,struct cl_lock *lock, -const char *scope,const void *source); -void cl_lock_user_add (const struct lu_env *env,struct cl_lock *lock); -void cl_lock_user_del (const struct lu_env *env,struct cl_lock *lock); +void cl_lock_unhold (const struct lu_env *env,struct cl_lock *lock, +const char *scope,const void *source); +void cl_lock_release (const struct lu_env *env,struct cl_lock *lock, +const char *scope,const void *source); +void cl_lock_user_add (const struct lu_env *env,struct cl_lock *lock); +void cl_lock_user_del (const struct lu_env *env,struct cl_lock *lock);int cl_lock_is_intransit (struct cl_lock *lock);
@@ -2985,50 +2975,50 @@ int cl_lock_enqueue_wait(const struct lu_env *env, struct cl_lock *lock,* @{ */ -int cl_wait (const struct lu_env *env,struct cl_lock *lock); -void cl_unuse (const struct lu_env *env,struct cl_lock *lock); -int cl_enqueue_try (const struct lu_env *env,struct cl_lock *lock, -struct cl_io *io,__u32 flags); -int cl_unuse_try (const struct lu_env *env,struct cl_lock *lock); -int cl_wait_try (const struct lu_env *env,struct cl_lock *lock); -int cl_use_try (const struct lu_env *env,struct cl_lock *lock,int atomic); +int cl_wait (const struct lu_env *env,struct cl_lock *lock); +void cl_unuse (const struct lu_env *env,struct cl_lock *lock); +int cl_enqueue_try (const struct lu_env *env,struct cl_lock *lock, +struct cl_io *io,__u32 flags); +int cl_unuse_try (const struct lu_env *env,struct cl_lock *lock); +int cl_wait_try (const struct lu_env *env,struct cl_lock *lock); +int cl_use_try (const struct lu_env *env,struct cl_lock *lock,int atomic);/** @} statemachine */ -void cl_lock_signal (const struct lu_env *env,struct cl_lock *lock); -int cl_lock_state_wait (const struct lu_env *env,struct cl_lock *lock); -void cl_lock_state_set (const struct lu_env *env,struct cl_lock *lock, -enum cl_lock_state state); -int cl_queue_match (const struct list_head *queue, -const struct cl_lock_descr *need); - -void cl_lock_mutex_get (const struct lu_env *env,struct cl_lock *lock); -void cl_lock_mutex_put (const struct lu_env *env,struct cl_lock *lock); -int cl_lock_is_mutexed (struct cl_lock *lock); -int cl_lock_nr_mutexed (const struct lu_env *env); -int cl_lock_discard_pages (const struct lu_env *env,struct cl_lock *lock); -int cl_lock_ext_match (const struct cl_lock_descr *has, -const struct cl_lock_descr *need); -int cl_lock_descr_match (const struct cl_lock_descr *has, -const struct cl_lock_descr *need); -int cl_lock_mode_match (enum cl_lock_mode has,enum cl_lock_mode need); -int cl_lock_modify (const struct lu_env *env,struct cl_lock *lock, -const struct cl_lock_descr *desc); - -void cl_lock_closure_init (const struct lu_env *env, -struct cl_lock_closure *closure, -struct cl_lock *origin,int wait); -void cl_lock_closure_fini (struct cl_lock_closure *closure); -int cl_lock_closure_build (const struct lu_env *env,struct cl_lock *lock, -struct cl_lock_closure *closure); -void cl_lock_disclosure (const struct lu_env *env, -struct cl_lock_closure *closure); -int cl_lock_enclosure (const struct lu_env *env,struct cl_lock *lock, -struct cl_lock_closure *closure); +void cl_lock_signal (const struct lu_env *env,struct cl_lock *lock); +int cl_lock_state_wait (const struct lu_env *env,struct cl_lock *lock); +void cl_lock_state_set (const struct lu_env *env,struct cl_lock *lock, +enum cl_lock_state state); +int cl_queue_match (const struct list_head *queue, +const struct cl_lock_descr *need); + +void cl_lock_mutex_get (const struct lu_env *env,struct cl_lock *lock); +void cl_lock_mutex_put (const struct lu_env *env,struct cl_lock *lock); +int cl_lock_is_mutexed (struct cl_lock *lock); +int cl_lock_nr_mutexed (const struct lu_env *env); +int cl_lock_discard_pages (const struct lu_env *env,struct cl_lock *lock); +int cl_lock_ext_match (const struct cl_lock_descr *has, +const struct cl_lock_descr *need); +int cl_lock_descr_match (const struct cl_lock_descr *has, +const struct cl_lock_descr *need); +int cl_lock_mode_match (enum cl_lock_mode has,enum cl_lock_mode need); +int cl_lock_modify (const struct lu_env *env,struct cl_lock *lock, +const struct cl_lock_descr *desc); + +void cl_lock_closure_init (const struct lu_env *env, +struct cl_lock_closure *closure, +struct cl_lock *origin,int wait); +void cl_lock_closure_fini (struct cl_lock_closure *closure); +int cl_lock_closure_build (const struct lu_env *env,struct cl_lock *lock, +struct cl_lock_closure *closure); +void cl_lock_disclosure (const struct lu_env *env, +struct cl_lock_closure *closure); +int cl_lock_enclosure (const struct lu_env *env,struct cl_lock *lock, +struct cl_lock_closure *closure);void cl_lock_cancel (const struct lu_env *env,struct cl_lock *lock);void cl_lock_delete (const struct lu_env *env,struct cl_lock *lock); -void cl_lock_error (const struct lu_env *env,struct cl_lock *lock,int error); +void cl_lock_error (const struct lu_env *env,struct cl_lock *lock,int error);void cl_locks_prune (const struct lu_env *env,struct cl_object *obj,int wait);unsigned long cl_lock_weigh (const struct lu_env *env,struct cl_lock *lock);
@@ -3039,37 +3029,37 @@ unsigned long cl_lock_weigh(const struct lu_env *env, struct cl_lock *lock);* @{ */ -int cl_io_init (const struct lu_env *env,struct cl_io *io, -enum cl_io_type iot,struct cl_object *obj); -int cl_io_sub_init (const struct lu_env *env,struct cl_io *io, -enum cl_io_type iot,struct cl_object *obj); -int cl_io_rw_init (const struct lu_env *env,struct cl_io *io, -enum cl_io_type iot,loff_t pos,size_t count); -int cl_io_loop (const struct lu_env *env,struct cl_io *io); - -void cl_io_fini (const struct lu_env *env,struct cl_io *io); -int cl_io_iter_init (const struct lu_env *env,struct cl_io *io); -void cl_io_iter_fini (const struct lu_env *env,struct cl_io *io); -int cl_io_lock (const struct lu_env *env,struct cl_io *io); -void cl_io_unlock (const struct lu_env *env,struct cl_io *io); -int cl_io_start (const struct lu_env *env,struct cl_io *io); -void cl_io_end (const struct lu_env *env,struct cl_io *io); -int cl_io_lock_add (const struct lu_env *env,struct cl_io *io, -struct cl_io_lock_link *link); -int cl_io_lock_alloc_add (const struct lu_env *env,struct cl_io *io, -struct cl_lock_descr *descr); -int cl_io_read_page (const struct lu_env *env,struct cl_io *io, -struct cl_page *page); -int cl_io_prepare_write (const struct lu_env *env,struct cl_io *io, -struct cl_page *page,unsigned from,unsigned to); -int cl_io_commit_write (const struct lu_env *env,struct cl_io *io, -struct cl_page *page,unsigned from,unsigned to); -int cl_io_submit_rw (const struct lu_env *env,struct cl_io *io, -enum cl_req_type iot,struct cl_2queue *queue); -int cl_io_submit_sync (const struct lu_env *env,struct cl_io *io, -enum cl_req_type iot,struct cl_2queue *queue, -long timeout); -int cl_io_is_going (const struct lu_env *env); +int cl_io_init (const struct lu_env *env,struct cl_io *io, +enum cl_io_type iot,struct cl_object *obj); +int cl_io_sub_init (const struct lu_env *env,struct cl_io *io, +enum cl_io_type iot,struct cl_object *obj); +int cl_io_rw_init (const struct lu_env *env,struct cl_io *io, +enum cl_io_type iot,loff_t pos,size_t count); +int cl_io_loop (const struct lu_env *env,struct cl_io *io); + +void cl_io_fini (const struct lu_env *env,struct cl_io *io); +int cl_io_iter_init (const struct lu_env *env,struct cl_io *io); +void cl_io_iter_fini (const struct lu_env *env,struct cl_io *io); +int cl_io_lock (const struct lu_env *env,struct cl_io *io); +void cl_io_unlock (const struct lu_env *env,struct cl_io *io); +int cl_io_start (const struct lu_env *env,struct cl_io *io); +void cl_io_end (const struct lu_env *env,struct cl_io *io); +int cl_io_lock_add (const struct lu_env *env,struct cl_io *io, +struct cl_io_lock_link *link); +int cl_io_lock_alloc_add (const struct lu_env *env,struct cl_io *io, +struct cl_lock_descr *descr); +int cl_io_read_page (const struct lu_env *env,struct cl_io *io, +struct cl_page *page); +int cl_io_prepare_write (const struct lu_env *env,struct cl_io *io, +struct cl_page *page,unsigned from,unsigned to); +int cl_io_commit_write (const struct lu_env *env,struct cl_io *io, +struct cl_page *page,unsigned from,unsigned to); +int cl_io_submit_rw (const struct lu_env *env,struct cl_io *io, +enum cl_req_type iot,struct cl_2queue *queue); +int cl_io_submit_sync (const struct lu_env *env,struct cl_io *io, +enum cl_req_type iot,struct cl_2queue *queue, +long timeout); +int cl_io_is_going (const struct lu_env *env);/** * True, iff \a io is an O_APPEND write(2).
@@ -3136,21 +3126,20 @@ static inline struct cl_page *cl_page_list_last(struct cl_page_list *plist)#define cl_page_list_for_each_safe (page, temp, list) \ list_for_each_entry_safe((page), (temp), &(list)->pl_pages, cp_batch) -void cl_page_list_init (struct cl_page_list *plist); -void cl_page_list_add (struct cl_page_list *plist,struct cl_page *page); -void cl_page_list_move (struct cl_page_list *dst,struct cl_page_list *src, -struct cl_page *page); -void cl_page_list_splice (struct cl_page_list *list, -struct cl_page_list *head); -void cl_page_list_disown (const struct lu_env *env, -struct cl_io *io,struct cl_page_list *plist); - -void cl_2queue_init (struct cl_2queue *queue); -void cl_2queue_disown (const struct lu_env *env, -struct cl_io *io,struct cl_2queue *queue); -void cl_2queue_discard (const struct lu_env *env, -struct cl_io *io,struct cl_2queue *queue); -void cl_2queue_fini (const struct lu_env *env,struct cl_2queue *queue); +void cl_page_list_init (struct cl_page_list *plist); +void cl_page_list_add (struct cl_page_list *plist,struct cl_page *page); +void cl_page_list_move (struct cl_page_list *dst,struct cl_page_list *src, +struct cl_page *page); +void cl_page_list_splice (struct cl_page_list *list,struct cl_page_list *head); +void cl_page_list_disown (const struct lu_env *env, +struct cl_io *io,struct cl_page_list *plist); + +void cl_2queue_init (struct cl_2queue *queue); +void cl_2queue_disown (const struct lu_env *env, +struct cl_io *io,struct cl_2queue *queue); +void cl_2queue_discard (const struct lu_env *env, +struct cl_io *io,struct cl_2queue *queue); +void cl_2queue_fini (const struct lu_env *env,struct cl_2queue *queue);void cl_2queue_init_page (struct cl_2queue *queue,struct cl_page *page);/** @} cl_page_list */
@@ -3161,16 +3150,17 @@ void cl_2queue_init_page(struct cl_2queue *queue, struct cl_page *page);struct cl_req *cl_req_alloc (const struct lu_env *env,struct cl_page *page,enum cl_req_type crt,int nr_objects); -void cl_req_page_add (const struct lu_env *env,struct cl_req *req, -struct cl_page *page); -void cl_req_page_done (const struct lu_env *env,struct cl_page *page); -int cl_req_prep (const struct lu_env *env,struct cl_req *req); -void cl_req_attr_set (const struct lu_env *env,struct cl_req *req, -struct cl_req_attr *attr,u64 flags); +void cl_req_page_add (const struct lu_env *env,struct cl_req *req, +struct cl_page *page); +void cl_req_page_done (const struct lu_env *env,struct cl_page *page); +int cl_req_prep (const struct lu_env *env,struct cl_req *req); +void cl_req_attr_set (const struct lu_env *env,struct cl_req *req, +struct cl_req_attr *attr,u64 flags);void cl_req_completion (const struct lu_env *env,struct cl_req *req,int ioret);/** \defgroup cl_sync_io cl_sync_io -* @{ */ +* @{ +*/ /** * Anchor for synchronous transfer. This is allocated on a stack by thread
@@ -3242,15 +3232,15 @@ struct cl_env_nest {void *cen_cookie; }; -struct lu_env *cl_env_get (int *refcheck); -struct lu_env *cl_env_alloc (int *refcheck,__u32 tags); -struct lu_env *cl_env_nested_get (struct cl_env_nest *nest); -void cl_env_put (struct lu_env *env,int *refcheck); -void cl_env_nested_put (struct cl_env_nest *nest,struct lu_env *env); -void *cl_env_reenter (void ); -void cl_env_reexit (void *cookie); -void cl_env_implant (struct lu_env *env,int *refcheck); -void cl_env_unplant (struct lu_env *env,int *refcheck); +struct lu_env *cl_env_get (int *refcheck); +struct lu_env *cl_env_alloc (int *refcheck,__u32 tags); +struct lu_env *cl_env_nested_get (struct cl_env_nest *nest); +void cl_env_put (struct lu_env *env,int *refcheck); +void cl_env_nested_put (struct cl_env_nest *nest,struct lu_env *env); +void *cl_env_reenter (void ); +void cl_env_reexit (void *cookie); +void cl_env_implant (struct lu_env *env,int *refcheck); +void cl_env_unplant (struct lu_env *env,int *refcheck);/** @} cl_env */
drivers/staging/lustre/lustre/include/lprocfs_status.h +2 -4
@@ -427,8 +427,7 @@ static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats, int opc,case LPROCFS_GET_SMP_ID :if (stats->ls_flags &LPROCFS_STATS_FLAG_NOPERCPU ) {if (stats->ls_flags &LPROCFS_STATS_FLAG_IRQ_SAFE ) { -spin_unlock_irqrestore (&stats->ls_lock, - *flags); +spin_unlock_irqrestore (&stats->ls_lock, *flags); }else {spin_unlock (&stats->ls_lock); }
@@ -440,8 +439,7 @@ static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats, int opc,case LPROCFS_GET_NUM_CPU :if (stats->ls_flags &LPROCFS_STATS_FLAG_NOPERCPU ) {if (stats->ls_flags &LPROCFS_STATS_FLAG_IRQ_SAFE ) { -spin_unlock_irqrestore (&stats->ls_lock, - *flags); +spin_unlock_irqrestore (&stats->ls_lock, *flags); }else {spin_unlock (&stats->ls_lock); }
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +4 -6
@@ -638,15 +638,13 @@ static inline void ostid_set_id(struct ost_id *oi, __u64 oid) {if (fid_seq_is_mdt0 (ostid_seq (oi))) {if (oid >=IDIF_MAX_OID ) { -CERROR ("Bad %llu to set " DOSTID "\n" , - oid,POSTID (oi)); +CERROR ("Bad %llu to set " DOSTID "\n" , oid,POSTID (oi));return ; } oi->oi.oi_id = oid; }else {if (oid >OBIF_MAX_OID ) { -CERROR ("Bad %llu to set " DOSTID "\n" , - oid,POSTID (oi)); +CERROR ("Bad %llu to set " DOSTID "\n" , oid,POSTID (oi));return ; } oi->oi_fid.f_oid = oid;
@@ -716,8 +714,8 @@ static inline int ostid_to_fid(struct lu_fid *fid, struct ost_id *ostid,* pass the FID through, no conversion needed. */ if (ostid->oi_fid.f_ver !=0 ) { -CERROR ("bad MDT0 id, " DOSTID " ost_idx:%u\n" , -POSTID (ostid), ost_idx); +CERROR ("bad MDT0 id, " DOSTID " ost_idx:%u\n" , +POSTID (ostid), ost_idx);return -EBADF ; } *fid = ostid->oi_fid;
drivers/staging/lustre/lustre/include/lustre_fid.h +1 -1
@@ -435,7 +435,7 @@ fid_extract_from_res_name(struct lu_fid *fid, const struct ldlm_res_id *res)*/ static inline struct ldlm_res_id *fid_build_quota_res_name (const struct lu_fid *glb_fid,union lquota_id *qid, -struct ldlm_res_id *res) +struct ldlm_res_id *res) {fid_build_reg_res_name (glb_fid, res); res->name[LUSTRE_RES_ID_QUOTA_SEQ_OFF ] =fid_seq (&qid->qid_fid);
drivers/staging/lustre/lustre/include/lustre_net.h +9 -10
@@ -2382,14 +2382,14 @@ void ptlrpc_at_set_req_timeout(struct ptlrpc_request *req);struct ptlrpc_request *ptlrpc_request_alloc (struct obd_import *imp,const struct req_format *format);struct ptlrpc_request *ptlrpc_request_alloc_pool (struct obd_import *imp, -struct ptlrpc_request_pool *, -const struct req_format *format); +struct ptlrpc_request_pool *, +const struct req_format *);void ptlrpc_request_free (struct ptlrpc_request *request);int ptlrpc_request_pack (struct ptlrpc_request *request,__u32 version,int opcode); -struct ptlrpc_request *ptlrpc_request_alloc_pack (struct obd_import *imp, -const struct req_format *format, -__u32 version,int opcode); +struct ptlrpc_request *ptlrpc_request_alloc_pack (struct obd_import *, +const struct req_format *, +__u32 ,int );int ptlrpc_request_bufs_pack (struct ptlrpc_request *request,__u32 version,int opcode,char **bufs,struct ptlrpc_cli_ctx *ctx);
@@ -2509,10 +2509,9 @@ struct ptlrpc_service_conf {*/ void ptlrpc_dispatch_difficult_reply (struct ptlrpc_reply_state *rs);void ptlrpc_schedule_difficult_reply (struct ptlrpc_reply_state *rs); -struct ptlrpc_service *ptlrpc_register_service ( -struct ptlrpc_service_conf *conf, -struct kset *parent, -struct dentry *debugfs_entry); +struct ptlrpc_service *ptlrpc_register_service (struct ptlrpc_service_conf *conf, +struct kset *parent, +struct dentry *debugfs_entry);int ptlrpc_start_threads (struct ptlrpc_service *svc);int ptlrpc_unregister_service (struct ptlrpc_service *service);
@@ -2545,7 +2544,7 @@ int ptlrpc_reconnect_import(struct obd_import *imp);int ptlrpc_buf_need_swab (struct ptlrpc_request *req,const int inout,int index);void ptlrpc_buf_set_swabbed (struct ptlrpc_request *req,const int inout, -int index); +int index);int ptlrpc_unpack_rep_msg (struct ptlrpc_request *req,int len);int ptlrpc_unpack_req_msg (struct ptlrpc_request *req,int len);
drivers/staging/lustre/lustre/include/lustre_req_layout.h +2 -2
@@ -107,8 +107,8 @@ void req_capsule_set_size(struct req_capsule *pill,const struct req_msg_field *field, enum req_location loc, int size);int req_capsule_get_size (const struct req_capsule *pill, -const struct req_msg_field *field, -enum req_location loc); +const struct req_msg_field *field, +enum req_location loc);int req_capsule_msg_size (struct req_capsule *pill,enum req_location loc);int req_capsule_fmt_size (__u32 magic,const struct req_format *fmt,enum req_location loc);
drivers/staging/lustre/lustre/include/lustre_sec.h +53 -75
321 lines not on this page · raw message
drivers/staging/lustre/lustre/include/obd.h +3 -3
@@ -937,7 +937,7 @@ struct md_enqueue_info {struct lustre_handle mi_lockh;struct inode *mi_dir;int (*mi_cb)(struct ptlrpc_request *req, -struct md_enqueue_info *minfo,int rc); +struct md_enqueue_info *minfo,int rc);__u64 mi_cbdata;unsigned int mi_generation; };
@@ -1206,9 +1206,9 @@ struct lsm_operations {void (*lsm_stripe_by_offset)(struct lov_stripe_md *,int *,u64 *,u64 *);int (*lsm_lmm_verify)(struct lov_mds_md *lmm,int lmm_bytes, -__u16 *stripe_count); +__u16 *stripe_count);int (*lsm_unpackmd)(struct lov_obd *lov,struct lov_stripe_md *lsm, -struct lov_mds_md *lmm); +struct lov_mds_md *lmm); };extern const struct lsm_operations lsm_v1_ops;
drivers/staging/lustre/lustre/include/obd_class.h +7 -7
@@ -87,10 +87,10 @@ int class_name2dev(const char *name);struct obd_device *class_name2obd (const char *name);int class_uuid2dev (struct obd_uuid *uuid);struct obd_device *class_find_client_obd (struct obd_uuid *tgt_uuid, -const char *typ_name, -struct obd_uuid *grp_uuid); +const char *typ_name, +struct obd_uuid *grp_uuid);struct obd_device *class_devices_in_group (struct obd_uuid *grp_uuid, -int *next); +int *next);struct obd_device *class_num2obd (int num);int class_notify_sptlrpc_conf (const char *fsname,int namelen);
@@ -198,7 +198,7 @@ extern void (*class_export_dump_hook)(struct obd_export *);struct obd_export *class_export_get (struct obd_export *exp);void class_export_put (struct obd_export *exp);struct obd_export *class_new_export (struct obd_device *obddev, -struct obd_uuid *cluuid); +struct obd_uuid *cluuid);void class_unlink_export (struct obd_export *exp);struct obd_import *class_import_get (struct obd_import *);
@@ -208,7 +208,7 @@ void class_destroy_import(struct obd_import *exp);void class_put_type (struct obd_type *type);int class_connect (struct lustre_handle *conn,struct obd_device *obd, -struct obd_uuid *cluuid); +struct obd_uuid *cluuid);int class_disconnect (struct obd_export *exp);void class_fail_export (struct obd_export *exp);int class_manual_cleanup (struct obd_device *obd);
@@ -1351,7 +1351,7 @@ static inline int md_getattr(struct obd_export *exp, struct md_op_data *op_data, }static inline int md_null_inode (struct obd_export *exp, -const struct lu_fid *fid) +const struct lu_fid *fid) {int rc;
@@ -1734,7 +1734,7 @@ void class_uuid_unparse(class_uuid_t in, struct obd_uuid *out);/* lustre_peer.c */ int lustre_uuid_to_peer (const char *uuid,lnet_nid_t *peer_nid,int index);int class_add_uuid (const char *uuid,__u64 nid); -int class_del_uuid (const char *uuid); +int class_del_uuid (const char *uuid);int class_check_uuid (struct obd_uuid *uuid,__u64 nid);void class_init_uuidlist (void );void class_exit_uuidlist (void );
Signature · 1 line
2.1.0
PATCH 3/25 staging/lustre/fld: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/fld/fld_cache.c | 14 +++++++------- drivers/staging/lustre/lustre/fld/fld_request.c | 17 +++++++---------- drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 +-- 3 files changed, 15 insertions(+), 19 deletions(-)
drivers/staging/lustre/lustre/fld/fld_cache.c +7 -7
@@ -233,7 +233,7 @@ static int fld_cache_shrink(struct fld_cache *cache) }CDEBUG (D_INFO ,"%s: FLD cache - Shrunk by %d entries\n" , - cache->fci_name, num); + cache->fci_name, num);return 0 ; }
@@ -294,8 +294,8 @@ static void fld_cache_punch_hole(struct fld_cache *cache,* handle range overlap in fld cache. */ static void fld_cache_overlap_handle (struct fld_cache *cache, -struct fld_cache_entry *f_curr, -struct fld_cache_entry *f_new) +struct fld_cache_entry *f_curr, +struct fld_cache_entry *f_new) {const struct lu_seq_range *range = &f_new->fce_range;const u64 new_start = range->lsr_start;
@@ -402,8 +402,8 @@ static int fld_cache_insert_nolock(struct fld_cache *cache,list_for_each_entry_safe (f_curr, n, head, fce_list) {/* add list if next is end of list */ if (new_end < f_curr->fce_range.lsr_start || - (new_end == f_curr->fce_range.lsr_start && - new_flags != f_curr->fce_range.lsr_flags)) + (new_end == f_curr->fce_range.lsr_start && + new_flags != f_curr->fce_range.lsr_flags))break ; prev = &f_curr->fce_list;
@@ -460,8 +460,8 @@ struct fld_cache_entry head = &cache->fci_entries_head;list_for_each_entry (flde, head, fce_list) {if (range->lsr_start == flde->fce_range.lsr_start || - (range->lsr_end == flde->fce_range.lsr_end && - range->lsr_flags == flde->fce_range.lsr_flags)) { + (range->lsr_end == flde->fce_range.lsr_end && + range->lsr_flags == flde->fce_range.lsr_flags)) { got = flde;break ; }
drivers/staging/lustre/lustre/fld/fld_request.c +7 -10
@@ -148,7 +148,7 @@ again: }CERROR ("%s: Can't find target by hash %d (seq %#llx). Targets (%d):\n" , - fld->lcf_name, hash, seq, fld->lcf_count); + fld->lcf_name, hash, seq, fld->lcf_count);list_for_each_entry (target, &fld->lcf_targets, ft_chain) { const char *srv_name = target->ft_srv ?
@@ -217,11 +217,11 @@ int fld_client_add_target(struct lu_client_fld *fld,if (fld->lcf_flags !=LUSTRE_FLD_INIT ) {CERROR ("%s: Attempt to add target %s (idx %llu) on fly - skip it\n" , - fld->lcf_name, name, tar->ft_idx); + fld->lcf_name, name, tar->ft_idx);return 0 ; }CDEBUG (D_INFO ,"%s: Adding target %s (idx %llu)\n" , - fld->lcf_name, name, tar->ft_idx); + fld->lcf_name, name, tar->ft_idx); target =kzalloc (sizeof (*target),GFP_NOFS );if (!target)
@@ -244,8 +244,7 @@ int fld_client_add_target(struct lu_client_fld *fld, target->ft_srv = tar->ft_srv; target->ft_idx = tar->ft_idx; -list_add_tail (&target->ft_chain, - &fld->lcf_targets); +list_add_tail (&target->ft_chain, &fld->lcf_targets); fld->lcf_count++;spin_unlock (&fld->lcf_lock);
@@ -260,8 +259,7 @@ int fld_client_del_target(struct lu_client_fld *fld, __u64 idx)struct lu_fld_target *target, *tmp;spin_lock (&fld->lcf_lock); -list_for_each_entry_safe (target, tmp, - &fld->lcf_targets, ft_chain) { +list_for_each_entry_safe (target, tmp, &fld->lcf_targets, ft_chain) {if (target->ft_idx == idx) { fld->lcf_count--;list_del (&target->ft_chain);
@@ -376,8 +374,7 @@ void fld_client_fini(struct lu_client_fld *fld)struct lu_fld_target *target, *tmp;spin_lock (&fld->lcf_lock); -list_for_each_entry_safe (target, tmp, - &fld->lcf_targets, ft_chain) { +list_for_each_entry_safe (target, tmp, &fld->lcf_targets, ft_chain) { fld->lcf_count--;list_del (&target->ft_chain);if (target->ft_exp)
@@ -467,7 +464,7 @@ int fld_client_lookup(struct lu_client_fld *fld, u64 seq, u32 *mds,LASSERT (target);CDEBUG (D_INFO ,"%s: Lookup fld entry (seq: %#llx) on target %s (idx %llu)\n" , - fld->lcf_name, seq,fld_target_name (target), target->ft_idx); + fld->lcf_name, seq,fld_target_name (target), target->ft_idx); res.lsr_start = seq;fld_range_set_type (&res, flags);
drivers/staging/lustre/lustre/fld/lproc_fld.c +1 -2
@@ -61,8 +61,7 @@ fld_debugfs_targets_seq_show(struct seq_file *m, void *unused)struct lu_fld_target *target;spin_lock (&fld->lcf_lock); -list_for_each_entry (target, - &fld->lcf_targets, ft_chain) +list_for_each_entry (target, &fld->lcf_targets, ft_chain)seq_printf (m,"%s\n" ,fld_target_name (target));spin_unlock (&fld->lcf_lock);
Signature · 1 line
2.1.0
PATCH 4/25 staging/lustre: Remove unused liblustre_check_services prototype
In reply to [email protected]From: Oleg Drokin <[email protected]>
liblustre_check_services is no longer present in the tree.
--- drivers/staging/lustre/lustre/include/lustre_net.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/lustre/lustre/include/lustre_net.h +0 -1
@@ -2515,7 +2515,6 @@ struct ptlrpc_service *ptlrpc_register_service(struct ptlrpc_service_conf *conf,int ptlrpc_start_threads (struct ptlrpc_service *svc);int ptlrpc_unregister_service (struct ptlrpc_service *service); -int liblustre_check_services (void *arg);int ptlrpc_hr_init (void );void ptlrpc_hr_fini (void );
Signature · 1 line
2.1.0
PATCH 5/25 staging/lustre: Remove unused lustre_build_lock_params()
In reply to [email protected]From: Oleg Drokin <[email protected]>
And also struct lustre_rw_params that is only referenced by it.
--- .../staging/lustre/lustre/include/lustre_lite.h | 48 ---------------------- 1 file changed, 48 deletions(-)
drivers/staging/lustre/lustre/include/lustre_lite.h +0 -48
@@ -53,54 +53,6 @@#define LL_MAX_BLKSIZE_BITS (22)#define LL_MAX_BLKSIZE (1UL<<LL_MAX_BLKSIZE_BITS) -#include "lustre/lustre_user.h" - -struct lustre_rw_params { -int lrp_lock_mode; -ldlm_policy_data_t lrp_policy; -u32 lrp_brw_flags; -int lrp_ast_flags; -}; - -/* -* XXX nikita: this function lives in the header because it is used by both -* llite kernel module and liblustre library, and there is no (?) better place -* to put it in. -*/ -static inline void lustre_build_lock_params (int cmd,unsigned long open_flags, -__u64 connect_flags, -loff_t pos,ssize_t len, -struct lustre_rw_params *params) -{ - params->lrp_lock_mode = (cmd ==OBD_BRW_READ ) ?LCK_PR :LCK_PW ; - params->lrp_brw_flags =0 ; - - params->lrp_policy.l_extent.start = pos; - params->lrp_policy.l_extent.end = pos + len -1 ; -/* -* for now O_APPEND always takes local locks. -*/ -if (cmd ==OBD_BRW_WRITE && (open_flags &O_APPEND )) { - params->lrp_policy.l_extent.start =0 ; - params->lrp_policy.l_extent.end =OBD_OBJECT_EOF ; - }else if (LIBLUSTRE_CLIENT && (connect_flags &OBD_CONNECT_SRVLOCK )) { -/* -* liblustre: OST-side locking for all non-O_APPEND -* reads/writes. -*/ - params->lrp_lock_mode =LCK_NL ; - params->lrp_brw_flags =OBD_BRW_SRVLOCK ; - }else { -/* -* nothing special for the kernel. In the future llite may use -* OST-side locks for small writes into highly contended -* files. -*/ - } - params->lrp_ast_flags = (open_flags &O_NONBLOCK ) ? -LDLM_FL_BLOCK_NOWAIT :0 ; -} -/* * This is embedded into liblustre and llite super-blocks to keep track of * connect flags (capabilities) supported by all imports given mount is
Signature · 1 line
2.1.0
PATCH 6/25 staging/lustre: Convert ptlrpc_at_check_timed to void
In reply to [email protected]From: Oleg Drokin <[email protected]>
The only caller was not looking at the return value,
and liblustre, that cared about it is not part of the kernel client.
--- drivers/staging/lustre/lustre/ptlrpc/service.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/ptlrpc/service.c +4 -6
@@ -1137,7 +1137,7 @@ out_free:/* Send early replies to everybody expiring within at_early_margin * asking for at_extra time */ -static int ptlrpc_at_check_timed (struct ptlrpc_service_part *svcpt) +static void ptlrpc_at_check_timed (struct ptlrpc_service_part *svcpt) {struct ptlrpc_at_array *array = &svcpt->scp_at_array;struct ptlrpc_request *rq, *n;
@@ -1151,14 +1151,14 @@ static int ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)spin_lock (&svcpt->scp_at_lock);if (svcpt->scp_at_check ==0 ) {spin_unlock (&svcpt->scp_at_lock); -return 0 ; +return ; } delay =cfs_time_sub (cfs_time_current (), svcpt->scp_at_checktime); svcpt->scp_at_check =0 ;if (array->paa_count ==0 ) {spin_unlock (&svcpt->scp_at_lock); -return 0 ; +return ; }/* The timer went off, but maybe the nearest rpc already completed. */
@@ -1167,7 +1167,7 @@ static int ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)/* We've still got plenty of time. Reset the timer. */ ptlrpc_at_set_timer (svcpt);spin_unlock (&svcpt->scp_at_lock); -return 0 ; +return ; }/* We're close to a timeout, and we don't know how much longer the
@@ -1237,8 +1237,6 @@ static int ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)ptlrpc_server_drop_request (rq); } - -return 1 ;/* return "did_something" for liblustre */ }/**
Signature · 1 line
2.1.0
PATCH 7/25 staging/lustre: Remove misleading liblustre comments.
In reply to [email protected]From: Oleg Drokin <[email protected]>
These two comments certainly refer to some ifdefed code that is no longer present, so remove them too.
--- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/lustre/lustre/lov/lov_pool.c +0 -2
@@ -152,7 +152,6 @@ struct cfs_hash_ops pool_hash_operations = { }; -/* ifdef needed for liblustre support */ /* * pool debugfs seq_file methods */
@@ -432,7 +431,6 @@ int lov_pool_new(struct obd_device *obd, char *poolname)INIT_HLIST_NODE (&new_pool->pool_hash); -/* we need this assert seq_file is not implemented for liblustre */ /* get ref for debugfs file */ lov_pool_getref (new_pool); new_pool->pool_debugfs_entry = ldebugfs_add_simple(
Signature · 1 line
2.1.0
PATCH 8/25 staging/lustre: Remove liblustre references from explanations
In reply to [email protected]From: Oleg Drokin <[email protected]>
Since liblustre is no longer with us, referencing to it in the explanations only makes things less clear
--- drivers/staging/lustre/lustre/include/cl_object.h | 4 ++-- drivers/staging/lustre/lustre/include/lustre_lite.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 1 - drivers/staging/lustre/lustre/osc/osc_lock.c | 3 +-- 5 files changed, 5 insertions(+), 7 deletions(-)
drivers/staging/lustre/lustre/include/cl_object.h +2 -2
@@ -697,7 +697,7 @@ enum cl_page_type {/** Transient page, the transient cl_page is used to bind a cl_page * to vmpage which is not belonging to the same object of cl_page. -* it is used in DirectIO, lockless IO and liblustre. +* it is used in DirectIO and lockless IO. */ CPT_TRANSIENT, };
@@ -2282,7 +2282,7 @@ enum cl_io_lock_dmd {CILR_MANDATORY =0 ,/** Layers are free to decide between local and global locking. */ CILR_MAYBE , -/** Never lock: there is no cache (e.g., liblustre). */ +/** Never lock: there is no cache (e.g., lockless IO). */ CILR_NEVER };
drivers/staging/lustre/lustre/include/lustre_lite.h +1 -1
@@ -54,7 +54,7 @@#define LL_MAX_BLKSIZE (1UL<<LL_MAX_BLKSIZE_BITS)/* -* This is embedded into liblustre and llite super-blocks to keep track of +* This is embedded into llite super-blocks to keep track of * connect flags (capabilities) supported by all imports given mount is * connected to. */
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -658,7 +658,7 @@ enum obd_notify_event {/* * Data structure used to pass obd_notify()-event to non-obd listeners (llite -* and liblustre being main examples). +* being main example). */ struct obd_notify_upcall { int (*onu_upcall)(struct obd_device *host, struct obd_device *watched,
drivers/staging/lustre/lustre/obdclass/cl_object.c +0 -1
@@ -483,7 +483,6 @@ EXPORT_SYMBOL(cl_site_stats_print);* because Lustre code may call into other fs which has certain assumptions * about journal_info. Currently following fields in task_struct are identified * can be used for this purpose: -* - cl_env: for liblustre. * - tux_info: only on RedHat kernel. * - ... * \note As long as we use task_struct to store cl_env, we assume that once
drivers/staging/lustre/lustre/osc/osc_lock.c +1 -2
@@ -223,8 +223,7 @@ static int osc_lock_unuse(const struct lu_env *env,/* * Move lock into OLS_RELEASED state before calling * osc_cancel_base() so that possible synchronous cancellation -* (that always happens e.g., for liblustre) sees that lock is -* released. +* sees that lock is released. */ ols->ols_state =OLS_RELEASED ;return osc_lock_unhold (ols);
Signature · 1 line
2.1.0
PATCH 9/25 staging/lustre/lmv: Remove commented out MDS selection policies
In reply to [email protected]From: Oleg Drokin <[email protected]>
The new DNE code does not use them either so they are not longer needed.
--- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 45 ----------------------------- 1 file changed, 45 deletions(-)
drivers/staging/lustre/lustre/lmv/lmv_obd.c +0 -45
@@ -1133,51 +1133,6 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,return rc; } -#if 0 -static int lmv_all_chars_policy (int count,const char *name, -int len) -{ -unsigned int c =0 ; - -while (len >0 ) - c += name[--len]; - c = c % count; -return c; -} - -static int lmv_nid_policy (struct lmv_obd *lmv) -{ -struct obd_import *imp; -__u32 id; - -/* -* XXX: To get nid we assume that underlying obd device is mdc. -*/ - imp =class_exp2cliimp (lmv->tgts[0 ].ltd_exp); - id = imp->imp_connection->c_self ^ (imp->imp_connection->c_self >>32 ); -return id % lmv->desc.ld_tgt_count; -} - -static int lmv_choose_mds (struct lmv_obd *lmv,struct md_op_data *op_data, -enum placement_policy placement) -{ -switch (placement) { -case PLACEMENT_CHAR_POLICY : -return lmv_all_chars_policy (lmv->desc.ld_tgt_count, - op_data->op_name, - op_data->op_namelen); -case PLACEMENT_NID_POLICY : -return lmv_nid_policy (lmv); - -default : -break ; - } - -CERROR ("Unsupported placement policy %x\n" , placement); -return -EINVAL ; -} -#endif -/** * This is _inode_ placement policy function (not name). */
Signature · 1 line
2.1.0
PATCH 10/25 staging/lustre: F_SETLKW64 F_SETLK64 F_GETLK64 are always defined
In reply to [email protected]From: Oleg Drokin <[email protected]>
Remove the ifdefs for the around usage.
--- drivers/staging/lustre/lustre/llite/file.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +0 -6
@@ -2746,21 +2746,15 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)switch (cmd) {case F_SETLKW : -#ifdef F_SETLKW64 case F_SETLKW64 : -#endif flags =0 ;break ;case F_SETLK : -#ifdef F_SETLK64 case F_SETLK64 : -#endif flags =LDLM_FL_BLOCK_NOWAIT ;break ;case F_GETLK : -#ifdef F_GETLK64 case F_GETLK64 : -#endif flags =LDLM_FL_TEST_LOCK ;/* Save the old mode so that if the mode in the lock changes we * can decrement the appropriate reader or writer refcount.
Signature · 1 line
2.1.0
PATCH 11/25 staging/lustre: MS_POSIXACL is always defined, don't check for it
In reply to [email protected]From: Oleg Drokin <[email protected]>
--- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/lustre/lustre/llite/llite_lib.c +0 -4
@@ -309,15 +309,11 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, }if (data->ocd_connect_flags &OBD_CONNECT_ACL ) { -#ifdef MS_POSIXACL sb->s_flags |=MS_POSIXACL ; -#endif sbi->ll_flags |=LL_SBI_ACL ; }else {LCONSOLE_INFO ("client wants to enable acl, but mdt not!\n" ); -#ifdef MS_POSIXACL sb->s_flags &= ~MS_POSIXACL ; -#endif sbi->ll_flags &= ~LL_SBI_ACL ; }
Signature · 1 line
2.1.0
PATCH 12/25 staging/lustre: Remove RELEASEPAGE_ARG_TYPE compat macro
In reply to [email protected]From: Oleg Drokin <[email protected]>
Not used in the kernel proper.
--- drivers/staging/lustre/lustre/llite/rw26.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/staging/lustre/lustre/llite/rw26.c +1 -6
@@ -109,12 +109,7 @@ static void ll_invalidatepage(struct page *vmpage, unsigned int offset, } } -#ifdef HAVE_RELEASEPAGE_WITH_INT -#define RELEASEPAGE_ARG_TYPE int -#else -#define RELEASEPAGE_ARG_TYPE gfp_t -#endif -static int ll_releasepage (struct page *vmpage,RELEASEPAGE_ARG_TYPE gfp_mask) +static int ll_releasepage (struct page *vmpage,gfp_t gfp_mask) {struct cl_env_nest nest;struct lu_env *env;
Signature · 1 line
2.1.0
PATCH 13/25 staging/lustre: NEED_QUOTA_DEFS is never defined, drop it.
In reply to [email protected]From: Oleg Drokin <[email protected]>
--- .../staging/lustre/lustre/include/lustre/lustre_user.h | 16 ---------------- 1 file changed, 16 deletions(-)
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +0 -16
@@ -552,22 +552,6 @@ enum { RMT_RGETFACL = 4 }; -#ifdef NEED_QUOTA_DEFS -#ifndef QIF_BLIMITS -#define QIF_BLIMITS 1 -#define QIF_SPACE 2 -#define QIF_ILIMITS 4 -#define QIF_INODES 8 -#define QIF_BTIME 16 -#define QIF_ITIME 32 -#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) -#define QIF_USAGE (QIF_SPACE | QIF_INODES) -#define QIF_TIMES (QIF_BTIME | QIF_ITIME) -#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES) -#endif - -#endif /* !__KERNEL__ */ -/* lustre volatile file support * file name header: .^L^S^T^R:volatile" */
Signature · 1 line
2.1.0
PATCH 14/25 staging/lustre/ptlrpc: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/ptlrpc/client.c | 40 +++++------- drivers/staging/lustre/lustre/ptlrpc/import.c | 21 +++---- drivers/staging/lustre/lustre/ptlrpc/layout.c | 35 +++++------ .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 15 +++-- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/nrs.c | 19 +++--- drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c | 2 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 9 ++- drivers/staging/lustre/lustre/ptlrpc/recover.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 73 ++++++++++------------ 15 files changed, 111 insertions(+), 134 deletions(-)
drivers/staging/lustre/lustre/ptlrpc/client.c +16 -24
@@ -557,7 +557,7 @@ ptlrpc_prep_req_from_pool(struct ptlrpc_request_pool *pool) } request = list_entry(pool->prp_req_list.next, struct ptlrpc_request, - rq_list); + rq_list);list_del_init (&request->rq_list);spin_unlock (&pool->prp_lock);
@@ -725,7 +725,7 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp,LASSERTF ((unsigned long )imp >0x1000 ,"%p" , imp);LASSERT (imp !=LP_POISON );LASSERTF ((unsigned long )imp->imp_client >0x1000 ,"%p" , - imp->imp_client); + imp->imp_client);LASSERT (imp->imp_client !=LP_POISON ); request->rq_import =class_import_get (imp);
@@ -896,8 +896,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set) RQ_PHASE_COMPLETE :RQ_PHASE_NEW ;list_for_each (tmp, &set->set_requests) {struct ptlrpc_request *req = - list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + list_entry(tmp, struct ptlrpc_request, rq_set_chain);LASSERT (req->rq_phase == expected_phase); n++;
@@ -909,8 +908,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set)list_for_each_safe (tmp, next, &set->set_requests) {struct ptlrpc_request *req = - list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + list_entry(tmp, struct ptlrpc_request, rq_set_chain);list_del_init (&req->rq_set_chain);LASSERT (req->rq_phase == expected_phase);
@@ -1331,8 +1329,8 @@ static int after_reply(struct ptlrpc_request *req)struct ptlrpc_request *last; last =list_entry (imp->imp_replay_list.prev, - struct ptlrpc_request, - rq_replay_list); + struct ptlrpc_request, + rq_replay_list);/* * Requests with rq_replay stay on the list even if no * commit is expected.
@@ -1475,8 +1473,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)INIT_LIST_HEAD (&comp_reqs);list_for_each_safe (tmp, next, &set->set_requests) {struct ptlrpc_request *req = - list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + list_entry(tmp, struct ptlrpc_request, rq_set_chain);struct obd_import *imp = req->rq_import;int unregistered =0 ;int rc =0 ;
@@ -1618,8 +1615,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)*/ list_del_init (&req->rq_list);list_add_tail (&req->rq_list, - &imp-> - imp_delayed_list); + &imp->imp_delayed_list);spin_unlock (&imp->imp_lock);continue ; }
@@ -1627,7 +1623,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)if (status !=0 ) { req->rq_status = status;ptlrpc_rqphase_move (req, -RQ_PHASE_INTERPRET ); +RQ_PHASE_INTERPRET );spin_unlock (&imp->imp_lock); goto interpret; }
@@ -1642,7 +1638,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)list_del_init (&req->rq_list);list_add_tail (&req->rq_list, - &imp->imp_sending_list); + &imp->imp_sending_list);spin_unlock (&imp->imp_lock);
@@ -1944,8 +1940,7 @@ int ptlrpc_expired_set(void *data)/* A timeout expired. See which reqs it applies to... */ list_for_each (tmp, &set->set_requests) {struct ptlrpc_request *req = - list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + list_entry(tmp, struct ptlrpc_request, rq_set_chain);/* don't expire request waiting for context */ if (req->rq_wait_ctx)
@@ -2001,8 +1996,7 @@ void ptlrpc_interrupted_set(void *data)list_for_each (tmp, &set->set_requests) {struct ptlrpc_request *req = - list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + list_entry(tmp, struct ptlrpc_request, rq_set_chain);if (req->rq_phase !=RQ_PHASE_RPC && req->rq_phase !=RQ_PHASE_UNREGISTERING )
@@ -2075,7 +2069,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set)else list_for_each (tmp, &set->set_requests) { req = list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + rq_set_chain);if (req->rq_phase ==RQ_PHASE_NEW ) (void )ptlrpc_send_new_req (req); }
@@ -2149,7 +2143,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set)if (rc ==0 &&atomic_read (&set->set_remaining) ==0 ) {list_for_each (tmp, &set->set_requests) { req = list_entry(tmp, struct ptlrpc_request, - rq_set_chain); + rq_set_chain);spin_lock (&req->rq_lock); req->rq_invalid_rqset =1 ;spin_unlock (&req->rq_lock);
@@ -2568,8 +2562,7 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,ptlrpc_request_addref (req);list_for_each_prev (tmp, &imp->imp_replay_list) {struct ptlrpc_request *iter = - list_entry(tmp, struct ptlrpc_request, - rq_replay_list); + list_entry(tmp, struct ptlrpc_request, rq_replay_list);/* * We may have duplicate transnos if we create and then
@@ -2842,8 +2835,7 @@ void ptlrpc_abort_set(struct ptlrpc_request_set *set)list_for_each_safe (pos, tmp, &set->set_requests) {struct ptlrpc_request *req = - list_entry(pos, struct ptlrpc_request, - rq_set_chain); + list_entry(pos, struct ptlrpc_request, rq_set_chain);spin_lock (&req->rq_lock);if (req->rq_phase !=RQ_PHASE_RPC ) {
drivers/staging/lustre/lustre/ptlrpc/import.c +10 -11
@@ -140,7 +140,7 @@ static void deuuidify(char *uuid, const char *prefix, char **uuid_start,return ;if (!strncmp (*uuid_start + *uuid_len -strlen (UUID_STR ), -UUID_STR ,strlen (UUID_STR ))) +UUID_STR ,strlen (UUID_STR ))) *uuid_len -=strlen (UUID_STR ); }
@@ -344,18 +344,18 @@ void ptlrpc_invalidate_import(struct obd_import *imp) rc =0 ; }else {list_for_each_safe (tmp, n, - &imp->imp_sending_list) { + &imp->imp_sending_list) { req =list_entry (tmp, - struct ptlrpc_request, - rq_list); + struct ptlrpc_request, + rq_list);DEBUG_REQ (D_ERROR , req,"still on sending list" ); }list_for_each_safe (tmp, n, - &imp->imp_delayed_list) { + &imp->imp_delayed_list) { req =list_entry (tmp, - struct ptlrpc_request, - rq_list); + struct ptlrpc_request, + rq_list);DEBUG_REQ (D_ERROR , req,"still on delayed list" ); }
@@ -511,7 +511,7 @@ static int import_select_connection(struct obd_import *imp)*/ if ((conn->oic_last_attempt ==0 ) ||cfs_time_beforeq_64 (conn->oic_last_attempt, - imp->imp_last_success_conn)) { + imp->imp_last_success_conn)) { imp_conn = conn; tried_all =0 ;break ;
@@ -1032,8 +1032,7 @@ finish: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_add (&imp->imp_conn_current->oic_item, &imp->imp_conn_list); imp->imp_last_success_conn = imp->imp_conn_current->oic_last_attempt;
@@ -1366,7 +1365,7 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp)*/ class_import_get (imp); task =kthread_run (ptlrpc_invalidate_import_thread, imp, -"ll_imp_inval" ); +"ll_imp_inval" );if (IS_ERR (task)) {class_import_put (imp);CERROR ("error starting invalidate thread: %d\n" , rc);
drivers/staging/lustre/lustre/ptlrpc/layout.c +17 -18
@@ -890,12 +890,12 @@ EXPORT_SYMBOL(RMF_SYMTGT);struct req_msg_field RMF_TGTUUID =DEFINE_MSGF ("tgtuuid" ,RMF_F_STRING ,sizeof (struct obd_uuid ) -1 ,NULL , -NULL ); +NULL );EXPORT_SYMBOL (RMF_TGTUUID );struct req_msg_field RMF_CLUUID =DEFINE_MSGF ("cluuid" ,RMF_F_STRING ,sizeof (struct obd_uuid ) -1 ,NULL , -NULL ); +NULL );EXPORT_SYMBOL (RMF_CLUUID ); struct req_msg_field RMF_STRING =
@@ -1030,7 +1030,7 @@ EXPORT_SYMBOL(RMF_RCS);struct req_msg_field RMF_EAVALS_LENS =DEFINE_MSGF ("eavals_lens" ,RMF_F_STRUCT_ARRAY ,sizeof (__u32), - lustre_swab_generic_32s,NULL ); + lustre_swab_generic_32s,NULL );EXPORT_SYMBOL (RMF_EAVALS_LENS ); struct req_msg_field RMF_OBD_ID =
@@ -1141,17 +1141,17 @@ EXPORT_SYMBOL(RQF_SEC_CTX);struct req_format RQF_MGS_TARGET_REG =DEFINE_REQ_FMT0 ("MGS_TARGET_REG" , mgs_target_info_only, - mgs_target_info_only); + mgs_target_info_only);EXPORT_SYMBOL (RQF_MGS_TARGET_REG );struct req_format RQF_MGS_SET_INFO =DEFINE_REQ_FMT0 ("MGS_SET_INFO" , mgs_set_info, - mgs_set_info); + mgs_set_info);EXPORT_SYMBOL (RQF_MGS_SET_INFO );struct req_format RQF_MGS_CONFIG_READ =DEFINE_REQ_FMT0 ("MGS_CONFIG_READ" , mgs_config_read_client, - mgs_config_read_server); + mgs_config_read_server);EXPORT_SYMBOL (RQF_MGS_CONFIG_READ ); struct req_format RQF_SEQ_QUERY =
@@ -1516,32 +1516,32 @@ EXPORT_SYMBOL(RQF_OST_STATFS);struct req_format RQF_OST_SET_GRANT_INFO =DEFINE_REQ_FMT0 ("OST_SET_GRANT_INFO" , ost_grant_shrink_client, - ost_body_only); + ost_body_only);EXPORT_SYMBOL (RQF_OST_SET_GRANT_INFO );struct req_format RQF_OST_GET_INFO_GENERIC =DEFINE_REQ_FMT0 ("OST_GET_INFO" , ost_get_info_generic_client, - ost_get_info_generic_server); + ost_get_info_generic_server);EXPORT_SYMBOL (RQF_OST_GET_INFO_GENERIC );struct req_format RQF_OST_GET_INFO_LAST_ID =DEFINE_REQ_FMT0 ("OST_GET_INFO_LAST_ID" , ost_get_info_generic_client, - ost_get_last_id_server); + ost_get_last_id_server);EXPORT_SYMBOL (RQF_OST_GET_INFO_LAST_ID );struct req_format RQF_OST_GET_INFO_LAST_FID =DEFINE_REQ_FMT0 ("OST_GET_INFO_LAST_FID" , obd_set_info_client, - ost_get_last_fid_server); + ost_get_last_fid_server);EXPORT_SYMBOL (RQF_OST_GET_INFO_LAST_FID );struct req_format RQF_OST_SET_INFO_LAST_FID =DEFINE_REQ_FMT0 ("OST_SET_INFO_LAST_FID" , obd_set_info_client, - empty); + empty);EXPORT_SYMBOL (RQF_OST_SET_INFO_LAST_FID );struct req_format RQF_OST_GET_INFO_FIEMAP =DEFINE_REQ_FMT0 ("OST_GET_INFO_FIEMAP" , ost_get_fiemap_client, - ost_get_fiemap_server); + ost_get_fiemap_server);EXPORT_SYMBOL (RQF_OST_GET_INFO_FIEMAP );#if !defined(__REQ_LAYOUT_USER__)
@@ -1733,8 +1733,8 @@ int req_capsule_server_pack(struct req_capsule *pill) pill->rc_area[RCL_SERVER], NULL);if (rc !=0 ) {DEBUG_REQ (D_ERROR , pill->rc_req, -"Cannot pack %d fields in format `%s': " , - count, fmt->rf_name); +"Cannot pack %d fields in format `%s': " , + count, fmt->rf_name); }return rc; }
@@ -1751,9 +1751,8 @@ static int __req_capsule_offset(const struct req_capsule *pill,int offset; offset = field->rmf_offset[pill->rc_fmt->rf_idx][loc]; -LASSERTF (offset >0 ,"%s:%s, off=%d, loc=%d\n" , - pill->rc_fmt->rf_name, - field->rmf_name, offset, loc); +LASSERTF (offset >0 ,"%s:%s, off=%d, loc=%d\n" , pill->rc_fmt->rf_name, + field->rmf_name, offset, loc); offset--;LASSERT (0 <= offset && offset <REQ_MAX_FIELD_NR );
@@ -2213,7 +2212,7 @@ void req_capsule_shrink(struct req_capsule *pill, msg =__req_msg (pill, loc); len =lustre_msg_buflen (msg, offset);LASSERTF (newlen <= len,"%s:%s, oldlen=%d, newlen=%d\n" , - fmt->rf_name, field->rmf_name, len, newlen); + fmt->rf_name, field->rmf_name, len, newlen);if (loc ==RCL_CLIENT ) pill->rc_req->rq_reqlen = lustre_shrink_msg(msg, offset, newlen,
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +7 -8
@@ -454,7 +454,7 @@ static const char *nrs_state2str(enum ptlrpc_nrs_pol_state state)* \param[out] info Holds returned status information */ static void nrs_policy_get_info_locked (struct ptlrpc_nrs_policy *policy, -struct ptlrpc_nrs_pol_info *info) +struct ptlrpc_nrs_pol_info *info) {assert_spin_locked (&policy->pol_nrs->nrs_lock);
@@ -518,8 +518,7 @@ again: pol_idx =0 ; -list_for_each_entry (policy, &nrs->nrs_policy_list, - pol_list) { +list_for_each_entry (policy, &nrs->nrs_policy_list, pol_list) {LASSERT (pol_idx < num_pols);nrs_policy_get_info_locked (policy, &tmp);
@@ -590,7 +589,7 @@ again:* active: 0 */ seq_printf (m,"%s\n" , - !hp ?"\nregular_requests:" :"high_priority_requests:" ); + !hp ?"\nregular_requests:" :"high_priority_requests:" );for (pol_idx =0 ; pol_idx < num_pols; pol_idx++) { seq_printf(m, " - name: %s\n"
@@ -970,7 +969,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n)if (AT_OFF ) {seq_printf (m,"adaptive timeouts off, using obd_timeout %u\n" , - obd_timeout); + obd_timeout);return 0 ; }
@@ -981,8 +980,8 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n)s2dhms (&ts,ktime_get_real_seconds () - worstt);seq_printf (m,"%10s : cur %3u worst %3u (at %lld, " -DHMS_FMT " ago) " ,"service" , - cur, worst, (s64 )worstt,DHMS_VARS (&ts)); +DHMS_FMT " ago) " ,"service" , + cur, worst, (s64 )worstt,DHMS_VARS (&ts));lprocfs_at_hist_helper (m, &svcpt->scp_at_estimate); }
@@ -1297,7 +1296,7 @@ int lprocfs_rd_pinger_recov(struct seq_file *m, void *n)EXPORT_SYMBOL (lprocfs_rd_pinger_recov);int lprocfs_wr_pinger_recov (struct file *file,const char __user *buffer, -size_t count,loff_t *off) +size_t count,loff_t *off) {struct obd_device *obd = ((struct seq_file *)file->private_data)->private;struct client_obd *cli = &obd->u.cli;
drivers/staging/lustre/lustre/ptlrpc/niobuf.c +2 -2
@@ -507,11 +507,11 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)*/ LASSERT (!request->rq_receiving_reply);LASSERT (!((lustre_msg_get_flags (request->rq_reqmsg) &MSG_REPLAY ) && - (request->rq_import->imp_state ==LUSTRE_IMP_FULL ))); + (request->rq_import->imp_state ==LUSTRE_IMP_FULL )));if (unlikely (obd && obd->obd_fail)) {CDEBUG (D_HA ,"muting rpc for failed imp obd %s\n" , - obd->obd_name); + obd->obd_name);/* this prevents us from waiting in ptlrpc_queue_wait */ spin_lock (&request->rq_lock); request->rq_err =1 ;
drivers/staging/lustre/lustre/ptlrpc/nrs.c +8 -11
@@ -304,7 +304,7 @@ static void nrs_policy_put_locked(struct ptlrpc_nrs_policy *policy) policy->pol_ref--;if (unlikely (policy->pol_ref ==0 && - policy->pol_state ==NRS_POL_STATE_STOPPING )) + policy->pol_state ==NRS_POL_STATE_STOPPING ))nrs_policy_stop0 (policy); }
@@ -319,7 +319,7 @@ static void nrs_policy_put(struct ptlrpc_nrs_policy *policy)* Find and return a policy by name. */ static struct ptlrpc_nrs_policy *nrs_policy_find_locked (struct ptlrpc_nrs *nrs, -char *name) +char *name) {struct ptlrpc_nrs_policy *tmp;
@@ -797,7 +797,7 @@ static void ptlrpc_nrs_req_add_nolock(struct ptlrpc_request *req)*/ if (unlikely (list_empty (&policy->pol_list_queued)))list_add_tail (&policy->pol_list_queued, - &policy->pol_nrs->nrs_policy_queued); + &policy->pol_nrs->nrs_policy_queued); }/**
@@ -978,8 +978,7 @@ again: nrs =nrs_svcpt2nrs (svcpt, hp); nrs->nrs_stopping =1 ; -list_for_each_entry_safe (policy, tmp, &nrs->nrs_policy_list, - pol_list) { +list_for_each_entry_safe (policy, tmp, &nrs->nrs_policy_list, pol_list) { rc =nrs_policy_unregister (nrs, policy->pol_desc->pd_name);LASSERT (rc ==0 ); }
@@ -1100,7 +1099,7 @@ static int ptlrpc_nrs_policy_register(struct ptlrpc_nrs_pol_conf *conf)LASSERT (conf->nc_ops);LASSERT (conf->nc_compat);LASSERT (ergo (conf->nc_compat == nrs_policy_compat_one, - conf->nc_compat_svc_name)); + conf->nc_compat_svc_name));LASSERT (ergo ((conf->nc_flags &PTLRPC_NRS_FL_REG_EXTERN ) !=0 , conf->nc_owner));
@@ -1414,7 +1413,7 @@ static void nrs_request_removed(struct ptlrpc_nrs_policy *policy) policy->pol_nrs->nrs_req_queued);list_move_tail (&policy->pol_list_queued, - &policy->pol_nrs->nrs_policy_queued); + &policy->pol_nrs->nrs_policy_queued); } }
@@ -1446,8 +1445,7 @@ ptlrpc_nrs_req_get_nolock0(struct ptlrpc_service_part *svcpt, bool hp,* Always try to drain requests from all NRS polices even if they are * inactive, because the user can change policy status at runtime. */ -list_for_each_entry (policy, &nrs->nrs_policy_queued, - pol_list_queued) { +list_for_each_entry (policy, &nrs->nrs_policy_queued, pol_list_queued) { nrq =nrs_request_get (policy, peek, force);if (nrq) {if (likely (!peek)) {
@@ -1599,8 +1597,7 @@ void ptlrpc_nrs_fini(void)struct ptlrpc_nrs_pol_desc *desc;struct ptlrpc_nrs_pol_desc *tmp; -list_for_each_entry_safe (desc, tmp, &nrs_core.nrs_policies, - pd_list) { +list_for_each_entry_safe (desc, tmp, &nrs_core.nrs_policies, pd_list) {list_del_init (&desc->pd_list);kfree (desc); }
drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c +1 -1
@@ -163,7 +163,7 @@ struct ptlrpc_nrs_request *nrs_fifo_req_get(struct ptlrpc_nrs_policy *policy, nrq =unlikely (list_empty (&head->fh_list)) ?NULL : list_entry(head->fh_list.next, struct ptlrpc_nrs_request, - nr_u.fifo.fr_list); + nr_u.fifo.fr_list);if (likely (!peek && nrq)) { struct ptlrpc_request *req = container_of(nrq,
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +2 -2
@@ -280,7 +280,7 @@ lustre_get_emerg_rs(struct ptlrpc_service_part *svcpt) } rs =list_entry (svcpt->scp_rep_idle.next, - struct ptlrpc_reply_state, rs_list); + struct ptlrpc_reply_state, rs_list);list_del (&rs->rs_list);spin_unlock (&svcpt->scp_rep_lock);
@@ -1908,7 +1908,7 @@ static void print_lum(struct lov_user_md *lum)CDEBUG (D_OTHER ,"\tlmm_stripe_size: %#x\n" , lum->lmm_stripe_size);CDEBUG (D_OTHER ,"\tlmm_stripe_count: %#x\n" , lum->lmm_stripe_count);CDEBUG (D_OTHER ,"\tlmm_stripe_offset/lmm_layout_gen: %#x\n" , - lum->lmm_stripe_offset); + lum->lmm_stripe_offset); }static void lustre_swab_lmm_oi (struct ost_id *oi)
drivers/staging/lustre/lustre/ptlrpc/pinger.c +3 -2
@@ -242,7 +242,7 @@ static int ptlrpc_pinger_main(void *arg)list_for_each (iter, &pinger_imports) {struct obd_import *imp = list_entry(iter, struct obd_import, - imp_pinger_chain); + imp_pinger_chain);ptlrpc_pinger_process_import (imp, this_ping);/* obd_timeout might have changed */
@@ -404,7 +404,8 @@ EXPORT_SYMBOL(ptlrpc_pinger_del_import);* be called when timeout happens. */ static struct timeout_item *ptlrpc_new_timeout (int time, -enum timeout_event event,timeout_cb_t cb,void *data) +enum timeout_event event, +timeout_cb_t cb,void *data) {struct timeout_item *ti;
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +4 -5
@@ -207,11 +207,10 @@ static int ptlrpcd_steal_rqset(struct ptlrpc_request_set *des,if (likely (!list_empty (&src->set_new_requests))) {list_for_each_safe (pos, tmp, &src->set_new_requests) { req = list_entry(pos, struct ptlrpc_request, - rq_set_chain); + rq_set_chain); req->rq_set = des; } -list_splice_init (&src->set_new_requests, - &des->set_requests); +list_splice_init (&src->set_new_requests, &des->set_requests); rc =atomic_read (&src->set_new_count);atomic_add (rc, &des->set_remaining);atomic_set (&src->set_new_count,0 );
@@ -285,9 +284,9 @@ static int ptlrpcd_check(struct lu_env *env, struct ptlrpcd_ctl *pc)spin_lock (&set->set_new_req_lock);if (likely (!list_empty (&set->set_new_requests))) {list_splice_init (&set->set_new_requests, - &set->set_requests); + &set->set_requests);atomic_add (atomic_read (&set->set_new_count), - &set->set_remaining); + &set->set_remaining);atomic_set (&set->set_new_count,0 );/* * Need to calculate its timeout.
drivers/staging/lustre/lustre/ptlrpc/recover.c +2 -4
@@ -107,8 +107,7 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight)/* Replay all the committed open requests on committed_list first */ if (!list_empty (&imp->imp_committed_list)) { tmp = imp->imp_committed_list.prev; - req = list_entry(tmp, struct ptlrpc_request, - rq_replay_list); + req = list_entry(tmp, struct ptlrpc_request, rq_replay_list);/* The last request on committed_list hasn't been replayed */ if (req->rq_transno > last_transno) {
@@ -195,8 +194,7 @@ int ptlrpc_resend(struct obd_import *imp)return -1 ; } -list_for_each_entry_safe (req, next, &imp->imp_sending_list, - rq_list) { +list_for_each_entry_safe (req, next, &imp->imp_sending_list, rq_list) {LASSERTF ((long )req >PAGE_CACHE_SIZE && req !=LP_POISON ,"req %p bad\n" , req);LASSERTF (req->rq_type !=LI_POISON ,"req %p freed\n" , req);
drivers/staging/lustre/lustre/ptlrpc/sec.c +3 -3
@@ -610,7 +610,7 @@ again:if (sec->ps_flvr.sf_rpc != req->rq_flvr.sf_rpc) {CDEBUG (D_SEC ,"req %p: flavor has changed %x -> %x\n" , - req, req->rq_flvr.sf_rpc, sec->ps_flvr.sf_rpc); + req, req->rq_flvr.sf_rpc, sec->ps_flvr.sf_rpc);req_off_ctx_list (req, ctx);sptlrpc_req_replace_dead_ctx (req); ctx = req->rq_cli_ctx;
@@ -1996,8 +1996,8 @@ int sptlrpc_svc_alloc_rs(struct ptlrpc_request *req, int msglen) msglen + sizeof(struct ptlrpc_reply_state)) {/* Just return failure if the size is too big */ CERROR ("size of message is too big (%zd), %d allowed" , - msglen +sizeof (struct ptlrpc_reply_state ), - svcpt->scp_service->srv_max_reply_size); + msglen +sizeof (struct ptlrpc_reply_state ), + svcpt->scp_service->srv_max_reply_size);return -ENOMEM ; }
drivers/staging/lustre/lustre/ptlrpc/sec_config.c +1 -1
@@ -467,7 +467,7 @@ static void sptlrpc_conf_free_rsets(struct sptlrpc_conf *conf)sptlrpc_rule_set_free (&conf->sc_rset);list_for_each_entry_safe (conf_tgt, conf_tgt_next, - &conf->sc_tgts, sct_list) { + &conf->sc_tgts, sct_list) {sptlrpc_rule_set_free (&conf_tgt->sct_rset);list_del (&conf_tgt->sct_list);kfree (conf_tgt);
drivers/staging/lustre/lustre/ptlrpc/sec_gc.c +2 -2
@@ -109,7 +109,7 @@ static void sec_process_ctx_list(void)while (!list_empty (&sec_gc_ctx_list)) { ctx =list_entry (sec_gc_ctx_list.next, - struct ptlrpc_cli_ctx, cc_gc_chain); + struct ptlrpc_cli_ctx, cc_gc_chain);list_del_init (&ctx->cc_gc_chain);spin_unlock (&sec_gc_ctx_list_lock);
@@ -131,7 +131,7 @@ static void sec_do_gc(struct ptlrpc_sec *sec)if (unlikely (sec->ps_gc_next ==0 )) {CDEBUG (D_SEC ,"sec %p(%s) has 0 gc time\n" , - sec, sec->ps_policy->sp_name); + sec, sec->ps_policy->sp_name);return ; }
drivers/staging/lustre/lustre/ptlrpc/service.c +33 -40
201 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH 15/25 staging/lustre/osc: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/osc/lproc_osc.c | 20 ++++++------- drivers/staging/lustre/lustre/osc/osc_cache.c | 18 +++++------- drivers/staging/lustre/lustre/osc/osc_io.c | 5 ++-- drivers/staging/lustre/lustre/osc/osc_lock.c | 27 +++++++++--------- drivers/staging/lustre/lustre/osc/osc_page.c | 37 ++++++++++++------------- drivers/staging/lustre/lustre/osc/osc_request.c | 17 ++++++------ 6 files changed, 59 insertions(+), 65 deletions(-)
drivers/staging/lustre/lustre/osc/lproc_osc.c +10 -10
@@ -397,8 +397,8 @@ static int osc_checksum_type_seq_show(struct seq_file *m, void *v) }static ssize_t osc_checksum_type_seq_write (struct file *file, -const char __user *buffer, -size_t count,loff_t *off) +const char __user *buffer, +size_t count,loff_t *off) {struct obd_device *obd = ((struct seq_file *)file->private_data)->private;int i;
@@ -652,10 +652,10 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v) read_cum += r; write_cum += w;seq_printf (seq,"%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n" , -1 << i, r,pct (r, read_tot), -pct (read_cum, read_tot), w, -pct (w, write_tot), -pct (write_cum, write_tot)); +1 << i, r,pct (r, read_tot), +pct (read_cum, read_tot), w, +pct (w, write_tot), +pct (write_cum, write_tot));if (read_cum == read_tot && write_cum == write_tot)break ; }
@@ -676,10 +676,10 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v) read_cum += r; write_cum += w;seq_printf (seq,"%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n" , - i, r,pct (r, read_tot), -pct (read_cum, read_tot), w, -pct (w, write_tot), -pct (write_cum, write_tot)); + i, r,pct (r, read_tot), +pct (read_cum, read_tot), w, +pct (w, write_tot), +pct (write_cum, write_tot));if (read_cum == read_tot && write_cum == write_tot)break ; }
drivers/staging/lustre/lustre/osc/osc_cache.c +7 -11
@@ -603,7 +603,7 @@ void osc_extent_release(const struct lu_env *env, struct osc_extent *ext)if (ext->oe_urgent)list_move_tail (&ext->oe_link, - &obj->oo_urgent_exts); + &obj->oo_urgent_exts); }osc_object_unlock (obj);
@@ -855,8 +855,7 @@ int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext, ext->oe_rc = rc ?: ext->oe_nr_pages;EASSERT (ergo (rc ==0 , ext->oe_state ==OES_RPC ), ext); -list_for_each_entry_safe (oap, tmp, &ext->oe_pages, - oap_pending_item) { +list_for_each_entry_safe (oap, tmp, &ext->oe_pages, oap_pending_item) {list_del_init (&oap->oap_rpc_item);list_del_init (&oap->oap_pending_item);if (last_off <= oap->oap_obj_off) {
@@ -989,8 +988,7 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index, goto out;/* discard all pages with index greater then trunc_index */ -list_for_each_entry_safe (oap, tmp, &ext->oe_pages, - oap_pending_item) { +list_for_each_entry_safe (oap, tmp, &ext->oe_pages, oap_pending_item) {struct cl_page *sub =oap2cl_page (oap);struct cl_page *page =cl_page_top (sub);
@@ -1912,7 +1910,7 @@ static int get_write_extents(struct osc_object *obj, struct list_head *rpclist)LASSERT (osc_object_is_locked (obj));while (!list_empty (&obj->oo_hp_exts)) { ext = list_entry(obj->oo_hp_exts.next, struct osc_extent, - oe_link); + oe_link);LASSERT (ext->oe_state ==OES_CACHE );if (!try_to_add_extent_for_io (cli, ext, rpclist, &page_count, &max_pages))
@@ -1924,7 +1922,7 @@ static int get_write_extents(struct osc_object *obj, struct list_head *rpclist)while (!list_empty (&obj->oo_urgent_exts)) { ext =list_entry (obj->oo_urgent_exts.next, - struct osc_extent, oe_link); + struct osc_extent, oe_link);if (!try_to_add_extent_for_io (cli, ext, rpclist, &page_count, &max_pages))return page_count;
@@ -2051,8 +2049,7 @@ osc_send_read_rpc(const struct lu_env *env, struct client_obd *cli,int rc =0 ;LASSERT (osc_object_is_locked (osc)); -list_for_each_entry_safe (ext, next, - &osc->oo_reading_exts, oe_link) { +list_for_each_entry_safe (ext, next, &osc->oo_reading_exts, oe_link) {EASSERT (ext->oe_state ==OES_LOCK_DONE , ext);if (!try_to_add_extent_for_io (cli, ext, &rpclist, &page_count, &max_pages))
@@ -2928,8 +2925,7 @@ int osc_cache_writeback_range(const struct lu_env *env, struct osc_object *obj, ext->oe_max_end <= end, ext);osc_extent_state_set (ext,OES_LOCKING ); ext->oe_owner = current; -list_move_tail (&ext->oe_link, - &discard_list); +list_move_tail (&ext->oe_link, &discard_list);osc_update_pending (obj,OBD_BRW_WRITE , -ext->oe_nr_pages); }
drivers/staging/lustre/lustre/osc/osc_io.c +2 -3
@@ -357,7 +357,7 @@ static int trunc_check_cb(const struct lu_env *env, struct cl_io *io,if (oap->oap_cmd &OBD_BRW_WRITE && !list_empty (&oap->oap_pending_item))CL_PAGE_DEBUG (D_ERROR , env, page,"exists %llu/%s.\n" , - start, current->comm); + start, current->comm); {struct page *vmpage =cl_page_vmpage (env, page);
@@ -761,8 +761,7 @@ static void osc_req_attr_set(const struct lu_env *env,struct cl_lock *scan; head =cl_object_header (apage->cp_obj); -list_for_each_entry (scan, &head->coh_locks, - cll_linkage) +list_for_each_entry (scan, &head->coh_locks, cll_linkage)CL_LOCK_DEBUG (D_ERROR , env, scan,"no cover page!\n" ); CL_PAGE_DEBUG(D_ERROR, env, apage,
drivers/staging/lustre/lustre/osc/osc_lock.c +14 -13
@@ -1117,7 +1117,7 @@ static int osc_lock_enqueue(const struct lu_env *env, "Impossible state: %d\n", ols->ols_state);LASSERTF (ergo (ols->ols_glimpse, lock->cll_descr.cld_mode <=CLM_READ ), -"lock = %p, ols = %p\n" , lock, ols); +"lock = %p, ols = %p\n" , lock, ols); result =osc_lock_enqueue_wait (env, ols);if (result ==0 ) {
@@ -1144,12 +1144,12 @@ static int osc_lock_enqueue(const struct lu_env *env,ostid_build_res_name (&obj->oo_oinfo->loi_oi, resname);osc_lock_build_policy (env, lock, policy); result =osc_enqueue_base (osc_export (obj), resname, - &ols->ols_flags, policy, - &ols->ols_lvb, - obj->oo_oinfo->loi_kms_valid, - osc_lock_upcall, - ols, einfo, &ols->ols_handle, -PTLRPCD_SET ,1 , ols->ols_agl); + &ols->ols_flags, policy, + &ols->ols_lvb, + obj->oo_oinfo->loi_kms_valid, + osc_lock_upcall, + ols, einfo, &ols->ols_handle, +PTLRPCD_SET ,1 , ols->ols_agl);if (result !=0 ) {cl_lock_user_del (env, lock);cl_lock_unhold (env, lock,"upcall" , lock);
@@ -1266,11 +1266,12 @@ static int osc_lock_flush(struct osc_lock *ols, int discard)if (descr->cld_mode >=CLM_WRITE ) { result =osc_cache_writeback_range (env, obj, - descr->cld_start, descr->cld_end, -1 , discard); + descr->cld_start, + descr->cld_end, +1 , discard);LDLM_DEBUG (ols->ols_lock, -"lock %p: %d pages were %s.\n" , lock, result, - discard ?"discarded" :"written" ); +"lock %p: %d pages were %s.\n" , lock, result, + discard ?"discarded" :"written" );if (result >0 ) result =0 ; }
@@ -1590,7 +1591,7 @@ int osc_lock_init(const struct lu_env *env, clk->ols_flags |=LDLM_FL_DENY_ON_CONTENTION ;LDLM_DEBUG_NOLOCK ("lock %p, osc lock %p, flags %llx\n" , - lock, clk, clk->ols_flags); + lock, clk, clk->ols_flags); result =0 ; }else
@@ -1612,7 +1613,7 @@ int osc_dlm_lock_pageref(struct ldlm_lock *dlm)*/ if (olock &&atomic_add_return (_PAGEREF_MAGIC, - &olock->ols_pageref) != _PAGEREF_MAGIC) { + &olock->ols_pageref) != _PAGEREF_MAGIC) {atomic_sub (_PAGEREF_MAGIC, &olock->ols_pageref); rc =1 ; }
drivers/staging/lustre/lustre/osc/osc_page.c +18 -19
@@ -403,7 +403,7 @@ static const struct cl_page_operations osc_page_ops = { };int osc_page_init (const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *vmpage) +struct cl_page *page,struct page *vmpage) {struct osc_object *osc =cl2osc (obj);struct osc_page *opg =cl_object_page_slice (obj, page);
@@ -413,13 +413,12 @@ int osc_page_init(const struct lu_env *env, struct cl_object *obj, opg->ops_to =PAGE_CACHE_SIZE ; result =osc_prep_async_page (osc, opg, vmpage, -cl_offset (obj, page->cp_index)); +cl_offset (obj, page->cp_index));if (result ==0 ) {struct osc_io *oio =osc_env_io (env); opg->ops_srvlock =osc_io_srvlock (oio); -cl_page_slice_add (page, &opg->ops_cl, obj, - &osc_page_ops); +cl_page_slice_add (page, &opg->ops_cl, obj, &osc_page_ops); }/* * Cannot assert osc_page_protected() here as read-ahead
@@ -462,7 +461,7 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, oap->oap_brw_flags = brw_flags |OBD_BRW_SYNC ;if (!client_is_remote (osc_export (obj)) && -capable (CFS_CAP_SYS_RESOURCE )) { +capable (CFS_CAP_SYS_RESOURCE )) { oap->oap_brw_flags |=OBD_BRW_NOQUOTA ; oap->oap_cmd |=OBD_BRW_NOQUOTA ; }
@@ -590,7 +589,7 @@ int osc_lru_shrink(struct client_obd *cli, int target)break ; opg = list_entry(cli->cl_lru_list.next, struct osc_page, - ops_lru); + ops_lru); page =cl_page_top (opg->ops_cl.cpl_page);if (cl_page_in_use_noref (page)) {list_move_tail (&opg->ops_lru, &cli->cl_lru_list);
@@ -737,14 +736,14 @@ static int osc_lru_reclaim(struct client_obd *cli) rc =osc_lru_shrink (cli, lru_shrink_min);if (rc !=0 ) {CDEBUG (D_CACHE ,"%s: Free %d pages from own LRU: %p.\n" , - cli->cl_import->imp_obd->obd_name, rc, cli); + cli->cl_import->imp_obd->obd_name, rc, cli);return rc; }CDEBUG (D_CACHE ,"%s: cli %p no free slots, pages: %d, busy: %d.\n" , - cli->cl_import->imp_obd->obd_name, cli, -atomic_read (&cli->cl_lru_in_list), -atomic_read (&cli->cl_lru_busy)); + cli->cl_import->imp_obd->obd_name, cli, +atomic_read (&cli->cl_lru_in_list), +atomic_read (&cli->cl_lru_busy));/* Reclaim LRU slots from other client_obd as it can't free enough * from its own. This should rarely happen.
@@ -758,12 +757,12 @@ static int osc_lru_reclaim(struct client_obd *cli) max_scans =atomic_read (&cache->ccc_users);while (--max_scans >0 && !list_empty (&cache->ccc_lru)) { cli = list_entry(cache->ccc_lru.next, struct client_obd, - cl_lru_osc); + cl_lru_osc);CDEBUG (D_CACHE ,"%s: cli %p LRU pages: %d, busy: %d.\n" , - cli->cl_import->imp_obd->obd_name, cli, -atomic_read (&cli->cl_lru_in_list), -atomic_read (&cli->cl_lru_busy)); + cli->cl_import->imp_obd->obd_name, cli, +atomic_read (&cli->cl_lru_in_list), +atomic_read (&cli->cl_lru_busy));list_move_tail (&cli->cl_lru_osc, &cache->ccc_lru);if (atomic_read (&cli->cl_lru_in_list) >0 ) {
@@ -778,7 +777,7 @@ static int osc_lru_reclaim(struct client_obd *cli)spin_unlock (&cache->ccc_lru_lock);CDEBUG (D_CACHE ,"%s: cli %p freed %d pages.\n" , - cli->cl_import->imp_obd->obd_name, cli, rc); + cli->cl_import->imp_obd->obd_name, cli, rc);return rc; }
@@ -812,10 +811,10 @@ static int osc_lru_reserve(const struct lu_env *env, struct osc_object *obj, gen =atomic_read (&cli->cl_lru_in_list); rc =l_wait_event (osc_lru_waitq, -atomic_read (cli->cl_lru_left) >0 || - (atomic_read (&cli->cl_lru_in_list) >0 && - gen !=atomic_read (&cli->cl_lru_in_list)), - &lwi); +atomic_read (cli->cl_lru_left) >0 || + (atomic_read (&cli->cl_lru_in_list) >0 && + gen !=atomic_read (&cli->cl_lru_in_list)), + &lwi);atomic_dec (&osc_lru_waiters);if (rc <0 )
drivers/staging/lustre/lustre/osc/osc_request.c +8 -9
@@ -993,8 +993,7 @@ static int osc_grant_shrink_grant_cb(struct timeout_item *item, void *data) {struct client_obd *client; -list_for_each_entry (client, &item->ti_obd_list, - cl_grant_shrink_list) { +list_for_each_entry (client, &item->ti_obd_list, cl_grant_shrink_list) {if (osc_should_shrink_grant (client))osc_shrink_grant (client); }
@@ -1011,7 +1010,7 @@ static int osc_add_shrink_grant(struct client_obd *client) &client->cl_grant_shrink_list);if (rc) {CERROR ("add grant client %s error %d\n" , - client->cl_import->imp_obd->obd_name, rc); + client->cl_import->imp_obd->obd_name, rc);return rc; } CDEBUG(D_CACHE, "add grant client %s\n",
@@ -1127,7 +1126,7 @@ static int check_write_rcs(struct ptlrpc_request *req,if (remote_rcs[i] !=0 ) {CDEBUG (D_INFO ,"rc[%d] invalid (%d) req %p\n" , - i, remote_rcs[i], req); + i, remote_rcs[i], req);return -EPROTO ; } }
@@ -1195,7 +1194,7 @@ static u32 osc_checksum_bulk(int nob, u32 pg_count,kunmap (pga[i]->pg); }cfs_crypto_hash_update_page (hdesc, pga[i]->pg, - pga[i]->off & ~CFS_PAGE_MASK , + pga[i]->off & ~CFS_PAGE_MASK , count); CDEBUG(D_PAGE, "page %p map %p index %lu flags %lx count %u priv %0lx: off %d\n",
@@ -1554,7 +1553,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)if (rc != req->rq_bulk->bd_nob_transferred) {CERROR ("Unexpected rc %d (%d transferred)\n" , - rc, req->rq_bulk->bd_nob_transferred); + rc, req->rq_bulk->bd_nob_transferred);return -EPROTO ; }
@@ -1944,7 +1943,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,sort_brw_pages (pga, page_count); rc =osc_brw_prep_request (cmd, cli, oa,NULL , page_count, - pga, &req,1 ,0 ); + pga, &req,1 ,0 );if (rc !=0 ) {CERROR ("prep_req failed: %d\n" , rc); goto out;
@@ -1986,7 +1985,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, tmp = oap;if (oap->oap_interrupted && !req->rq_intr) {CDEBUG (D_INODE ,"oap %p in req %p interrupted\n" , - oap, req); + oap, req);ptlrpc_mark_interrupted (req); } }
@@ -2034,7 +2033,7 @@ out:*/ while (!list_empty (ext_list)) { ext = list_entry(ext_list->next, struct osc_extent, - oe_link); + oe_link);list_del_init (&ext->oe_link);osc_extent_finish (env, ext,0 , rc); }
Signature · 1 line
2.1.0
PATCH 16/25 staging/lustre/obdclass: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/obdclass/cl_io.c | 20 ++-- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 21 ++-- drivers/staging/lustre/lustre/obdclass/cl_object.c | 10 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 10 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 3 +- drivers/staging/lustre/lustre/obdclass/genops.c | 26 ++--- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 8 +- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 +- .../lustre/lustre/obdclass/lprocfs_status.c | 125 ++++++++++----------- drivers/staging/lustre/lustre/obdclass/lu_object.c | 3 +- .../staging/lustre/lustre/obdclass/lustre_peer.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 6 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 8 +- 13 files changed, 119 insertions(+), 127 deletions(-)
drivers/staging/lustre/lustre/obdclass/cl_io.c +9 -11
@@ -139,7 +139,7 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io)case CIT_MISC :/* Check ignore layout change conf */ LASSERT (ergo (io->ci_ignore_layout || !io->ci_verify_layout, - !io->ci_need_restart)); + !io->ci_need_restart));break ;default :LBUG ();
@@ -291,11 +291,11 @@ static void cl_io_locks_sort(struct cl_io *io) prev =NULL ;list_for_each_entry_safe (curr, temp, - &io->ci_lockset.cls_todo, - cill_linkage) { + &io->ci_lockset.cls_todo, + cill_linkage) {if (prev) {switch (cl_lock_descr_sort (&prev->cill_descr, - &curr->cill_descr)) { + &curr->cill_descr)) {case 0 :/* * IMPOSSIBLE: Identical locks are
@@ -306,7 +306,7 @@ static void cl_io_locks_sort(struct cl_io *io)LBUG ();case 1 :list_move_tail (&curr->cill_linkage, - &prev->cill_linkage); + &prev->cill_linkage); done =0 ;continue ;/* don't change prev: it's * still "previous"
@@ -385,8 +385,7 @@ static int cl_lockset_lock_one(const struct lu_env *env,if (!(link->cill_descr.cld_enq_flags &CEF_ASYNC )) { result =cl_wait (env, lock);if (result ==0 ) -list_move (&link->cill_linkage, - &set->cls_done); +list_move (&link->cill_linkage, &set->cls_done); }else result =0 ; }else
@@ -430,12 +429,11 @@ static int cl_lockset_lock(const struct lu_env *env, struct cl_io *io, }if (result ==0 ) {list_for_each_entry_safe (link, temp, - &set->cls_curr, cill_linkage) { + &set->cls_curr, cill_linkage) { lock = link->cill_lock; result =cl_wait (env, lock);if (result ==0 ) -list_move (&link->cill_linkage, - &set->cls_done); +list_move (&link->cill_linkage, &set->cls_done);else break ; }
@@ -1354,7 +1352,7 @@ void cl_req_completion(const struct lu_env *env, struct cl_req *req, int rc)*/ while (!list_empty (&req->crq_layers)) { slice =list_entry (req->crq_layers.prev, - struct cl_req_slice, crs_linkage); + struct cl_req_slice, crs_linkage);list_del_init (&slice->crs_linkage);if (slice->crs_ops->cro_completion) slice->crs_ops->cro_completion (env, slice, rc);
drivers/staging/lustre/lustre/obdclass/cl_lock.c +10 -11
@@ -259,7 +259,7 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock)struct cl_lock_slice *slice; slice =list_entry (lock->cll_layers.next, - struct cl_lock_slice, cls_linkage); + struct cl_lock_slice, cls_linkage);list_del_init (lock->cll_layers.next); slice->cls_ops->clo_fini (env, slice); }
@@ -382,8 +382,7 @@ static struct cl_lock *cl_lock_alloc(const struct lu_env *env,CS_LOCK_INC (obj, total);CS_LOCK_INC (obj, create);cl_lock_lockdep_init (lock); -list_for_each_entry (obj, &head->loh_layers, - co_lu.lo_linkage) { +list_for_each_entry (obj, &head->loh_layers, co_lu.lo_linkage) {int err; err = obj->co_ops->coo_lock_init (env, obj, lock, io);
@@ -534,7 +533,7 @@ static struct cl_lock *cl_lock_find(const struct lu_env *env,if (!ghost) {cl_lock_get_trust (lock);list_add_tail (&lock->cll_linkage, - &head->coh_locks); + &head->coh_locks);spin_unlock (&head->coh_lock_guard);CS_LOCK_INC (obj, busy); }else {
@@ -774,7 +773,7 @@ static void cl_lock_cancel0(const struct lu_env *env, struct cl_lock *lock) lock->cll_flags |=CLF_CANCELLED ;list_for_each_entry_reverse (slice, &lock->cll_layers, - cls_linkage) { + cls_linkage) {if (slice->cls_ops->clo_cancel) slice->cls_ops->clo_cancel (env, slice); }
@@ -811,7 +810,7 @@ static void cl_lock_delete0(const struct lu_env *env, struct cl_lock *lock)* by cl_lock_lookup(). */ list_for_each_entry_reverse (slice, &lock->cll_layers, - cls_linkage) { + cls_linkage) {if (slice->cls_ops->clo_delete) slice->cls_ops->clo_delete (env, slice); }
@@ -1040,7 +1039,7 @@ static int cl_unuse_try_internal(const struct lu_env *env, struct cl_lock *lock) result = -ENOSYS ;list_for_each_entry_reverse (slice, &lock->cll_layers, - cls_linkage) { + cls_linkage) {if (slice->cls_ops->clo_unuse) { result = slice->cls_ops->clo_unuse (env, slice);if (result !=0 )
@@ -1658,7 +1657,7 @@ void cl_lock_disclosure(const struct lu_env *env,cl_lock_trace (D_DLMTRACE , env,"disclosure lock" , closure->clc_origin);list_for_each_entry_safe (scan, temp, &closure->clc_list, - cll_inclosure){ + cll_inclosure) {list_del_init (&scan->cll_inclosure);cl_lock_mutex_put (env, scan);lu_ref_del (&scan->cll_reference,"closure" , closure);
@@ -1845,7 +1844,7 @@ static int check_and_discard_cb(const struct lu_env *env, struct cl_io *io,/* refresh non-overlapped index */ tmp =cl_lock_at_pgoff (env, lock->cll_descr.cld_obj, index, - lock,1 ,0 ); + lock,1 ,0 );if (tmp) {/* Cache the first-non-overlapped index so as to skip * all pages within [index, clt_fn_index). This
@@ -2173,8 +2172,8 @@ EXPORT_SYMBOL(cl_lock_mode_name);* Prints human readable representation of a lock description. */ void cl_lock_descr_print (const struct lu_env *env,void *cookie, -lu_printer_t printer, -const struct cl_lock_descr *descr) +lu_printer_t printer, +const struct cl_lock_descr *descr) {const struct lu_fid *fid;
drivers/staging/lustre/lustre/obdclass/cl_object.c +4 -6
@@ -247,8 +247,7 @@ int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj, top = obj->co_lu.lo_header; result =0 ; -list_for_each_entry_reverse (obj, &top->loh_layers, - co_lu.lo_linkage) { +list_for_each_entry_reverse (obj, &top->loh_layers, co_lu.lo_linkage) {if (obj->co_ops->coo_attr_set) { result = obj->co_ops->coo_attr_set (env, obj, attr, v);if (result !=0 ) {
@@ -278,8 +277,7 @@ int cl_object_glimpse(const struct lu_env *env, struct cl_object *obj, top = obj->co_lu.lo_header; result =0 ; -list_for_each_entry_reverse (obj, &top->loh_layers, - co_lu.lo_linkage) { +list_for_each_entry_reverse (obj, &top->loh_layers, co_lu.lo_linkage) {if (obj->co_ops->coo_glimpse) { result = obj->co_ops->coo_glimpse (env, obj, lvb);if (result !=0 )
@@ -457,13 +455,13 @@ locks: ...... ...... ...... ...... ...... [...... ...... ...... ...... ......]seq_printf (m," [" );for (i =0 ; i <ARRAY_SIZE (site->cs_pages_state); ++i)seq_printf (m,"%s: %u " , pstate[i], -atomic_read (&site->cs_pages_state[i])); +atomic_read (&site->cs_pages_state[i]));seq_printf (m,"]\n" );cache_stats_print (&site->cs_locks, m,0 );seq_printf (m," [" );for (i =0 ; i <ARRAY_SIZE (site->cs_locks_state); ++i)seq_printf (m,"%s: %u " , lstate[i], -atomic_read (&site->cs_locks_state[i])); +atomic_read (&site->cs_locks_state[i]));seq_printf (m,"]\n" );cache_stats_print (&cl_env_stats, m,0 );seq_printf (m,"\n" );
drivers/staging/lustre/lustre/obdclass/cl_page.c +5 -5
@@ -255,7 +255,7 @@ static void cl_page_free(const struct lu_env *env, struct cl_page *page)struct cl_page_slice *slice; slice =list_entry (page->cp_layers.next, - struct cl_page_slice, cpl_linkage); + struct cl_page_slice, cpl_linkage);list_del_init (page->cp_layers.next); slice->cpl_ops->cpo_fini (env, slice); }
@@ -277,8 +277,9 @@ static inline void cl_page_state_set_trust(struct cl_page *page, }static struct cl_page *cl_page_alloc (const struct lu_env *env, -struct cl_object *o,pgoff_t ind,struct page *vmpage, -enum cl_page_type type) +struct cl_object *o,pgoff_t ind, +struct page *vmpage, +enum cl_page_type type) {struct cl_page *page;struct lu_object_header *head;
@@ -303,8 +304,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,mutex_init (&page->cp_mutex);lu_ref_init (&page->cp_reference); head = o->co_lu.lo_header; -list_for_each_entry (o, &head->loh_layers, - co_lu.lo_linkage) { +list_for_each_entry (o, &head->loh_layers, co_lu.lo_linkage) {if (o->co_ops->coo_page_init) { result = o->co_ops->coo_page_init (env, o, page, vmpage);
drivers/staging/lustre/lustre/obdclass/class_obd.c +1 -2
@@ -199,8 +199,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg) err = -ENOMEM ; goto out; } - err =copy_from_user (lcfg, data->ioc_pbuf1, - data->ioc_plen1); + err =copy_from_user (lcfg, data->ioc_pbuf1, data->ioc_plen1);if (!err) err =lustre_cfg_sanity_check (lcfg, data->ioc_plen1);if (!err)
drivers/staging/lustre/lustre/obdclass/genops.c +13 -13
@@ -461,8 +461,8 @@ EXPORT_SYMBOL(class_num2obd);* otherwise any client connected to the tgt is returned. */ struct obd_device *class_find_client_obd (struct obd_uuid *tgt_uuid, -const char *typ_name, -struct obd_uuid *grp_uuid) +const char *typ_name, +struct obd_uuid *grp_uuid) {int i;
@@ -582,21 +582,21 @@ int obd_init_caches(void) {LASSERT (!obd_device_cachep); obd_device_cachep =kmem_cache_create ("ll_obd_dev_cache" , -sizeof (struct obd_device ), -0 ,0 ,NULL ); +sizeof (struct obd_device ), +0 ,0 ,NULL );if (!obd_device_cachep) goto out;LASSERT (!obdo_cachep); obdo_cachep =kmem_cache_create ("ll_obdo_cache" ,sizeof (struct obdo ), -0 ,0 ,NULL ); +0 ,0 ,NULL );if (!obdo_cachep) goto out;LASSERT (!import_cachep); import_cachep =kmem_cache_create ("ll_import_cache" , -sizeof (struct obd_import ), -0 ,0 ,NULL ); +sizeof (struct obd_import ), +0 ,0 ,NULL );if (!import_cachep) goto out;
@@ -828,7 +828,7 @@ EXPORT_SYMBOL(class_unlink_export);static void class_import_destroy (struct obd_import *imp) {CDEBUG (D_IOCTL ,"destroying import %p for %s\n" , imp, - imp->imp_obd->obd_name); + imp->imp_obd->obd_name);LASSERT_ATOMIC_ZERO (&imp->imp_refcount);
@@ -838,7 +838,7 @@ static void class_import_destroy(struct obd_import *imp)struct obd_import_conn *imp_conn; imp_conn =list_entry (imp->imp_conn_list.next, - struct obd_import_conn, oic_item); + struct obd_import_conn, oic_item);list_del_init (&imp_conn->oic_item);ptlrpc_put_connection_superhack (imp_conn->oic_conn);kfree (imp_conn);
@@ -1125,16 +1125,16 @@ static void obd_zombie_impexp_cull(void) import =NULL ;if (!list_empty (&obd_zombie_imports)) { import =list_entry (obd_zombie_imports.next, - struct obd_import, - imp_zombie_chain); + struct obd_import, + imp_zombie_chain);list_del_init (&import->imp_zombie_chain); } export =NULL ;if (!list_empty (&obd_zombie_exports)) { export =list_entry (obd_zombie_exports.next, - struct obd_export, - exp_obd_chain); + struct obd_export, + exp_obd_chain);list_del_init (&export->exp_obd_chain); }
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +4 -4
@@ -62,8 +62,8 @@ struct static_lustre_uintvalue_attr { };static ssize_t static_uintvalue_show (struct kobject *kobj, -struct attribute *attr, -char *buf) +struct attribute *attr, +char *buf) {struct static_lustre_uintvalue_attr *lattr = (void *)attr;
@@ -71,8 +71,8 @@ static ssize_t static_uintvalue_show(struct kobject *kobj, }static ssize_t static_uintvalue_store (struct kobject *kobj, -struct attribute *attr, -const char *buffer,size_t count) +struct attribute *attr, +const char *buffer,size_t count) {struct static_lustre_uintvalue_attr *lattr = (void *)attr;int rc;
drivers/staging/lustre/lustre/obdclass/llog_cat.c +2 -2
@@ -74,7 +74,7 @@ static int llog_cat_id2handle(const struct lu_env *env,down_write (&cathandle->lgh_lock);list_for_each_entry (loghandle, &cathandle->u.chd.chd_head, - u.phd.phd_entry) { + u.phd.phd_entry) {struct llog_logid *cgl = &loghandle->lgh_id; if (ostid_id(&cgl->lgl_oi) == ostid_id(&logid->lgl_oi) &&
@@ -130,7 +130,7 @@ int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle)int rc;list_for_each_entry_safe (loghandle, n, &cathandle->u.chd.chd_head, - u.phd.phd_entry) { + u.phd.phd_entry) {/* unlink open-not-created llogs */ list_del_init (&loghandle->u.phd.phd_entry);llog_close (env, loghandle);
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +62 -63
199 lines not on this page · raw message
drivers/staging/lustre/lustre/obdclass/lu_object.c +1 -2
@@ -1473,8 +1473,7 @@ void lu_context_key_quiesce(struct lu_context_key *key)* XXX memory barrier has to go here. */ spin_lock (&lu_keys_guard); -list_for_each_entry (ctx, &lu_context_remembered, - lc_remember) +list_for_each_entry (ctx, &lu_context_remembered, lc_remember)key_fini (ctx, key->lct_index);spin_unlock (&lu_keys_guard); ++key_set_version;
drivers/staging/lustre/lustre/obdclass/lustre_peer.c +1 -1
@@ -173,7 +173,7 @@ int class_del_uuid(const char *uuid)while (!list_empty (&deathrow)) { data = list_entry(deathrow.next, struct uuid_nid_data, - un_list); + un_list);list_del (&data->un_list); CDEBUG(D_INFO, "del uuid %s %s/%d\n",
drivers/staging/lustre/lustre/obdclass/obd_config.c +3 -3
@@ -1049,9 +1049,9 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, rc =0 ; }else {CDEBUG (D_CONFIG ,"%s.%.*s: Set parameter %.*s=%s\n" , -lustre_cfg_string (lcfg,0 ), - (int )strlen (prefix) -1 , prefix, - (int )(sval - key -1 ), key, sval); +lustre_cfg_string (lcfg,0 ), + (int )strlen (prefix) -1 , prefix, + (int )(sval - key -1 ), key, sval); } }
drivers/staging/lustre/lustre/obdclass/obd_mount.c +4 -4
@@ -72,7 +72,7 @@ static void (*kill_super_cb)(struct super_block *sb);* this log, and is added to the mgc's list of logs to follow. */ int lustre_process_log (struct super_block *sb,char *logname, -struct config_llog_instance *cfg) +struct config_llog_instance *cfg) {struct lustre_cfg *lcfg;struct lustre_cfg_bufs *bufs;
@@ -114,7 +114,7 @@ EXPORT_SYMBOL(lustre_process_log);/* Stop watching this config log for updates */ int lustre_end_log (struct super_block *sb,char *logname, -struct config_llog_instance *cfg) +struct config_llog_instance *cfg) {struct lustre_cfg *lcfg;struct lustre_cfg_bufs bufs;
@@ -340,7 +340,7 @@ int lustre_start_mgc(struct super_block *sb)/* Add any failover MGS nids */ i =1 ;while (ptr && ((*ptr ==':' || -class_find_param (ptr,PARAM_MGSNODE , &ptr) ==0 ))) { +class_find_param (ptr,PARAM_MGSNODE , &ptr) ==0 ))) {/* New failover node */ sprintf (niduuid,"%s_%x" , mgcname, i); j =0 ;
@@ -1181,7 +1181,7 @@ EXPORT_SYMBOL(lustre_register_kill_super_cb);/***************** FS registration ******************/ static struct dentry *lustre_mount (struct file_system_type *fs_type,int flags, -const char *devname,void *data) +const char *devname,void *data) {struct lustre_mount_data2 lmd2 = { .lmd2_data = data,
Signature · 1 line
2.1.0
PATCH 17/25 staging/lustre/lov: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- .../staging/lustre/lustre/lov/lov_cl_internal.h | 87 +++++++++++----------- drivers/staging/lustre/lustre/lov/lov_ea.c | 2 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 6 +- drivers/staging/lustre/lustre/lov/lov_io.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 7 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 35 ++++----- drivers/staging/lustre/lustre/lov/lov_object.c | 40 +++++----- drivers/staging/lustre/lustre/lov/lov_offset.c | 3 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 7 +- drivers/staging/lustre/lustre/lov/lov_page.c | 3 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 4 +- drivers/staging/lustre/lustre/lov/lovsub_lock.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_page.c | 2 +- drivers/staging/lustre/lustre/lov/lproc_lov.c | 16 ++-- 14 files changed, 106 insertions(+), 110 deletions(-)
drivers/staging/lustre/lustre/lov/lov_cl_internal.h +42 -45
@@ -579,51 +579,49 @@ extern struct kmem_cache *lovsub_req_kmem;extern struct kmem_cache *lov_lock_link_kmem; -int lov_object_init (const struct lu_env *env,struct lu_object *obj, -const struct lu_object_conf *conf); -int lovsub_object_init (const struct lu_env *env,struct lu_object *obj, -const struct lu_object_conf *conf); -int lov_lock_init (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io); -int lov_io_init (const struct lu_env *env,struct cl_object *obj, -struct cl_io *io); -int lovsub_lock_init (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io); - -int lov_lock_init_raid0 (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io); -int lov_lock_init_empty (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io); -int lov_io_init_raid0 (const struct lu_env *env,struct cl_object *obj, -struct cl_io *io); -int lov_io_init_empty (const struct lu_env *env,struct cl_object *obj, -struct cl_io *io); -int lov_io_init_released (const struct lu_env *env,struct cl_object *obj, -struct cl_io *io); -void lov_lock_unlink (const struct lu_env *env,struct lov_lock_link *link, -struct lovsub_lock *sub); +int lov_object_init (const struct lu_env *env,struct lu_object *obj, +const struct lu_object_conf *conf); +int lovsub_object_init (const struct lu_env *env,struct lu_object *obj, +const struct lu_object_conf *conf); +int lov_lock_init (const struct lu_env *env,struct cl_object *obj, +struct cl_lock *lock,const struct cl_io *io); +int lov_io_init (const struct lu_env *env,struct cl_object *obj, +struct cl_io *io); +int lovsub_lock_init (const struct lu_env *env,struct cl_object *obj, +struct cl_lock *lock,const struct cl_io *io); + +int lov_lock_init_raid0 (const struct lu_env *env,struct cl_object *obj, +struct cl_lock *lock,const struct cl_io *io); +int lov_lock_init_empty (const struct lu_env *env,struct cl_object *obj, +struct cl_lock *lock,const struct cl_io *io); +int lov_io_init_raid0 (const struct lu_env *env,struct cl_object *obj, +struct cl_io *io); +int lov_io_init_empty (const struct lu_env *env,struct cl_object *obj, +struct cl_io *io); +int lov_io_init_released (const struct lu_env *env,struct cl_object *obj, +struct cl_io *io); +void lov_lock_unlink (const struct lu_env *env,struct lov_lock_link *link, +struct lovsub_lock *sub);struct lov_io_sub *lov_sub_get (const struct lu_env *env,struct lov_io *lio,int stripe); -void lov_sub_put (struct lov_io_sub *sub); -int lov_sublock_modify (const struct lu_env *env,struct lov_lock *lov, -struct lovsub_lock *sublock, -const struct cl_lock_descr *d,int idx); - -int lov_page_init (const struct lu_env *env,struct cl_object *ob, -struct cl_page *page,struct page *vmpage); -int lovsub_page_init (const struct lu_env *env,struct cl_object *ob, -struct cl_page *page,struct page *vmpage); - -int lov_page_init_empty (const struct lu_env *env, -struct cl_object *obj, -struct cl_page *page,struct page *vmpage); -int lov_page_init_raid0 (const struct lu_env *env, -struct cl_object *obj, -struct cl_page *page,struct page *vmpage); +void lov_sub_put (struct lov_io_sub *sub); +int lov_sublock_modify (const struct lu_env *env,struct lov_lock *lov, +struct lovsub_lock *sublock, +const struct cl_lock_descr *d,int idx); + +int lov_page_init (const struct lu_env *env,struct cl_object *ob, +struct cl_page *page,struct page *vmpage); +int lovsub_page_init (const struct lu_env *env,struct cl_object *ob, +struct cl_page *page,struct page *vmpage); + +int lov_page_init_empty (const struct lu_env *env,struct cl_object *obj, +struct cl_page *page,struct page *vmpage); +int lov_page_init_raid0 (const struct lu_env *env,struct cl_object *obj, +struct cl_page *page,struct page *vmpage);struct lu_object *lov_object_alloc (const struct lu_env *env, -const struct lu_object_header *hdr, -struct lu_device *dev); +const struct lu_object_header *hdr, +struct lu_device *dev);struct lu_object *lovsub_object_alloc (const struct lu_env *env,const struct lu_object_header *hdr,struct lu_device *dev);
@@ -631,9 +629,8 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env,struct lov_lock_link *lov_lock_link_find (const struct lu_env *env,struct lov_lock *lck,struct lovsub_lock *sub); -struct lov_io_sub *lov_page_subio (const struct lu_env *env, -struct lov_io *lio, -const struct cl_page_slice *slice); +struct lov_io_sub *lov_page_subio (const struct lu_env *env,struct lov_io *lio, +const struct cl_page_slice *slice);#define lov_foreach_target (lov, var) \ for (var = 0; var < lov_targets_nr(lov); ++var)
@@ -798,7 +795,7 @@ static inline struct cl_page *lov_sub_page(const struct cl_page_slice *slice) }static inline struct lov_io *cl2lov_io (const struct lu_env *env, -const struct cl_io_slice *ios) +const struct cl_io_slice *ios) {struct lov_io *lio;
drivers/staging/lustre/lustre/lov/lov_ea.c +1 -1
@@ -141,7 +141,7 @@ static void lsm_unpackmd_common(struct lov_stripe_md *lsm,static void lsm_stripe_by_index_plain (struct lov_stripe_md *lsm,int *stripeno, -u64 *lov_off,u64 *swidth) +u64 *lov_off,u64 *swidth) {if (swidth) *swidth = (u64 )lsm->lsm_stripe_size * lsm->lsm_stripe_count;
drivers/staging/lustre/lustre/lov/lov_internal.h +2 -4
@@ -138,12 +138,10 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm, struct ost_lvb *lvb, __u64 *kms_place);/* lov_offset.c */ -u64 lov_stripe_size (struct lov_stripe_md *lsm,u64 ost_size, -int stripeno); +u64 lov_stripe_size (struct lov_stripe_md *lsm,u64 ost_size,int stripeno);int lov_stripe_offset (struct lov_stripe_md *lsm,u64 lov_off,int stripeno,u64 *u64); -u64 lov_size_to_stripe (struct lov_stripe_md *lsm,u64 file_size, -int stripeno); +u64 lov_size_to_stripe (struct lov_stripe_md *lsm,u64 file_size,int stripeno);int lov_stripe_intersects (struct lov_stripe_md *lsm,int stripeno,u64 start,u64 end,u64 *obd_start,u64 *obd_end);
drivers/staging/lustre/lustre/lov/lov_io.c +1 -1
@@ -947,7 +947,7 @@ int lov_io_init_empty(const struct lu_env *env, struct cl_object *obj, }int lov_io_init_released (const struct lu_env *env,struct cl_object *obj, -struct cl_io *io) +struct cl_io *io) {struct lov_object *lov =cl2lov (obj);struct lov_io *lio =lov_env_io (env);
drivers/staging/lustre/lustre/lov/lov_lock.c +4 -3
@@ -683,7 +683,7 @@ static int lov_lock_unuse(const struct lu_env *env, }static void lov_lock_cancel (const struct lu_env *env, -const struct cl_lock_slice *slice) +const struct cl_lock_slice *slice) {struct lov_lock *lck =cl2lov_lock (slice);struct cl_lock_closure *closure =lov_closure_get (env, slice->cls_lock);
@@ -1125,7 +1125,8 @@ static void lov_empty_lock_fini(const struct lu_env *env, }static int lov_empty_lock_print (const struct lu_env *env,void *cookie, -lu_printer_t p,const struct cl_lock_slice *slice) +lu_printer_t p, +const struct cl_lock_slice *slice) { (*p)(env, cookie,"empty\n" );return 0 ;
@@ -1138,7 +1139,7 @@ static const struct cl_lock_operations lov_empty_lock_ops = { };int lov_lock_init_empty (const struct lu_env *env,struct cl_object *obj, -struct cl_lock *lock,const struct cl_io *io) +struct cl_lock *lock,const struct cl_io *io) {struct lov_lock *lck;int result = -ENOMEM ;
drivers/staging/lustre/lustre/lov/lov_obd.c +18 -17
@@ -265,7 +265,7 @@ static int lov_disconnect_obd(struct obd_device *obd, struct lov_tgt_desc *tgt) osc_obd =class_exp2obd (tgt->ltd_exp);CDEBUG (D_CONFIG ,"%s: disconnecting target %s\n" , - obd->obd_name, osc_obd ? osc_obd->obd_name :"NULL" ); + obd->obd_name, osc_obd ? osc_obd->obd_name :"NULL" );if (tgt->ltd_active) { tgt->ltd_active =0 ;
@@ -594,7 +594,7 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,mutex_unlock (&lov->lov_lock);CDEBUG (D_CONFIG ,"idx=%d ltd_gen=%d ld_tgt_count=%d\n" , - index, tgt->ltd_gen, lov->desc.ld_tgt_count); + index, tgt->ltd_gen, lov->desc.ld_tgt_count); rc =obd_notify (obd, tgt_obd,OBD_NOTIFY_CREATE , &index);
@@ -620,9 +620,9 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,if (lov->lov_cache) { rc =obd_set_info_async (NULL , tgt->ltd_exp, -sizeof (KEY_CACHE_SET ),KEY_CACHE_SET , -sizeof (struct cl_client_cache ), lov->lov_cache, -NULL ); +sizeof (KEY_CACHE_SET ),KEY_CACHE_SET , +sizeof (struct cl_client_cache ), + lov->lov_cache,NULL );if (rc <0 ) goto out; }
@@ -1133,7 +1133,7 @@ static int lov_getattr_interpret(struct ptlrpc_request_set *rqset, }static int lov_getattr_async (struct obd_export *exp,struct obd_info *oinfo, -struct ptlrpc_request_set *rqset) +struct ptlrpc_request_set *rqset) {struct lov_request_set *lovset;struct lov_obd *lov;
@@ -1414,8 +1414,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,/* copy UUID */ if (copy_to_user (data->ioc_pbuf2,obd2cli_tgt (osc_obd), -min ((int ) data->ioc_plen2, - (int )sizeof (struct obd_uuid )))) +min ((int )data->ioc_plen2, + (int )sizeof (struct obd_uuid ))))return -EFAULT ;memcpy (&flags, data->ioc_inlbuf1,sizeof (__u32));
@@ -1428,8 +1428,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,if (rc)return rc;if (copy_to_user (data->ioc_pbuf1, &stat_buf, -min ((int ) data->ioc_plen1, - (int )sizeof (stat_buf)))) +min ((int )data->ioc_plen1, + (int )sizeof (stat_buf))))return -EFAULT ;break ; }
@@ -1762,7 +1762,8 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key, fm_end = fm_key->oa.o_size; last_stripe =fiemap_calc_last_stripe (lsm, fm_start, fm_end, - actual_start_stripe, &stripe_count); + actual_start_stripe, + &stripe_count); fm_end_offset =fiemap_calc_fm_end_offset (fiemap, lsm, fm_start, fm_end, &start_stripe);
@@ -2130,12 +2131,12 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp,/* Only want a specific OSC */ if (mgi->uuid && !obd_uuid_equals (mgi->uuid, - &tgt->ltd_uuid)) + &tgt->ltd_uuid))continue ; err =obd_set_info_async (env, tgt->ltd_exp, - keylen, key,sizeof (int ), - &mgi->group, set); + keylen, key,sizeof (int ), + &mgi->group, set); }else if (next_id) { err = obd_set_info_async(env, tgt->ltd_exp, keylen, key, vallen,
@@ -2147,7 +2148,7 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp,continue ; err =obd_set_info_async (env, tgt->ltd_exp, - keylen, key, vallen, val, set); + keylen, key, vallen, val, set); }if (!rc)
@@ -2337,8 +2338,8 @@ static int __init lov_init(void)return rc; lov_oinfo_slab =kmem_cache_create ("lov_oinfo" , -sizeof (struct lov_oinfo ), -0 ,SLAB_HWCACHE_ALIGN ,NULL ); +sizeof (struct lov_oinfo ), +0 ,SLAB_HWCACHE_ALIGN ,NULL );if (!lov_oinfo_slab) {lu_kmem_fini (lov_caches);return -ENOMEM ;
drivers/staging/lustre/lustre/lov/lov_object.c +20 -20
@@ -59,7 +59,7 @@ struct lov_layout_operations {const struct cl_object_conf *conf, union lov_layout_state *state);int (*llo_delete)(const struct lu_env *env,struct lov_object *lov, -union lov_layout_state *state); +union lov_layout_state *state);void (*llo_fini)(const struct lu_env *env,struct lov_object *lov,union lov_layout_state *state); void (*llo_install)(const struct lu_env *env, struct lov_object *lov,
@@ -67,7 +67,7 @@ struct lov_layout_operations {int (*llo_print)(const struct lu_env *env,void *cookie,lu_printer_t p,const struct lu_object *o);int (*llo_page_init)(const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *vmpage); +struct cl_page *page,struct page *vmpage);int (*llo_lock_init)(const struct lu_env *env,struct cl_object *obj,struct cl_lock *lock,const struct cl_io *io);
@@ -266,9 +266,9 @@ out: }static int lov_init_released (const struct lu_env *env, -struct lov_device *dev,struct lov_object *lov, -const struct cl_object_conf *conf, -union lov_layout_state *state) +struct lov_device *dev,struct lov_object *lov, +const struct cl_object_conf *conf, +union lov_layout_state *state) {struct lov_stripe_md *lsm = conf->u.coc_md->lsm;
@@ -389,7 +389,7 @@ static void lov_fini_raid0(const struct lu_env *env, struct lov_object *lov, }static void lov_fini_released (const struct lu_env *env,struct lov_object *lov, -union lov_layout_state *state) +union lov_layout_state *state) {dump_lsm (D_INODE , lov->lo_lsm);lov_free_memmd (&lov->lo_lsm);
@@ -411,9 +411,9 @@ static int lov_print_raid0(const struct lu_env *env, void *cookie,int i; (*p)(env, cookie,"stripes: %d, %s, lsm{%p 0x%08X %d %u %u}:\n" , - r0->lo_nr, lov->lo_layout_invalid ?"invalid" :"valid" , lsm, - lsm->lsm_magic,atomic_read (&lsm->lsm_refc), - lsm->lsm_stripe_count, lsm->lsm_layout_gen); + r0->lo_nr, lov->lo_layout_invalid ?"invalid" :"valid" , lsm, + lsm->lsm_magic,atomic_read (&lsm->lsm_refc), + lsm->lsm_stripe_count, lsm->lsm_layout_gen);for (i =0 ; i < r0->lo_nr; ++i) {struct lu_object *sub;
@@ -428,16 +428,16 @@ static int lov_print_raid0(const struct lu_env *env, void *cookie, }static int lov_print_released (const struct lu_env *env,void *cookie, -lu_printer_t p,const struct lu_object *o) +lu_printer_t p,const struct lu_object *o) {struct lov_object *lov =lu2lov (o);struct lov_stripe_md *lsm = lov->lo_lsm; (*p)(env, cookie, -"released: %s, lsm{%p 0x%08X %d %u %u}:\n" , - lov->lo_layout_invalid ?"invalid" :"valid" , lsm, - lsm->lsm_magic,atomic_read (&lsm->lsm_refc), - lsm->lsm_stripe_count, lsm->lsm_layout_gen); +"released: %s, lsm{%p 0x%08X %d %u %u}:\n" , + lov->lo_layout_invalid ?"invalid" :"valid" , lsm, + lsm->lsm_magic,atomic_read (&lsm->lsm_refc), + lsm->lsm_stripe_count, lsm->lsm_layout_gen);return 0 ; }
@@ -646,9 +646,9 @@ static int lov_layout_wait(const struct lu_env *env, struct lov_object *lov)struct l_wait_info lwi = {0 };while (atomic_read (&lov->lo_active_ios) >0 ) { -CDEBUG (D_INODE ,"file:" DFID " wait for active IO, now: %d.\n" , -PFID (lu_object_fid (lov2lu (lov))), -atomic_read (&lov->lo_active_ios)); +CDEBUG (D_INODE ,"file:" DFID " wait for active IO, now: %d.\n" , +PFID (lu_object_fid (lov2lu (lov))), +atomic_read (&lov->lo_active_ios));l_wait_event (lov->lo_waitq,atomic_read (&lov->lo_active_ios) ==0 , &lwi);
@@ -825,7 +825,7 @@ static int lov_object_print(const struct lu_env *env, void *cookie, }int lov_page_init (const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *vmpage) +struct cl_page *page,struct page *vmpage) {return LOV_2DISPATCH_NOLOCK (cl2lov (obj), llo_page_init, env, obj, page, vmpage);
@@ -924,8 +924,8 @@ static struct lov_stripe_md *lov_lsm_addref(struct lov_object *lov)if (lov->lo_lsm) { lsm =lsm_addref (lov->lo_lsm);CDEBUG (D_INODE ,"lsm %p addref %d/%d by %p.\n" , - lsm,atomic_read (&lsm->lsm_refc), - lov->lo_layout_invalid, current); + lsm,atomic_read (&lsm->lsm_refc), + lov->lo_layout_invalid, current); }lov_conf_thaw (lov);return lsm;
drivers/staging/lustre/lustre/lov/lov_offset.c +1 -2
@@ -43,8 +43,7 @@#include "lov_internal.h" /* compute object size given "stripeno" and the ost size */ -u64 lov_stripe_size (struct lov_stripe_md *lsm,u64 ost_size, -int stripeno) +u64 lov_stripe_size (struct lov_stripe_md *lsm,u64 ost_size,int stripeno) {unsigned long ssize = lsm->lsm_stripe_size;unsigned long stripe_size;
drivers/staging/lustre/lustre/lov/lov_pack.c +4 -3
@@ -134,7 +134,7 @@ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,if ((lmm_magic !=LOV_MAGIC_V1 ) && (lmm_magic !=LOV_MAGIC_V3 )) {CERROR ("bad mem LOV MAGIC: 0x%08X != 0x%08X nor 0x%08X\n" , - lmm_magic,LOV_MAGIC_V1 ,LOV_MAGIC_V3 ); + lmm_magic,LOV_MAGIC_V1 ,LOV_MAGIC_V3 );return -EINVAL ; }
@@ -145,7 +145,7 @@ int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,*/ if (!lmmp) { stripe_count =lov_get_stripecnt (lov, lmm_magic, - lsm->lsm_stripe_count); + lsm->lsm_stripe_count); lsm->lsm_stripe_count = stripe_count; }else if (!lsm_is_released (lsm)) { stripe_count = lsm->lsm_stripe_count;
@@ -267,7 +267,8 @@ static int lov_verify_lmm(void *lmm, int lmm_bytes, __u16 *stripe_count)return -EINVAL ; } rc =lsm_op_find (le32_to_cpu (*(__u32 *)lmm))->lsm_lmm_verify (lmm, - lmm_bytes, stripe_count); + lmm_bytes, + stripe_count);return rc; }
drivers/staging/lustre/lustre/lov/lov_page.c +1 -2
@@ -172,8 +172,7 @@ int lov_page_init_raid0(const struct lu_env *env, struct cl_object *obj, offset =cl_offset (obj, page->cp_index); stripe =lov_stripe_number (loo->lo_lsm, offset);LASSERT (stripe < r0->lo_nr); - rc =lov_stripe_offset (loo->lo_lsm, offset, stripe, - &suboff); + rc =lov_stripe_offset (loo->lo_lsm, offset, stripe, &suboff);LASSERT (rc ==0 ); lpg->lps_invalid =1 ;
drivers/staging/lustre/lustre/lov/lov_pool.c +2 -2
@@ -444,7 +444,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)lov_pool_putref (new_pool); }CDEBUG (D_INFO ,"pool %p - proc %p\n" , - new_pool, new_pool->pool_debugfs_entry); + new_pool, new_pool->pool_debugfs_entry);spin_lock (&obd->obd_dev_lock);list_add_tail (&new_pool->pool_list, &lov->lov_pool_list);
@@ -638,7 +638,7 @@ struct pool_desc *lov_find_pool(struct lov_obd *lov, char *poolname) poolname);if (pool && (pool_tgt_count (pool) ==0 )) {CWARN ("Request for an empty pool (" LOV_POOLNAMEF ")\n" , - poolname); + poolname);/* pool is ignored, so we remove ref on it */ lov_pool_putref (pool); pool =NULL ;
drivers/staging/lustre/lustre/lov/lovsub_lock.c +1 -1
@@ -404,7 +404,7 @@ static void lovsub_lock_delete(const struct lu_env *env, restart =0 ;list_for_each_entry_safe (scan, temp, - &sub->lss_parents, lll_list) { + &sub->lss_parents, lll_list) { lov = scan->lll_super; subdata = &lov->lls_sub[scan->lll_idx];lovsub_parent_lock (env, lov);
drivers/staging/lustre/lustre/lov/lovsub_page.c +1 -1
@@ -60,7 +60,7 @@ static const struct cl_page_operations lovsub_page_ops = { };int lovsub_page_init (const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *unused) +struct cl_page *page,struct page *unused) {struct lovsub_page *lsb =cl_object_page_slice (obj, page);
drivers/staging/lustre/lustre/lov/lproc_lov.c +8 -8
@@ -53,8 +53,8 @@ static int lov_stripesize_seq_show(struct seq_file *m, void *v) }static ssize_t lov_stripesize_seq_write (struct file *file, -const char __user *buffer, -size_t count,loff_t *off) +const char __user *buffer, +size_t count,loff_t *off) {struct obd_device *dev = ((struct seq_file *)file->private_data)->private;struct lov_desc *desc;
@@ -86,8 +86,8 @@ static int lov_stripeoffset_seq_show(struct seq_file *m, void *v) }static ssize_t lov_stripeoffset_seq_write (struct file *file, -const char __user *buffer, -size_t count,loff_t *off) +const char __user *buffer, +size_t count,loff_t *off) {struct obd_device *dev = ((struct seq_file *)file->private_data)->private;struct lov_desc *desc;
@@ -118,8 +118,8 @@ static int lov_stripetype_seq_show(struct seq_file *m, void *v) }static ssize_t lov_stripetype_seq_write (struct file *file, -const char __user *buffer, -size_t count,loff_t *off) +const char __user *buffer, +size_t count,loff_t *off) {struct obd_device *dev = ((struct seq_file *)file->private_data)->private;struct lov_desc *desc;
@@ -150,8 +150,8 @@ static int lov_stripecount_seq_show(struct seq_file *m, void *v) }static ssize_t lov_stripecount_seq_write (struct file *file, -const char __user *buffer, -size_t count,loff_t *off) +const char __user *buffer, +size_t count,loff_t *off) {struct obd_device *dev = ((struct seq_file *)file->private_data)->private;struct lov_desc *desc;
Signature · 1 line
2.1.0
PATCH 18/25 staging/lustre/mdc: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 26 +++++++++++------------- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 12 +++++------ 4 files changed, 20 insertions(+), 22 deletions(-)
drivers/staging/lustre/lustre/mdc/mdc_internal.h +1 -1
@@ -53,7 +53,7 @@ void mdc_readdir_pack(struct ptlrpc_request *req, __u64 pgoff, __u32 size,void mdc_getattr_pack (struct ptlrpc_request *req,__u64 valid,int flags,struct md_op_data *data,int ea_size);void mdc_setattr_pack (struct ptlrpc_request *req,struct md_op_data *op_data, -void *ea,int ealen,void *ea2,int ea2len); +void *ea,int ealen,void *ea2,int ea2len);void mdc_create_pack (struct ptlrpc_request *req,struct md_op_data *op_data,const void *data,int datalen,__u32 mode,__u32 uid,__u32 gid,cfs_cap_t capability,__u64 rdev);
drivers/staging/lustre/lustre/mdc/mdc_locks.c +12 -14
@@ -366,7 +366,7 @@ mdc_intent_getxattr_pack(struct obd_export *exp,LIST_HEAD (cancels); req =ptlrpc_request_alloc (class_exp2cliimp (exp), - &RQF_LDLM_INTENT_GETXATTR ); + &RQF_LDLM_INTENT_GETXATTR );if (!req)return ERR_PTR (-ENOMEM );
@@ -386,14 +386,12 @@ mdc_intent_getxattr_pack(struct obd_export *exp,mdc_pack_body (req, &op_data->op_fid1, op_data->op_valid, maxdata,-1 ,0 ); -req_capsule_set_size (&req->rq_pill, &RMF_EADATA , -RCL_SERVER , maxdata); +req_capsule_set_size (&req->rq_pill, &RMF_EADATA ,RCL_SERVER , maxdata); -req_capsule_set_size (&req->rq_pill, &RMF_EAVALS , -RCL_SERVER , maxdata); +req_capsule_set_size (&req->rq_pill, &RMF_EAVALS ,RCL_SERVER , maxdata);req_capsule_set_size (&req->rq_pill, &RMF_EAVALS_LENS , -RCL_SERVER , maxdata); +RCL_SERVER , maxdata);ptlrpc_request_set_replen (req);
@@ -439,8 +437,8 @@ static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp, }static struct ptlrpc_request *mdc_intent_getattr_pack (struct obd_export *exp, -struct lookup_intent *it, -struct md_op_data *op_data) +struct lookup_intent *it, +struct md_op_data *op_data) {struct ptlrpc_request *req;struct obd_device *obddev =class_exp2obd (exp);
@@ -498,7 +496,7 @@ static struct ptlrpc_request *mdc_intent_layout_pack(struct obd_export *exp,int rc; req =ptlrpc_request_alloc (class_exp2cliimp (exp), - &RQF_LDLM_INTENT_LAYOUT ); + &RQF_LDLM_INTENT_LAYOUT );if (!req)return ERR_PTR (-ENOMEM );
@@ -718,7 +716,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,void *lmm;LDLM_DEBUG (lock,"layout lock returned by: %s, lvb_len: %d\n" , -ldlm_it2str (it->it_op), lvb_len); +ldlm_it2str (it->it_op), lvb_len); lmm =libcfs_kvzalloc (lvb_len,GFP_NOFS );if (!lmm) {
@@ -1094,7 +1092,7 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, } mode =mdc_lock_match (exp,LDLM_FL_BLOCK_GRANTED , fid, -LDLM_IBITS , &policy, +LDLM_IBITS , &policy,LCK_CR |LCK_CW |LCK_PR |LCK_PW , &lockh); }
@@ -1264,9 +1262,9 @@ int mdc_intent_getattr_async(struct obd_export *exp,__u64 flags =LDLM_FL_HAS_INTENT ;CDEBUG (D_DLMTRACE , -"name: %.*s in inode " DFID ", intent: %s flags %#Lo\n" , - op_data->op_namelen, op_data->op_name,PFID (&op_data->op_fid1), -ldlm_it2str (it->it_op), it->it_flags); +"name: %.*s in inode " DFID ", intent: %s flags %#Lo\n" , + op_data->op_namelen, op_data->op_name,PFID (&op_data->op_fid1), +ldlm_it2str (it->it_op), it->it_flags);fid_build_reg_res_name (&op_data->op_fid1, &res_id); req =mdc_intent_getattr_pack (exp, it, op_data);
drivers/staging/lustre/lustre/mdc/mdc_reint.c +1 -1
@@ -422,7 +422,7 @@ int mdc_rename(struct obd_export *exp, struct md_op_data *op_data, &cancels,LCK_EX , MDS_INODELOCK_LOOKUP);if ((op_data->op_flags &MF_MDC_CANCEL_FID4 ) && - (fid_is_sane (&op_data->op_fid4))) + (fid_is_sane (&op_data->op_fid4))) count +=mdc_resource_get_unused (exp, &op_data->op_fid4, &cancels,LCK_EX ,MDS_INODELOCK_FULL );
drivers/staging/lustre/lustre/mdc/mdc_request.c +6 -6
@@ -165,7 +165,7 @@ static int mdc_getattr_common(struct obd_export *exp, }static int mdc_getattr (struct obd_export *exp,struct md_op_data *op_data, -struct ptlrpc_request **request) +struct ptlrpc_request **request) {struct ptlrpc_request *req;int rc;
@@ -207,7 +207,7 @@ static int mdc_getattr(struct obd_export *exp, struct md_op_data *op_data, }static int mdc_getattr_name (struct obd_export *exp,struct md_op_data *op_data, -struct ptlrpc_request **request) +struct ptlrpc_request **request) {struct ptlrpc_request *req;int rc;
@@ -1036,8 +1036,8 @@ restart_bulk:if (req->rq_bulk->bd_nob_transferred & ~LU_PAGE_MASK ) {CERROR ("Unexpected # bytes transferred: %d (%ld expected)\n" , - req->rq_bulk->bd_nob_transferred, -PAGE_CACHE_SIZE * op_data->op_npages); + req->rq_bulk->bd_nob_transferred, +PAGE_CACHE_SIZE * op_data->op_npages);ptlrpc_req_finished (req);return -EPROTO ; }
@@ -1815,7 +1815,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,/* copy UUID */ if (copy_to_user (data->ioc_pbuf2,obd2cli_tgt (obd),min_t (size_t, data->ioc_plen2, -sizeof (struct obd_uuid )))) { +sizeof (struct obd_uuid )))) { rc = -EFAULT ; goto out; }
@@ -1828,7 +1828,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,if (copy_to_user (data->ioc_pbuf1, &stat_buf,min_t (size_t, data->ioc_plen1, -sizeof (stat_buf)))) { +sizeof (stat_buf)))) { rc = -EFAULT ; goto out; }
Signature · 1 line
2.1.0
PATCH 19/25 staging/lustre/mgc: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/mgc/mgc_request.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/staging/lustre/lustre/mgc/mgc_request.c +14 -14
@@ -245,10 +245,10 @@ struct config_llog_data *do_config_log_add(struct obd_device *obd,return cld; } -static struct config_llog_data *config_recover_log_add (struct obd_device *obd, -char *fsname, -struct config_llog_instance *cfg, -struct super_block *sb) +static struct config_llog_data * +config_recover_log_add (struct obd_device *obd,char *fsname, +struct config_llog_instance *cfg, +struct super_block *sb) {struct config_llog_instance lcfg = *cfg;struct config_llog_data *cld;
@@ -266,8 +266,9 @@ static struct config_llog_data *config_recover_log_add(struct obd_device *obd,return cld; } -static struct config_llog_data *config_params_log_add (struct obd_device *obd, -struct config_llog_instance *cfg,struct super_block *sb) +static struct config_llog_data * +config_params_log_add (struct obd_device *obd, +struct config_llog_instance *cfg,struct super_block *sb) {struct config_llog_instance lcfg = *cfg;struct config_llog_data *cld;
@@ -454,16 +455,16 @@ int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data) ocd = &imp->imp_connect_data;seq_printf (m,"imperative_recovery: %s\n" , -OCD_HAS_FLAG (ocd,IMP_RECOV ) ?"ENABLED" :"DISABLED" ); +OCD_HAS_FLAG (ocd,IMP_RECOV ) ?"ENABLED" :"DISABLED" );seq_printf (m,"client_state:\n" );spin_lock (&config_list_lock);list_for_each_entry (cld, &config_llog_list, cld_list_chain) {if (!cld->cld_recover)continue ; -seq_printf (m," - { client: %s, nidtbl_version: %u }\n" , - cld->cld_logname, - cld->cld_recover->cld_cfg.cfg_last_idx); +seq_printf (m," - { client: %s, nidtbl_version: %u }\n" , + cld->cld_logname, + cld->cld_recover->cld_cfg.cfg_last_idx); }spin_unlock (&config_list_lock);
@@ -555,8 +556,7 @@ static int mgc_requeue_thread(void *data)spin_lock (&config_list_lock); rq_state &= ~RQ_PRECLEANUP ; -list_for_each_entry (cld, &config_llog_list, - cld_list_chain) { +list_for_each_entry (cld, &config_llog_list, cld_list_chain) {if (!cld->cld_lostlock)continue ;
@@ -966,8 +966,8 @@ static int mgc_target_register(struct obd_export *exp, }static int mgc_set_info_async (const struct lu_env *env,struct obd_export *exp, -u32 keylen,void *key,u32 vallen, -void *val,struct ptlrpc_request_set *set) +u32 keylen,void *key,u32 vallen, +void *val,struct ptlrpc_request_set *set) {int rc = -EINVAL ;
Signature · 1 line
2.1.0
PATCH 20/25 staging/lustre/obdecho: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- .../staging/lustre/lustre/obdecho/echo_client.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/staging/lustre/lustre/obdecho/echo_client.c +11 -11
@@ -220,7 +220,7 @@ static struct lu_kmem_descr echo_caches[] = {* @{ */ static struct page *echo_page_vmpage (const struct lu_env *env, -const struct cl_page_slice *slice) +const struct cl_page_slice *slice) {return cl2echo_page (slice)->ep_vmpage; }
@@ -367,7 +367,7 @@ static struct cl_lock_operations echo_lock_ops = {* @{ */ static int echo_page_init (const struct lu_env *env,struct cl_object *obj, -struct cl_page *page,struct page *vmpage) +struct cl_page *page,struct page *vmpage) {struct echo_page *ep =cl_object_page_slice (obj, page);struct echo_object *eco =cl2echo_obj (obj);
@@ -529,7 +529,7 @@ static void echo_object_free(const struct lu_env *env, struct lu_object *obj) }static int echo_object_print (const struct lu_env *env,void *cookie, -lu_printer_t p,const struct lu_object *o) +lu_printer_t p,const struct lu_object *o) {struct echo_object *obj =cl2echo_obj (lu2cl (o));
@@ -621,7 +621,7 @@ static void echo_site_fini(const struct lu_env *env, struct echo_device *ed) }static void *echo_thread_key_init (const struct lu_context *ctx, -struct lu_context_key *key) +struct lu_context_key *key) {struct echo_thread_info *info;
@@ -632,7 +632,7 @@ static void *echo_thread_key_init(const struct lu_context *ctx, }static void echo_thread_key_fini (const struct lu_context *ctx, -struct lu_context_key *key,void *data) +struct lu_context_key *key,void *data) {struct echo_thread_info *info = data;
@@ -640,7 +640,7 @@ static void echo_thread_key_fini(const struct lu_context *ctx, }static void echo_thread_key_exit (const struct lu_context *ctx, -struct lu_context_key *key,void *data) +struct lu_context_key *key,void *data) { }
@@ -652,7 +652,7 @@ static struct lu_context_key echo_thread_key = { };static void *echo_session_key_init (const struct lu_context *ctx, -struct lu_context_key *key) +struct lu_context_key *key) {struct echo_session_info *session;
@@ -663,7 +663,7 @@ static void *echo_session_key_init(const struct lu_context *ctx, }static void echo_session_key_fini (const struct lu_context *ctx, -struct lu_context_key *key,void *data) +struct lu_context_key *key,void *data) {struct echo_session_info *session = data;
@@ -671,7 +671,7 @@ static void echo_session_key_fini(const struct lu_context *ctx, }static void echo_session_key_exit (const struct lu_context *ctx, -struct lu_context_key *key,void *data) +struct lu_context_key *key,void *data) { }
@@ -720,7 +720,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, tgt =class_name2obd (lustre_cfg_string (cfg,1 ));if (!tgt) {CERROR ("Can not find tgt device %s\n" , -lustre_cfg_string (cfg,1 )); +lustre_cfg_string (cfg,1 )); rc = -ENODEV ; goto out; }
@@ -796,7 +796,7 @@ out: }static int echo_device_init (const struct lu_env *env,struct lu_device *d, -const char *name,struct lu_device *next) +const char *name,struct lu_device *next) {LBUG ();return 0 ;
Signature · 1 line
2.1.0
PATCH 21/25 staging/lustre/lmv: Fix style vs open parenthesis alignment
In reply to [email protected]From: Oleg Drokin <[email protected]>
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
--- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 ++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 28 +++++++++++------------- 3 files changed, 16 insertions(+), 18 deletions(-)
drivers/staging/lustre/lustre/lmv/lmv_intent.c +1 -1
@@ -271,7 +271,7 @@ static int lmv_intent_lookup(struct obd_export *exp, op_data->op_bias &= ~MDS_CROSS_REF ; rc =md_intent_lock (tgt->ltd_exp, op_data, lmm, lmmsize, it, - flags, reqp, cb_blocking, extra_lock_flags); + flags, reqp, cb_blocking, extra_lock_flags);if (rc <0 || !*reqp)return rc;
drivers/staging/lustre/lustre/lmv/lmv_internal.h +2 -2
@@ -78,8 +78,8 @@ static inline struct lmv_stripe_md *lmv_get_mea(struct ptlrpc_request *req)if (mea->mea_count ==0 )return NULL ;if (mea->mea_magic !=MEA_MAGIC_LAST_CHAR && - mea->mea_magic !=MEA_MAGIC_ALL_CHARS && - mea->mea_magic !=MEA_MAGIC_HASH_SEGMENT ) + mea->mea_magic !=MEA_MAGIC_ALL_CHARS && + mea->mea_magic !=MEA_MAGIC_HASH_SEGMENT )return NULL ;return mea;
drivers/staging/lustre/lustre/lmv/lmv_obd.c +13 -15
@@ -339,9 +339,8 @@ static int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt) }CDEBUG (D_CONFIG ,"connect to %s(%s) - %s, %s FOR %s\n" , - mdc_obd->obd_name, mdc_obd->obd_uuid.uuid, - tgt->ltd_uuid.uuid, obd->obd_uuid.uuid, - cluuid->uuid); + mdc_obd->obd_name, mdc_obd->obd_uuid.uuid, + tgt->ltd_uuid.uuid, obd->obd_uuid.uuid, cluuid->uuid);if (!mdc_obd->obd_set_up) {CERROR ("target %s is not set up\n" , tgt->ltd_uuid.uuid);
@@ -397,8 +396,8 @@ static int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt) lmv->max_cookiesize, lmv->max_def_cookiesize);CDEBUG (D_CONFIG ,"Connected to %s(%s) successfully (%d)\n" , - mdc_obd->obd_name, mdc_obd->obd_uuid.uuid, -atomic_read (&obd->obd_refcount)); + mdc_obd->obd_name, mdc_obd->obd_uuid.uuid, +atomic_read (&obd->obd_refcount));if (lmv->lmv_tgts_kobj)/* Even if we failed to create the link, that's fine */
@@ -418,7 +417,7 @@ static void lmv_del_target(struct lmv_obd *lmv, int index) }static int lmv_add_target (struct obd_device *obd,struct obd_uuid *uuidp, -__u32 index,int gen) +__u32 index,int gen) {struct lmv_obd *lmv = &obd->u.lmv;struct lmv_tgt_desc *tgt;
@@ -776,7 +775,7 @@ static void lmv_hsm_req_build(struct lmv_obd *lmv, nr_out =0 ;for (i =0 ; i < hur_in->hur_request.hr_itemcount; i++) { curr_tgt =lmv_find_target (lmv, - &hur_in->hur_user_item[i].hui_fid); + &hur_in->hur_user_item[i].hui_fid);if (obd_uuid_equals (&curr_tgt->ltd_uuid, &tgt_mds->ltd_uuid)) { hur_out->hur_user_item[nr_out] = hur_in->hur_user_item[i];
@@ -826,8 +825,7 @@ static int lmv_hsm_ct_register(struct lmv_obd *lmv, unsigned int cmd, int len,* except if it because of inactive target. */ for (i =0 ; i < lmv->desc.ld_tgt_count; i++) { - err =obd_iocontrol (cmd, lmv->tgts[i]->ltd_exp, - len, lk, uarg); + err =obd_iocontrol (cmd, lmv->tgts[i]->ltd_exp, len, lk, uarg);if (err) {if (lmv->tgts[i]->ltd_active) {/* permanent error */
@@ -839,8 +837,8 @@ static int lmv_hsm_ct_register(struct lmv_obd *lmv, unsigned int cmd, int len,/* unregister from previous MDS */ for (j =0 ; j < i; j++)obd_iocontrol (cmd, - lmv->tgts[j]->ltd_exp, - len, lk, uarg); + lmv->tgts[j]->ltd_exp, + len, lk, uarg);return rc; }/* else: transient error.
@@ -907,8 +905,8 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,/* copy UUID */ if (copy_to_user (data->ioc_pbuf2,obd2cli_tgt (mdc_obd), -min ((int ) data->ioc_plen2, - (int )sizeof (struct obd_uuid )))) +min ((int )data->ioc_plen2, + (int )sizeof (struct obd_uuid ))))return -EFAULT ; rc = obd_statfs(NULL, lmv->tgts[index]->ltd_exp, &stat_buf,
@@ -917,8 +915,8 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,if (rc)return rc;if (copy_to_user (data->ioc_pbuf1, &stat_buf, -min ((int ) data->ioc_plen1, - (int )sizeof (stat_buf)))) +min ((int )data->ioc_plen1, + (int )sizeof (stat_buf))))return -EFAULT ;break ; }
Signature · 1 line
2.1.0
PATCH 22/25 staging/lustre: Fix lines that start with spaces
In reply to [email protected]From: Oleg Drokin <[email protected]>
Found with checkpatch.
--- drivers/staging/lustre/lustre/include/lustre_cfg.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 4 ++-- drivers/staging/lustre/lustre/llite/llite_nfs.c | 6 +++--- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw26.c | 17 +++++++++-------- 5 files changed, 16 insertions(+), 15 deletions(-)
drivers/staging/lustre/lustre/include/lustre_cfg.h +1 -1
@@ -50,7 +50,7 @@#define LUSTRE_CFG_MAX_BUFCOUNT 8#define LCFG_HDR_SIZE (count) \ - cfs_size_round(offsetof (struct lustre_cfg, lcfg_buflens[(count)])) + cfs_size_round(offsetof(struct lustre_cfg, lcfg_buflens[(count)]))/** If the LCFG_REQUIRED bit is set in a configuration command, * then the client is required to understand this parameter
drivers/staging/lustre/lustre/include/lustre_dlm.h +2 -2
@@ -149,13 +149,13 @@ extern enum ldlm_mode lck_compat_array[];static inline void lockmode_verify (enum ldlm_mode mode) { -LASSERT (mode >LCK_MINMODE && mode <LCK_MAXMODE ); +LASSERT (mode >LCK_MINMODE && mode <LCK_MAXMODE ); }static inline int lockmode_compat (enum ldlm_mode exist_mode,enum ldlm_mode new_mode) { -return (lck_compat_array[exist_mode] & new_mode); +return (lck_compat_array[exist_mode] & new_mode); }/*
drivers/staging/lustre/lustre/llite/llite_nfs.c +3 -3
@@ -330,9 +330,9 @@ static struct dentry *ll_get_parent(struct dentry *dchild) }const struct export_operations lustre_export_operations = { - .get_parent = ll_get_parent, - .encode_fh = ll_encode_fh, - .get_name = ll_get_name, + .get_parent = ll_get_parent, + .encode_fh = ll_encode_fh, + .get_name = ll_get_name, .fh_to_dentry = ll_fh_to_dentry, .fh_to_parent = ll_fh_to_parent, };
drivers/staging/lustre/lustre/llite/lproc_llite.c +1 -1
@@ -1504,5 +1504,5 @@ LPROC_SEQ_FOPS(ll_rw_offset_stats);void lprocfs_llite_init_vars (struct lprocfs_static_vars *lvars) { - lvars->obd_vars = lprocfs_llite_obd_vars; + lvars->obd_vars = lprocfs_llite_obd_vars; }
drivers/staging/lustre/lustre/llite/rw26.c +9 -8
@@ -339,14 +339,15 @@ static ssize_t ll_direct_IO_26_seg(const struct lu_env *env, struct cl_io *io, size_t size, loff_t file_offset, struct page **pages, int page_count) { - struct ll_dio_pages pvec = { .ldp_pages = pages, - .ldp_nr = page_count, - .ldp_size = size, - .ldp_offsets =NULL , - .ldp_start_offset = file_offset - }; - -return ll_direct_rw_pages (env, io, rw, inode, &pvec); + struct ll_dio_pages pvec = { + .ldp_pages = pages, + .ldp_nr = page_count, + .ldp_size = size, + .ldp_offsets =NULL , + .ldp_start_offset = file_offset + }; + +return ll_direct_rw_pages (env, io, rw, inode, &pvec); }#ifdef KMALLOC_MAX_SIZE
Signature · 1 line
2.1.0
PATCH 23/25 staging/lustre: Rework MAX_DIO_SIZE macro
In reply to [email protected]From: Oleg Drokin <[email protected]>
KMALLOC_MAX_SIZE is always defined in the kernel, so no point in checking for it, just use t directly.
--- drivers/staging/lustre/lustre/llite/rw26.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/staging/lustre/lustre/llite/rw26.c +2 -8
@@ -350,20 +350,14 @@ static ssize_t ll_direct_IO_26_seg(const struct lu_env *env, struct cl_io *io,return ll_direct_rw_pages (env, io, rw, inode, &pvec); } -#ifdef KMALLOC_MAX_SIZE -#define MAX_MALLOC KMALLOC_MAX_SIZE -#else -#define MAX_MALLOC (128 * 1024) -#endif -/* This is the maximum size of a single O_DIRECT request, based on the * kmalloc limit. We need to fit all of the brw_page structs, each one * representing PAGE_SIZE worth of user data, into a single buffer, and * then truncate this to be a full-sized RPC. For 4kB PAGE_SIZE this is * up to 22MB for 128kB kmalloc and up to 682MB for 4MB kmalloc. */ -#define MAX_DIO_SIZE ((MAX_MALLOC / sizeof(struct brw_page) * PAGE_CACHE_SIZE) & \ - ~(DT_MAX_BRW_SIZE - 1)) +#define MAX_DIO_SIZE ((KMALLOC_MAX_SIZE / sizeof(struct brw_page) * \ + PAGE_CACHE_SIZE) & ~(DT_MAX_BRW_SIZE - 1))static ssize_t ll_direct_IO_26 (struct kiocb *iocb,struct iov_iter *iter,loff_t file_offset) {
Signature · 1 line
2.1.0
PATCH 24/25 staging/lustre: Remove unneeded {} in lprocfs_stats_unlock()
In reply to [email protected]From: Oleg Drokin <[email protected]>
Since there's only one call in those if () else branches, the braces are not really necessary.
Highlighted by checkpatch.
--- drivers/staging/lustre/lustre/include/lprocfs_status.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/include/lprocfs_status.h +4 -6
@@ -426,11 +426,10 @@ static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats, int opc,case LPROCFS_GET_SMP_ID :if (stats->ls_flags &LPROCFS_STATS_FLAG_NOPERCPU ) { -if (stats->ls_flags &LPROCFS_STATS_FLAG_IRQ_SAFE ) { +if (stats->ls_flags &LPROCFS_STATS_FLAG_IRQ_SAFE )spin_unlock_irqrestore (&stats->ls_lock, *flags); - }else { +else spin_unlock (&stats->ls_lock); - } }else {put_cpu (); }
@@ -438,11 +437,10 @@ static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats, int opc,case LPROCFS_GET_NUM_CPU :if (stats->ls_flags &LPROCFS_STATS_FLAG_NOPERCPU ) { -if (stats->ls_flags &LPROCFS_STATS_FLAG_IRQ_SAFE ) { +if (stats->ls_flags &LPROCFS_STATS_FLAG_IRQ_SAFE )spin_unlock_irqrestore (&stats->ls_lock, *flags); - }else { +else spin_unlock (&stats->ls_lock); - } }return ; }
Signature · 1 line
2.1.0
PATCH 25/25 staging/lustre/ptlrpc: Fix ENABLE_PINGER ifdef
In reply to [email protected]From: Oleg Drokin <[email protected]>
As it is ENABLE_PINGER is never defined, but in reality it's the code that is now compiled out that should be used since all other instances were converted like that too.
--- drivers/staging/lustre/lustre/ptlrpc/import.c | 28 --------------------------- 1 file changed, 28 deletions(-)
drivers/staging/lustre/lustre/ptlrpc/import.c +0 -28
@@ -433,7 +433,6 @@ EXPORT_SYMBOL(ptlrpc_fail_import);int ptlrpc_reconnect_import (struct obd_import *imp) { -#ifdef ENABLE_PINGER struct l_wait_info lwi;int secs =cfs_time_seconds (obd_timeout);int rc;
@@ -449,33 +448,6 @@ int ptlrpc_reconnect_import(struct obd_import *imp)CDEBUG (D_HA ,"%s: recovery finished s:%s\n" ,obd2cli_tgt (imp->imp_obd),ptlrpc_import_state_name (imp->imp_state));return rc; -#else -ptlrpc_set_import_discon (imp,0 ); -/* Force a new connect attempt */ -ptlrpc_invalidate_import (imp); -/* Do a fresh connect next time by zeroing the handle */ -ptlrpc_disconnect_import (imp,1 ); -/* Wait for all invalidate calls to finish */ -if (atomic_read (&imp->imp_inval_count) >0 ) { -int rc; -struct l_wait_info lwi =LWI_INTR (LWI_ON_SIGNAL_NOOP ,NULL ); - - rc =l_wait_event (imp->imp_recovery_waitq, - (atomic_read (&imp->imp_inval_count) ==0 ), - &lwi); -if (rc) -CERROR ("Interrupted, inval=%d\n" , -atomic_read (&imp->imp_inval_count)); - } - -/* Allow reconnect attempts */ - imp->imp_obd->obd_no_recov =0 ; -/* Remove 'invalid' flag */ -ptlrpc_activate_import (imp); -/* Attempt a new connect */ -ptlrpc_recover_import (imp,NULL ,0 ); -return 0 ; -#endif }EXPORT_SYMBOL (ptlrpc_reconnect_import);
Signature · 1 line
2.1.0