Rebased Lustre patches
cover Rebased Lustre patches
Here are the three patches rebased after merge conflict with some other patches that were accepted first.
Oleg Drokin (3):
staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}' staging/lustre: Make alignment match open parenthesis staging/lustre: Remove unused cp_error from struct cl_page
.../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 2 +- .../lustre/lnet/libcfs/linux/linux-crypto.c | 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/include/lu_object.h | 3 +- .../lustre/lustre/include/lustre/lustre_idl.h | 28 +- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 13 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 14 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/file.c | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 25 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 +- drivers/staging/lustre/lustre/llite/namei.c | 4 +- drivers/staging/lustre/lustre/llite/rw.c | 9 +- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 3 +- drivers/staging/lustre/lustre/llite/super25.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 18 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 5 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 +- drivers/staging/lustre/lustre/obdclass/debug.c | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 12 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 8 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 12 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 24 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 288 ++++++++++----------- 58 files changed, 368 insertions(+), 343 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/3 staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}'
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" in Lustre code.
--- drivers/staging/lustre/lustre/include/lu_object.h | 3 ++- .../lustre/lustre/include/lustre/lustre_idl.h | 28 +++++++++++----------- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 13 +++++----- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ++-- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 21 +++++++++------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 ++-- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 +++++------ drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- drivers/staging/lustre/lustre/llite/rw.c | 5 ++-- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 4 ++-- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 ++- drivers/staging/lustre/lustre/lov/lov_obd.c | 14 ++++++----- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 ++-- drivers/staging/lustre/lustre/obdclass/debug.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/genops.c | 2 +- .../staging/lustre/lustre/obdclass/obd_config.c | 12 +++++----- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 6 ++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++-- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 ++-- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 12 ++++++---- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +++-- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 35 files changed, 111 insertions(+), 95 deletions(-)
drivers/staging/lustre/lustre/include/lu_object.h +2 -1
@@ -1024,7 +1024,8 @@ enum lu_context_tag {/** * Contexts usable in cache shrinker thread. */ - LCT_SHRINKER = LCT_MD_THREAD|LCT_DT_THREAD|LCT_CL_THREAD|LCT_NOREF +LCT_SHRINKER =LCT_MD_THREAD |LCT_DT_THREAD |LCT_CL_THREAD | + LCT_NOREF };/**
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +14 -14
@@ -2019,7 +2019,7 @@ void lustre_swab_generic_32s(__u32 *val);#define MDS_INODELOCK_MAXSHIFT 5/* This FULL lock is useful to take on unlink sort of operations */ -#define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1) +#define MDS_INODELOCK_FULL ((1 << (MDS_INODELOCK_MAXSHIFT + 1)) - 1)/* NOTE: until Lustre 1.8.7/2.1.1 the fid_ver() was packed into name[2], * but was moved into name[1] along with the OID to avoid consuming the
@@ -3193,8 +3193,8 @@ struct llog_log_hdr {__u32 llh_cat_idx;/* for a catalog the first plain slot is next to it */ struct obd_uuid llh_tgtuuid; -__u32 llh_reserved[LLOG_HEADER_SIZE /sizeof (__u32) -23 ]; -__u32 llh_bitmap[LLOG_BITMAP_BYTES /sizeof (__u32)]; +__u32 llh_reserved[LLOG_HEADER_SIZE /sizeof (__u32) -23 ]; +__u32 llh_bitmap[LLOG_BITMAP_BYTES /sizeof (__u32)];struct llog_rec_tail llh_tail; } __packed;
@@ -3409,17 +3409,17 @@ void lustre_swab_lustre_capa(struct lustre_capa *c);/** lustre_capa::lc_opc */ enum { -CAPA_OPC_BODY_WRITE =1 <<0 ,/**< write object data */ -CAPA_OPC_BODY_READ =1 <<1 ,/**< read object data */ -CAPA_OPC_INDEX_LOOKUP =1 <<2 ,/**< lookup object fid */ -CAPA_OPC_INDEX_INSERT =1 <<3 ,/**< insert object fid */ -CAPA_OPC_INDEX_DELETE =1 <<4 ,/**< delete object fid */ -CAPA_OPC_OSS_WRITE =1 <<5 ,/**< write oss object data */ -CAPA_OPC_OSS_READ =1 <<6 ,/**< read oss object data */ -CAPA_OPC_OSS_TRUNC =1 <<7 ,/**< truncate oss object */ -CAPA_OPC_OSS_DESTROY =1 <<8 ,/**< destroy oss object */ -CAPA_OPC_META_WRITE =1 <<9 ,/**< write object meta data */ -CAPA_OPC_META_READ =1 <<10 ,/**< read object meta data */ +CAPA_OPC_BODY_WRITE =1 <<0 ,/**< write object data */ +CAPA_OPC_BODY_READ =1 <<1 ,/**< read object data */ +CAPA_OPC_INDEX_LOOKUP =1 <<2 ,/**< lookup object fid */ +CAPA_OPC_INDEX_INSERT =1 <<3 ,/**< insert object fid */ +CAPA_OPC_INDEX_DELETE =1 <<4 ,/**< delete object fid */ +CAPA_OPC_OSS_WRITE =1 <<5 ,/**< write oss object data */ +CAPA_OPC_OSS_READ =1 <<6 ,/**< read oss object data */ +CAPA_OPC_OSS_TRUNC =1 <<7 ,/**< truncate oss object */ +CAPA_OPC_OSS_DESTROY =1 <<8 ,/**< destroy oss object */ +CAPA_OPC_META_WRITE =1 <<9 ,/**< write object meta data */ +CAPA_OPC_META_READ =1 <<10 ,/**< read object meta data */ };#define CAPA_OPC_OSS_RW (CAPA_OPC_OSS_READ | CAPA_OPC_OSS_WRITE)
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +1 -1
@@ -753,7 +753,7 @@ static inline void hsm_set_cl_error(int *flags, int error) *flags |= (error <<CLF_HSM_ERR_L ); } -#define CR_MAXSIZE cfs_size_round(2*NAME_MAX + 1 + \ +#define CR_MAXSIZE cfs_size_round(2 * NAME_MAX + 1 + \ sizeof(struct changelog_ext_rec))struct changelog_rec {
drivers/staging/lustre/lustre/include/lustre_fid.h +1 -1
@@ -596,7 +596,7 @@ static inline __u32 fid_flatten32(const struct lu_fid *fid)* (from OID), or up to 128M inodes without collisions for new files. */ ino = ((seq &0x000fffffULL ) <<12 ) + ((seq >>8 ) &0xfffff000 ) + - (seq >> (64 - (40 -8 )) &0xffffff00 ) + + (seq >> (64 - (40 -8 )) &0xffffff00 ) + (fid_oid (fid) &0xff000fff ) + ((fid_oid (fid) &0x00fff000 ) <<8 );return ino ? ino :fid_oid (fid);
drivers/staging/lustre/lustre/include/lustre_lite.h +1 -1
@@ -46,7 +46,7 @@/* 4UL * 1024 * 1024 */ #define LL_MAX_BLKSIZE_BITS (22) -#define LL_MAX_BLKSIZE (1UL<<LL_MAX_BLKSIZE_BITS) +#define LL_MAX_BLKSIZE (1UL << LL_MAX_BLKSIZE_BITS)/* * This is embedded into llite super-blocks to keep track of
drivers/staging/lustre/lustre/include/obd_support.h +7 -6
@@ -115,17 +115,17 @@ extern char obd_jobid_var[];* running on a backup server. (If it's too low, import_select_connection * will increase the timeout anyhow.) */ -#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN, obd_timeout/20) +#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN, obd_timeout / 20)/* The max delay between connects is SWITCH_MAX + SWITCH_INC + INITIAL */ #define RECONNECT_DELAY_MAX (CONNECTION_SWITCH_MAX + CONNECTION_SWITCH_INC + \ INITIAL_CONNECT_TIMEOUT)/* The min time a target should wait for clients to reconnect in recovery */ -#define OBD_RECOVERY_TIME_MIN (2*RECONNECT_DELAY_MAX) +#define OBD_RECOVERY_TIME_MIN (2 * RECONNECT_DELAY_MAX)#define OBD_IR_FACTOR_MIN 1#define OBD_IR_FACTOR_MAX 10 -#define OBD_IR_FACTOR_DEFAULT (OBD_IR_FACTOR_MAX/2) +#define OBD_IR_FACTOR_DEFAULT (OBD_IR_FACTOR_MAX / 2)/* default timeout for the MGS to become IR_FULL */ -#define OBD_IR_MGS_TIMEOUT (4*obd_timeout) +#define OBD_IR_MGS_TIMEOUT (4 * obd_timeout)#define LONG_UNLINK 300/* Unlink should happen before now */ /**
@@ -526,7 +526,8 @@ do { \POISON_PTR (ptr); \ } while (0) -#define KEY_IS (str) \ - (keylen >= (sizeof(str)-1) && memcmp(key, str, (sizeof(str)-1)) == 0) +#define KEY_IS (str) \ + (keylen >= (sizeof(str) - 1) && \ + memcmp(key, str, (sizeof(str) - 1)) == 0)#endif
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +2 -2
@@ -817,7 +817,7 @@ static __u64 ldlm_cli_cancel_local(struct ldlm_lock *lock)lock_res_and_lock (lock);ldlm_set_cbpending (lock); local_only = !!(lock->l_flags & - (LDLM_FL_LOCAL_ONLY |LDLM_FL_CANCEL_ON_BLOCK )); + (LDLM_FL_LOCAL_ONLY |LDLM_FL_CANCEL_ON_BLOCK ));ldlm_cancel_callback (lock); rc =ldlm_is_bl_ast (lock) ?LDLM_FL_BL_AST :LDLM_FL_CANCELING ;unlock_res_and_lock (lock);
@@ -1838,7 +1838,7 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure)* bug 17614: locks being actively cancelled. Get a reference * on a lock so that it does not disappear under us (e.g. due to cancel) */ -if (!(lock->l_flags & (LDLM_FL_FAILED |LDLM_FL_CANCELING ))) { +if (!(lock->l_flags & (LDLM_FL_FAILED |LDLM_FL_CANCELING ))) {list_add (&lock->l_pending_chain, list);LDLM_LOCK_GET (lock); }
drivers/staging/lustre/lustre/llite/file.c +2 -2
@@ -2472,7 +2472,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (och) { mode = och->och_flags & - (FMODE_READ |FMODE_WRITE ); + (FMODE_READ |FMODE_WRITE ); rc =ll_lease_close (och, inode, &lease_broken);if (rc ==0 && lease_broken) mode =0 ;
@@ -2959,7 +2959,7 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits,struct lustre_handle lockh;ldlm_policy_data_t policy;enum ldlm_mode mode = (l_req_mode ==LCK_MINMODE ) ? - (LCK_CR |LCK_CW |LCK_PR |LCK_PW ) : l_req_mode; + (LCK_CR |LCK_CW |LCK_PR |LCK_PW ) : l_req_mode;struct lu_fid *fid;__u64 flags;int i;
drivers/staging/lustre/lustre/llite/llite_lib.c +12 -9
@@ -659,7 +659,8 @@ static int ll_options(char *options, int *flags) *flags |= tmp; goto next; } - tmp =ll_set_opt ("noflock" , s1,LL_SBI_FLOCK |LL_SBI_LOCALFLOCK ); + tmp =ll_set_opt ("noflock" , s1, +LL_SBI_FLOCK |LL_SBI_LOCALFLOCK );if (tmp) { *flags &= ~tmp; goto next;
@@ -1549,14 +1550,14 @@ int ll_setattr(struct dentry *de, struct iattr *attr) {int mode =d_inode (de)->i_mode; -if ((attr->ia_valid & (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) == - (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) +if ((attr->ia_valid & (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) == + (ATTR_CTIME |ATTR_SIZE |ATTR_MODE )) attr->ia_valid |=MDS_OPEN_OWNEROVERRIDE ; -if (((attr->ia_valid & (ATTR_MODE |ATTR_FORCE |ATTR_SIZE )) == - (ATTR_SIZE |ATTR_MODE )) && +if (((attr->ia_valid & (ATTR_MODE |ATTR_FORCE |ATTR_SIZE )) == + (ATTR_SIZE |ATTR_MODE )) && (((mode &S_ISUID ) && !(attr->ia_mode &S_ISUID )) || - (((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && + (((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && !(attr->ia_mode &S_ISGID )))) attr->ia_valid |=ATTR_FORCE ;
@@ -1567,7 +1568,7 @@ int ll_setattr(struct dentry *de, struct iattr *attr) attr->ia_valid |=ATTR_KILL_SUID ;if ((attr->ia_valid &ATTR_MODE ) && - ((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && + ((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP )) && !(attr->ia_mode &S_ISGID ) && !(attr->ia_valid &ATTR_KILL_SGID )) attr->ia_valid |=ATTR_KILL_SGID ;
@@ -1742,9 +1743,11 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md) lli->lli_ctime = body->mbo_ctime; }if (body->mbo_valid &OBD_MD_FLMODE ) - inode->i_mode = (inode->i_mode &S_IFMT )|(body->mbo_mode & ~S_IFMT ); + inode->i_mode = (inode->i_mode &S_IFMT ) | + (body->mbo_mode & ~S_IFMT );if (body->mbo_valid &OBD_MD_FLTYPE ) - inode->i_mode = (inode->i_mode & ~S_IFMT )|(body->mbo_mode &S_IFMT ); + inode->i_mode = (inode->i_mode & ~S_IFMT ) | + (body->mbo_mode &S_IFMT );LASSERT (inode->i_mode !=0 );if (S_ISREG (inode->i_mode)) inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS + 1,
drivers/staging/lustre/lustre/llite/llite_mmap.c +2 -2
@@ -126,7 +126,7 @@ restart: fio = &io->u.ci_fault; fio->ft_index = index; - fio->ft_executable = vma->vm_flags&VM_EXEC ; + fio->ft_executable = vma->vm_flags &VM_EXEC ;/* * disable VM_SEQ_READ and use VM_RAND_READ to make sure that
@@ -134,7 +134,7 @@ restart:* filemap_nopage. we do our readahead in ll_readpage. */ if (ra_flags) - *ra_flags = vma->vm_flags & (VM_RAND_READ |VM_SEQ_READ ); + *ra_flags = vma->vm_flags & (VM_RAND_READ |VM_SEQ_READ ); vma->vm_flags &= ~VM_SEQ_READ ; vma->vm_flags |=VM_RAND_READ ;
drivers/staging/lustre/lustre/llite/lproc_llite.c +7 -7
@@ -996,17 +996,17 @@ static const struct llite_file_opcode {/* file operation */ { LPROC_LL_DIRTY_HITS, LPROCFS_TYPE_REGS, "dirty_pages_hits" }, { LPROC_LL_DIRTY_MISSES, LPROCFS_TYPE_REGS, "dirty_pages_misses" }, - { LPROC_LL_READ_BYTES, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_READ_BYTES, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "read_bytes" }, - { LPROC_LL_WRITE_BYTES, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_WRITE_BYTES, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "write_bytes" }, - { LPROC_LL_BRW_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, + { LPROC_LL_BRW_READ, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_PAGES, "brw_read" }, - { LPROC_LL_BRW_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES, + { LPROC_LL_BRW_WRITE, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_PAGES, "brw_write" }, - { LPROC_LL_OSC_READ, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_OSC_READ, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "osc_read" }, - { LPROC_LL_OSC_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES, + { LPROC_LL_OSC_WRITE, LPROCFS_CNTR_AVGMINMAX | LPROCFS_TYPE_BYTES, "osc_write" }, { LPROC_LL_IOCTL, LPROCFS_TYPE_REGS, "ioctl" }, { LPROC_LL_OPEN, LPROCFS_TYPE_REGS, "open" },
@@ -1253,7 +1253,7 @@ static void ll_display_extents_info(struct ll_rw_extents_info *io_extents, r,pct (r, read_tot),pct (read_cum, read_tot), w, pct(w, write_tot), pct(write_cum, write_tot)); start = end; -if (start ==1 <<10 ) { +if (start ==1 <<10 ) { start =1 ; units +=10 ; unitp++;
drivers/staging/lustre/lustre/llite/namei.c +2 -2
@@ -601,7 +601,7 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, (inode_permission(parent, MAY_WRITE | MAY_EXEC) == 0))return NULL ; -if (flags & (LOOKUP_PARENT |LOOKUP_OPEN |LOOKUP_CREATE )) +if (flags & (LOOKUP_PARENT |LOOKUP_OPEN |LOOKUP_CREATE )) itp =NULL ;else itp = ⁢
@@ -1017,7 +1017,7 @@ static int ll_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)if (!IS_POSIXACL (dir) || !exp_connect_umask (ll_i2mdexp (dir))) mode &= ~current_umask (); - mode = (mode & (S_IRWXUGO |S_ISVTX )) |S_IFDIR ; + mode = (mode & (S_IRWXUGO |S_ISVTX )) |S_IFDIR ; err =ll_new_node (dir, dentry,NULL , mode,0 ,LUSTRE_OPC_MKDIR );if (!err)
drivers/staging/lustre/lustre/llite/rw.c +3 -2
@@ -651,7 +651,8 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,if (!stride_io_mode (ras) && (stride_gap !=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; + ras->ras_stride_length = ras->ras_consecutive_pages + + stride_gap; }LASSERT (ras->ras_request_index ==0 );LASSERT (ras->ras_consecutive_stride_requests ==0 );
@@ -663,7 +664,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, } ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;RAS_CDEBUG (ras);return ;
drivers/staging/lustre/lustre/llite/rw26.c +1 -1
@@ -161,7 +161,7 @@ static int ll_releasepage(struct page *vmpage, gfp_t gfp_mask)return result; } -#define MAX_DIRECTIO_SIZE (2*1024*1024*1024UL) +#define MAX_DIRECTIO_SIZE (2 * 1024 * 1024 * 1024UL) static inline int ll_get_user_pages(int rw, unsigned long user_addr, size_t size, struct page ***pages,
drivers/staging/lustre/lustre/llite/super25.c +2 -2
@@ -102,8 +102,8 @@ static int __init lustre_init(void) rc = -ENOMEM ; ll_inode_cachep =kmem_cache_create ("lustre_inode_cache" , -sizeof (struct ll_inode_info ), -0 ,SLAB_HWCACHE_ALIGN |SLAB_ACCOUNT , +sizeof (struct ll_inode_info ),0 , +SLAB_HWCACHE_ALIGN |SLAB_ACCOUNT ,NULL );if (!ll_inode_cachep) goto out_cache;
drivers/staging/lustre/lustre/llite/vvp_object.c +1 -1
@@ -120,7 +120,7 @@ static int vvp_attr_set(const struct lu_env *env, struct cl_object *obj,if (0 && valid &CAT_SIZE )i_size_write (inode, attr->cat_size);/* not currently necessary */ -if (0 && valid & (CAT_UID |CAT_GID |CAT_SIZE )) +if (0 && valid & (CAT_UID |CAT_GID |CAT_SIZE ))mark_inode_dirty (inode);return 0 ; }
drivers/staging/lustre/lustre/lov/lov_ea.c +2 -1
@@ -66,7 +66,8 @@ static int lsm_lmm_verify_common(struct lov_mds_md *lmm, int lmm_bytes, }if (lmm->lmm_stripe_size ==0 || - (le32_to_cpu (lmm->lmm_stripe_size)&(LOV_MIN_STRIPE_SIZE -1 )) !=0 ) { + (le32_to_cpu (lmm->lmm_stripe_size) & + (LOV_MIN_STRIPE_SIZE -1 )) !=0 ) {CERROR ("bad stripe size %u\n" ,le32_to_cpu (lmm->lmm_stripe_size));lov_dump_lmm_common (D_WARNING , lmm);
drivers/staging/lustre/lustre/lov/lov_obd.c +8 -6
@@ -1917,8 +1917,9 @@ inactive_tgt:break ; } - len_mapped_single_call = lcl_fm_ext[ext_count-1 ].fe_logical - - lun_start + lcl_fm_ext[ext_count -1 ].fe_length; + len_mapped_single_call = + lcl_fm_ext[ext_count -1 ].fe_logical - + lun_start + lcl_fm_ext[ext_count -1 ].fe_length;/* Have we finished mapping on this device? */ if (req_fm_len <= len_mapped_single_call)
@@ -1927,14 +1928,15 @@ inactive_tgt:/* Clear the EXTENT_LAST flag which can be present on * last extent */ -if (lcl_fm_ext[ext_count-1 ].fe_flags &FIEMAP_EXTENT_LAST ) +if (lcl_fm_ext[ext_count -1 ].fe_flags & +FIEMAP_EXTENT_LAST ) lcl_fm_ext[ext_count -1 ].fe_flags &= ~FIEMAP_EXTENT_LAST ; curr_loc =lov_stripe_size (lsm, - lcl_fm_ext[ext_count -1 ].fe_logical+ - lcl_fm_ext[ext_count -1 ].fe_length, - cur_stripe); + lcl_fm_ext[ext_count -1 ].fe_logical + + lcl_fm_ext[ext_count -1 ].fe_length, + cur_stripe);if (curr_loc >= fm_key->oa.o_size) ost_eof =1 ;
drivers/staging/lustre/lustre/lov/lov_pool.c +1 -1
@@ -92,7 +92,7 @@ static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key, unsigned mfor (i =0 ; i <LOV_MAXPOOLNAME ; i++) {if (poolname[i] =='\0' )break ; - result = (result <<4 )^(result >>28 ) ^ poolname[i]; + result = (result <<4 ) ^ (result >>28 ) ^ poolname[i]; }return (result % mask); }
drivers/staging/lustre/lustre/mdc/mdc_locks.c +1 -1
@@ -274,7 +274,7 @@ mdc_intent_open_pack(struct obd_export *exp, struct lookup_intent *it,else mode =LCK_PR ; }else { -if (it->it_flags & (FMODE_WRITE |MDS_OPEN_TRUNC )) +if (it->it_flags & (FMODE_WRITE |MDS_OPEN_TRUNC )) mode =LCK_CW ;else if (it->it_flags & __FMODE_EXEC) mode =LCK_PR ;
drivers/staging/lustre/lustre/mdc/mdc_reint.c +3 -2
@@ -110,7 +110,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,__u64 bits; bits =MDS_INODELOCK_UPDATE ; -if (op_data->op_attr.ia_valid & (ATTR_MODE |ATTR_UID |ATTR_GID )) +if (op_data->op_attr.ia_valid & (ATTR_MODE |ATTR_UID |ATTR_GID )) bits |=MDS_INODELOCK_LOOKUP ; if ((op_data->op_flags & MF_MDC_CANCEL_FID1) && (fid_is_sane(&op_data->op_fid1)) &&
@@ -429,7 +429,8 @@ int mdc_rename(struct obd_export *exp, struct md_op_data *op_data, }req_capsule_set_size (&req->rq_pill, &RMF_NAME ,RCL_CLIENT , oldlen +1 ); -req_capsule_set_size (&req->rq_pill, &RMF_SYMTGT ,RCL_CLIENT , newlen+1 ); +req_capsule_set_size (&req->rq_pill, &RMF_SYMTGT ,RCL_CLIENT , + newlen +1 ); rc =mdc_prep_elc_req (exp, req,MDS_REINT , &cancels, count);if (rc) {
drivers/staging/lustre/lustre/obdclass/debug.c +2 -2
@@ -48,10 +48,10 @@ int block_debug_setup(void *addr, int len, __u64 off, __u64 id)LASSERT (addr);put_unaligned_le64 (off, addr); -put_unaligned_le64 (id, addr+LPDS ); +put_unaligned_le64 (id, addr +LPDS ); addr += len -LPDS -LPDS ;put_unaligned_le64 (off, addr); -put_unaligned_le64 (id, addr+LPDS ); +put_unaligned_le64 (id, addr +LPDS );return 0 ; }
drivers/staging/lustre/lustre/obdclass/genops.c +1 -1
@@ -509,7 +509,7 @@ struct obd_device *class_devices_in_group(struct obd_uuid *grp_uuid, int *next)continue ;if (obd_uuid_equals (grp_uuid, &obd->obd_uuid)) {if (next) - *next = i+1 ; + *next = i +1 ;read_unlock (&obd_dev_lock);return obd; }
drivers/staging/lustre/lustre/obdclass/obd_config.c +6 -6
@@ -1304,33 +1304,33 @@ static int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf,if (rc <0 )return rc; - ptr +=snprintf (ptr, end-ptr,"cmd=%05x " , lcfg->lcfg_command); + ptr +=snprintf (ptr, end - ptr,"cmd=%05x " , lcfg->lcfg_command);if (lcfg->lcfg_flags) - ptr +=snprintf (ptr, end-ptr,"flags=%#08x " , + ptr +=snprintf (ptr, end - ptr,"flags=%#08x " , lcfg->lcfg_flags);if (lcfg->lcfg_num) - ptr +=snprintf (ptr, end-ptr,"num=%#08x " , lcfg->lcfg_num); + ptr +=snprintf (ptr, end - ptr,"num=%#08x " , lcfg->lcfg_num);if (lcfg->lcfg_nid) {char nidstr[LNET_NIDSTR_SIZE ];libcfs_nid2str_r (lcfg->lcfg_nid, nidstr,sizeof (nidstr)); - ptr +=snprintf (ptr, end-ptr,"nid=%s(%#llx)\n " , + ptr +=snprintf (ptr, end - ptr,"nid=%s(%#llx)\n " , nidstr, lcfg->lcfg_nid); }if (lcfg->lcfg_command ==LCFG_MARKER ) {struct cfg_marker *marker =lustre_cfg_buf (lcfg,1 ); - ptr +=snprintf (ptr, end-ptr,"marker=%d(%#x)%s '%s'" , + ptr +=snprintf (ptr, end - ptr,"marker=%d(%#x)%s '%s'" , marker->cm_step, marker->cm_flags, marker->cm_tgtname, marker->cm_comment); }else {int i;for (i =0 ; i < lcfg->lcfg_bufcount; i++) { - ptr +=snprintf (ptr, end-ptr,"%d:%s " , i, + ptr +=snprintf (ptr, end - ptr,"%d:%s " , i,lustre_cfg_string (lcfg, i)); } }
drivers/staging/lustre/lustre/obdclass/obd_mount.c +3 -3
@@ -37,7 +37,7 @@*/ #define DEBUG_SUBSYSTEM S_CLASS -#define D_MOUNT (D_SUPER|D_CONFIG/*|D_WARNING */) +#define D_MOUNT (D_SUPER | D_CONFIG/*|D_WARNING */)#define PRINT_CMD CDEBUG#include "../include/obd.h"
@@ -757,7 +757,7 @@ static int lmd_make_exclusion(struct lustre_mount_data *lmd, const char *ptr) exclude_list[lmd->lmd_exclude_count++] = index; else CDEBUG(D_MOUNT, "ignoring exclude %.*s: type = %#x\n", - (uint)(s2-s1), s1, rc); + (uint)(s2 - s1), s1, rc); s1 = s2;/* now we are pointing at ':' (next exclude) * or ',' (end of excludes)
@@ -1108,7 +1108,7 @@ static int lustre_fill_super(struct super_block *sb, void *data, int silent)struct lustre_sb_info *lsi;int rc; -CDEBUG (D_MOUNT |D_VFSTRACE ,"VFS Op: sb %p\n" , sb); +CDEBUG (D_MOUNT |D_VFSTRACE ,"VFS Op: sb %p\n" , sb); lsi =lustre_init_lsi (sb);if (!lsi)
drivers/staging/lustre/lustre/obdclass/obdo.c +4 -2
@@ -153,12 +153,14 @@ static void iattr_from_obdo(struct iattr *attr, const struct obdo *oa, }#if 0 /* you shouldn't be able to change a file's type with setattr */ if (valid &OBD_MD_FLTYPE ) { - attr->ia_mode = (attr->ia_mode & ~S_IFMT )|(oa->o_mode &S_IFMT ); + attr->ia_mode = (attr->ia_mode & ~S_IFMT ) | + (oa->o_mode &S_IFMT ); attr->ia_valid |=ATTR_MODE ; }#endif if (valid &OBD_MD_FLMODE ) { - attr->ia_mode = (attr->ia_mode &S_IFMT )|(oa->o_mode & ~S_IFMT ); + attr->ia_mode = (attr->ia_mode &S_IFMT ) | + (oa->o_mode & ~S_IFMT ); attr->ia_valid |=ATTR_MODE ;if (!in_group_p (make_kgid (&init_user_ns, oa->o_gid)) && !capable (CFS_CAP_FSETID ))
drivers/staging/lustre/lustre/obdecho/echo_internal.h +2 -2
@@ -33,9 +33,9 @@/* The persistent object (i.e. actually stores stuff!) */ #define ECHO_PERSISTENT_OBJID 1ULL -#define ECHO_PERSISTENT_SIZE ((__u64)(1<<20)) +#define ECHO_PERSISTENT_SIZE ((__u64)(1 << 20))/* block size to use for data verification */ -#define OBD_ECHO_BLOCK_SIZE (4<<10) +#define OBD_ECHO_BLOCK_SIZE (4 << 10)#endif
drivers/staging/lustre/lustre/osc/osc_cache.c +1 -1
@@ -2544,7 +2544,7 @@ int osc_flush_async_page(const struct lu_env *env, struct cl_io *io, goto out;spin_lock (&oap->oap_lock); - oap->oap_async_flags |=ASYNC_READY |ASYNC_URGENT ; + oap->oap_async_flags |=ASYNC_READY |ASYNC_URGENT ;spin_unlock (&oap->oap_lock);if (memory_pressure_get ())
drivers/staging/lustre/lustre/osc/osc_cl_internal.h +1 -1
@@ -389,7 +389,7 @@ extern struct lu_device_type osc_device_type;extern struct lu_context_key osc_key;extern struct lu_context_key osc_session_key; -#define OSC_FLAGS (ASYNC_URGENT|ASYNC_READY) +#define OSC_FLAGS (ASYNC_URGENT | ASYNC_READY) int osc_lock_init(const struct lu_env *env, struct cl_object *obj, struct cl_lock *lock,
drivers/staging/lustre/lustre/osc/osc_io.c +1 -1
@@ -164,7 +164,7 @@ static int osc_io_submit(const struct lu_env *env, }spin_lock (&oap->oap_lock); - oap->oap_async_flags =ASYNC_URGENT |ASYNC_READY ; + oap->oap_async_flags =ASYNC_URGENT |ASYNC_READY ; oap->oap_async_flags |=ASYNC_COUNT_STABLE ;spin_unlock (&oap->oap_lock);
drivers/staging/lustre/lustre/osc/osc_request.c +7 -5
@@ -791,7 +791,7 @@ static int osc_destroy(const struct lu_env *env, struct obd_export *exp,static void osc_announce_cached (struct client_obd *cli,struct obdo *oa,long writing_bytes) { -u32 bits =OBD_MD_FLBLOCKS |OBD_MD_FLGRANT ; +u32 bits =OBD_MD_FLBLOCKS |OBD_MD_FLGRANT ;LASSERT (!(oa->o_valid & bits));
@@ -824,7 +824,7 @@ static void osc_announce_cached(struct client_obd *cli, struct obdo *oa, oa->o_undirty =0 ; }else {long max_in_flight = (cli->cl_max_pages_per_rpc << -PAGE_SHIFT )* +PAGE_SHIFT ) * (cli->cl_max_rpcs_in_flight +1 ); oa->o_undirty =max (cli->cl_dirty_max_pages <<PAGE_SHIFT , max_in_flight);
@@ -1463,7 +1463,8 @@ static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer, oa->o_valid &OBD_MD_FLFID ? oa->o_parent_oid :0 , oa->o_valid &OBD_MD_FLFID ? oa->o_parent_ver :0 ,POSTID (&oa->o_oi), pga[0 ]->off, - pga[page_count-1]->off + pga[page_count-1]->count - 1); + pga[page_count -1 ]->off + + pga[page_count - 1]->count - 1);CERROR ("original client csum %x (type %x), server csum %x (type %x), client csum now %x\n" , client_cksum, client_cksum_type, server_cksum, cksum_type, new_cksum);
@@ -1565,7 +1566,8 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)char *router ="" ;enum cksum_type cksum_type; - cksum_type =cksum_type_unpack (body->oa.o_valid&OBD_MD_FLFLAGS ? + cksum_type =cksum_type_unpack (body->oa.o_valid & +OBD_MD_FLFLAGS ? body->oa.o_flags :0 ); client_cksum = osc_checksum_bulk(rc, aa->aa_page_count, aa->aa_ppga, OST_READ,
@@ -1999,7 +2001,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, body =req_capsule_client_get (&req->rq_pill, &RMF_OST_BODY ); crattr->cra_oa = &body->oa;cl_req_attr_set (env, clerq, crattr, -OBD_MD_FLMTIME |OBD_MD_FLCTIME |OBD_MD_FLATIME ); +OBD_MD_FLMTIME |OBD_MD_FLCTIME |OBD_MD_FLATIME );lustre_msg_set_jobid (req->rq_reqmsg, crattr->cra_jobid);
drivers/staging/lustre/lustre/ptlrpc/import.c +4 -2
@@ -307,7 +307,8 @@ void ptlrpc_invalidate_import(struct obd_import *imp)*/ lwi =LWI_TIMEOUT_INTERVAL (cfs_timeout_cap (cfs_time_seconds (timeout)), - (timeout >1 )?cfs_time_seconds (1 ):cfs_time_seconds (1 )/2 , + (timeout >1 ) ?cfs_time_seconds (1 ) : +cfs_time_seconds (1 ) /2 ,NULL ,NULL ); rc = l_wait_event(imp->imp_recovery_waitq, (atomic_read(&imp->imp_inflight) == 0),
@@ -698,7 +699,8 @@ int ptlrpc_connect_import(struct obd_import *imp) request->rq_send_state =LUSTRE_IMP_CONNECTING ;/* Allow a slightly larger reply for future growth compatibility */ req_capsule_set_size (&request->rq_pill, &RMF_CONNECT_DATA ,RCL_SERVER , -sizeof (struct obd_connect_data )+16 *sizeof (__u64)); +sizeof (struct obd_connect_data ) + +16 *sizeof (__u64));ptlrpc_request_set_replen (request); request->rq_interpret_reply = ptlrpc_connect_interpret;
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +1 -1
@@ -191,7 +191,7 @@ ptlrpc_ldebugfs_register(struct dentry *root, char *dir,LASSERT (!*debugfs_root_ret);LASSERT (!*stats_ret); - svc_stats =lprocfs_alloc_stats (EXTRA_MAX_OPCODES +LUSTRE_MAX_OPCODES , + svc_stats =lprocfs_alloc_stats (EXTRA_MAX_OPCODES +LUSTRE_MAX_OPCODES ,0 );if (!svc_stats)return ;
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +2 -2
@@ -412,7 +412,7 @@ static int ptlrpcd(void *arg)* an argument, describing its "scope". */ rc =lu_context_init (&env.le_ctx, -LCT_CL_THREAD |LCT_REMEMBER |LCT_NOREF ); +LCT_CL_THREAD |LCT_REMEMBER |LCT_NOREF );if (rc ==0 ) { rc =lu_context_init (env.le_ses,LCT_SESSION |LCT_REMEMBER |LCT_NOREF );
@@ -567,7 +567,7 @@ int ptlrpcd_start(struct ptlrpcd_ctl *pc)* ptlrpcd thread (or a thread-set) has to be given an argument, * describing its "scope". */ - rc =lu_context_init (&pc->pc_env.le_ctx,LCT_CL_THREAD |LCT_REMEMBER ); + rc =lu_context_init (&pc->pc_env.le_ctx,LCT_CL_THREAD |LCT_REMEMBER );if (rc !=0 ) goto out;
drivers/staging/lustre/lustre/ptlrpc/service.c +1 -1
@@ -2057,7 +2057,7 @@ static int ptlrpc_main(void *arg) } rc =lu_context_init (&env->le_ctx, - svc->srv_ctx_tags|LCT_REMEMBER |LCT_NOREF ); + svc->srv_ctx_tags |LCT_REMEMBER |LCT_NOREF );if (rc) goto out_srv_fini;
Signature · 1 line
2.7.4
PATCH 2/3 staging/lustre: Make alignment match open parenthesis
In reply to Oleg DrokinThis patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.
--- .../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 2 +- .../lustre/lnet/libcfs/linux/linux-crypto.c | 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 10 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +- drivers/staging/lustre/lustre/llite/rw.c | 4 +- drivers/staging/lustre/lustre/llite/statahead.c | 3 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 22 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 288 ++++++++++----------- 30 files changed, 255 insertions(+), 244 deletions(-)
drivers/staging/lustre/include/linux/libcfs/libcfs.h +3 -3
@@ -138,8 +138,8 @@ struct lnet_debugfs_symlink_def {void lustre_insert_debugfs (struct ctl_table *table,const struct lnet_debugfs_symlink_def *symlinks);int lprocfs_call_handler (void *data,int write,loff_t *ppos, -void __user *buffer,size_t *lenp, -int (*handler)(void *data,int write, -loff_t pos,void __user *buffer,int len)); +void __user *buffer,size_t *lenp, +int (*handler)(void *data,int write,loff_t pos, +void __user *buffer,int len));#endif /* _LIBCFS_H */
drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h +5 -5
@@ -247,19 +247,19 @@ do { \#define LCONSOLE_EMERG (format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__) int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata, - const char *format1, ...) + const char *format1, ...) __printf(2, 3); int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, - const char *format1, - va_list args, const char *format2, ...) + const char *format1, + va_list args, const char *format2, ...) __printf(4, 5);/* other external symbols that tracefile provides: */ int cfs_trace_copyin_string (char *knl_buffer,int knl_buffer_nob, -const char __user *usr_buffer,int usr_buffer_nob); +const char __user *usr_buffer,int usr_buffer_nob);int cfs_trace_copyout_string (char __user *usr_buffer,int usr_buffer_nob, -const char *knl_buffer,char *append); +const char *knl_buffer,char *append);#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +1 -1
@@ -618,7 +618,7 @@ static int kiblnd_get_completion_vector(struct kib_conn *conn, int cpt) }struct kib_conn *kiblnd_create_conn (struct kib_peer *peer,struct rdma_cm_id *cmid, -int state,int version) +int state,int version) {/* * CAVEAT EMPTOR:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +3 -2
@@ -41,9 +41,10 @@static void kiblnd_peer_alive (struct kib_peer *peer);static void kiblnd_peer_connect_failed (struct kib_peer *peer,int active,int error);static void kiblnd_init_tx_msg (lnet_ni_t *ni,struct kib_tx *tx, -int type,int body_nob); +int type,int body_nob);static int kiblnd_init_rdma (struct kib_conn *conn,struct kib_tx *tx,int type, -int resid,struct kib_rdma_desc *dstrd,__u64 dstcookie); +int resid,struct kib_rdma_desc *dstrd, +__u64 dstcookie);static void kiblnd_queue_tx_locked (struct kib_tx *tx,struct kib_conn *conn);static void kiblnd_queue_tx (struct kib_tx *tx,struct kib_conn *conn);static void kiblnd_unmap_tx (lnet_ni_t *ni,struct kib_tx *tx);
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +1 -1
@@ -631,7 +631,7 @@ int ksocknal_close_peer_conns_locked(struct ksock_peer *peer,int ksocknal_close_conn_and_siblings (struct ksock_conn *conn,int why);int ksocknal_close_matching_conns (lnet_process_id_t id,__u32 ipaddr);struct ksock_conn *ksocknal_find_conn_locked (struct ksock_peer *peer, -struct ksock_tx *tx,int nonblk); +struct ksock_tx *tx,int nonblk);int ksocknal_launch_packet (lnet_ni_t *ni,struct ksock_tx *tx,lnet_process_id_t id);
drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c +2 -2
@@ -95,8 +95,8 @@ static int cfs_crypto_hash_alloc(enum cfs_crypto_hash_alg hash_alg, err =crypto_ahash_setkey (tfm, key, key_len); else if ((*type)->cht_key != 0) err =crypto_ahash_setkey (tfm, - (unsigned char *)&((*type)->cht_key), - (*type)->cht_size); + (unsigned char *)&((*type)->cht_key), + (*type)->cht_size);if (err !=0 ) {ahash_request_free (*req);
drivers/staging/lustre/lustre/include/cl_object.h +1 -1
@@ -323,7 +323,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,pgoff_t index); +struct cl_page *page,pgoff_t index);/** * Initialize lock slice for this layer. Called top-to-bottom through * every object layer when a new cl_lock is instantiated. Layer
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +2 -2
@@ -221,7 +221,7 @@ void ldlm_extent_unlink_lock(struct ldlm_lock *lock) }void ldlm_extent_policy_wire_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy) +ldlm_policy_data_t *lpolicy) {memset (lpolicy,0 ,sizeof (*lpolicy)); lpolicy->l_extent.start = wpolicy->l_extent.start;
@@ -230,7 +230,7 @@ void ldlm_extent_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy, }void ldlm_extent_policy_local_to_wire (const ldlm_policy_data_t *lpolicy, -ldlm_wire_policy_data_t *wpolicy) +ldlm_wire_policy_data_t *wpolicy) {memset (wpolicy,0 ,sizeof (*wpolicy)); wpolicy->l_extent.start = lpolicy->l_extent.start;
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +2 -2
@@ -166,7 +166,7 @@ reprocess:*/ list_for_each (tmp, &res->lr_granted) { lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + l_res_link);if (ldlm_same_flock_owner (lock, req)) { ownlocks = tmp;break ;
@@ -182,7 +182,7 @@ reprocess:*/ list_for_each (tmp, &res->lr_granted) { lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + l_res_link);if (ldlm_same_flock_owner (lock, req)) {if (!ownlocks)
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +8 -9
@@ -100,8 +100,8 @@ enum {int ldlm_cancel_lru (struct ldlm_namespace *ns,int nr,enum ldlm_cancel_flags sync,int flags);int ldlm_cancel_lru_local (struct ldlm_namespace *ns, -struct list_head *cancels,int count,int max, -enum ldlm_cancel_flags cancel_flags,int flags); +struct list_head *cancels,int count,int max, +enum ldlm_cancel_flags cancel_flags,int flags);extern int ldlm_enqueue_min;/* ldlm_resource.c */
@@ -200,8 +200,7 @@ ldlm_interval_extent(struct ldlm_interval *node)LASSERT (!list_empty (&node->li_group)); - lock = list_entry(node->li_group.next, struct ldlm_lock, - l_sl_policy); + lock = list_entry(node->li_group.next, struct ldlm_lock, l_sl_policy);return &lock->l_policy_data.l_extent; }
@@ -302,7 +301,7 @@ static inline int is_granted_or_cancelled(struct ldlm_lock *lock)lock_res_and_lock (lock);if ((lock->l_req_mode == lock->l_granted_mode) && - !ldlm_is_cp_reqd (lock)) + !ldlm_is_cp_reqd (lock)) ret =1 ;else if (ldlm_is_failed (lock) ||ldlm_is_cancel (lock)) ret =1 ;
@@ -326,13 +325,13 @@ void ldlm_ibits_policy_wire_to_local(const ldlm_wire_policy_data_t *wpolicy,void ldlm_ibits_policy_local_to_wire (const ldlm_policy_data_t *lpolicy,ldlm_wire_policy_data_t *wpolicy);void ldlm_extent_policy_wire_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy); +ldlm_policy_data_t *lpolicy);void ldlm_extent_policy_local_to_wire (const ldlm_policy_data_t *lpolicy, -ldlm_wire_policy_data_t *wpolicy); +ldlm_wire_policy_data_t *wpolicy);void ldlm_flock_policy_wire18_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy); +ldlm_policy_data_t *lpolicy);void ldlm_flock_policy_wire21_to_local (const ldlm_wire_policy_data_t *wpolicy, -ldlm_policy_data_t *lpolicy); +ldlm_policy_data_t *lpolicy);void ldlm_flock_policy_local_to_wire (const ldlm_policy_data_t *lpolicy,ldlm_wire_policy_data_t *wpolicy);
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +4 -4
@@ -82,7 +82,7 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,if (priority) {list_del (&item->oic_item);list_add (&item->oic_item, - &imp->imp_conn_list); + &imp->imp_conn_list); item->oic_last_attempt =0 ; } CDEBUG(D_HA, "imp %p@%s: found existing conn %s%s\n",
@@ -102,7 +102,7 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,list_add (&imp_conn->oic_item, &imp->imp_conn_list); else list_add_tail(&imp_conn->oic_item, - &imp->imp_conn_list); + &imp->imp_conn_list);CDEBUG (D_HA ,"imp %p@%s: add connection %s at %s\n" , imp, imp->imp_obd->obd_name, uuid->uuid, (priority ?"head" :"tail" ));
@@ -692,7 +692,7 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)if (rs->rs_transno > exp->exp_last_committed) {/* not committed already */ list_add_tail (&rs->rs_obd_list, - &exp->exp_uncommitted_replies); + &exp->exp_uncommitted_replies); }spin_unlock (&exp->exp_uncommitted_replies_lock);
@@ -797,7 +797,7 @@ void ldlm_dump_export_locks(struct obd_export *exp)CERROR ("dumping locks for export %p,ignore if the unmount doesn't hang\n" , exp);list_for_each_entry (lock, &exp->exp_locks_list, - l_exp_refs_link) + l_exp_refs_link)LDLM_ERROR (lock,"lock:" ); }spin_unlock (&exp->exp_locks_list_guard);
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +13 -13
@@ -937,7 +937,7 @@ static void search_granted_lock(struct list_head *queue,/* go to next policy group within mode group */ tmp = policy_end->l_res_link.next; lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + l_res_link); }/* loop over policy groups within the mode group */ /* insert point is last lock of the mode group,
@@ -1116,7 +1116,7 @@ static struct ldlm_lock *search_queue(struct list_head *queue,* of bits. */ if (lock->l_resource->lr_type ==LDLM_IBITS && - ((lock->l_policy_data.l_inodebits.bits & + ((lock->l_policy_data.l_inodebits.bits & policy->l_inodebits.bits) != policy->l_inodebits.bits))continue ;
@@ -1376,12 +1376,12 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,if (size ==sizeof (struct ost_lvb )) {if (loc ==RCL_CLIENT ) lvb =req_capsule_client_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_ost_lvb); + &RMF_DLM_LVB , + lustre_swab_ost_lvb);else lvb =req_capsule_server_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_ost_lvb); + &RMF_DLM_LVB , + lustre_swab_ost_lvb);if (unlikely (!lvb)) {LDLM_ERROR (lock,"no LVB" );return -EPROTO ;
@@ -1393,8 +1393,8 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,if (loc ==RCL_CLIENT ) lvb =req_capsule_client_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_ost_lvb_v1); + &RMF_DLM_LVB , + lustre_swab_ost_lvb_v1);else lvb = req_capsule_server_sized_swab_get(pill, &RMF_DLM_LVB, size,
@@ -1418,12 +1418,12 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,if (size ==sizeof (struct lquota_lvb )) {if (loc ==RCL_CLIENT ) lvb =req_capsule_client_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_lquota_lvb); + &RMF_DLM_LVB , + lustre_swab_lquota_lvb);else lvb =req_capsule_server_swab_get (pill, - &RMF_DLM_LVB , - lustre_swab_lquota_lvb); + &RMF_DLM_LVB , + lustre_swab_lquota_lvb);if (unlikely (!lvb)) {LDLM_ERROR (lock,"no LVB" );return -EPROTO ;
@@ -1709,7 +1709,7 @@ static int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)return -ENOENT ; gl_work = list_entry(arg->list->next, struct ldlm_glimpse_work, - gl_list); + gl_list);list_del_init (&gl_work->gl_list); lock = gl_work->gl_lock;
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +11 -10
@@ -706,12 +706,12 @@ static struct ldlm_bl_work_item *ldlm_bl_get_work(struct ldlm_bl_pool *blp)if (!list_empty (&blp->blp_list) && (list_empty (&blp->blp_prio_list) || num_bl ==0 )) blwi =list_entry (blp->blp_list.next, - struct ldlm_bl_work_item, blwi_entry); + struct ldlm_bl_work_item, blwi_entry);else if (!list_empty (&blp->blp_prio_list)) blwi =list_entry (blp->blp_prio_list.next, - struct ldlm_bl_work_item, - blwi_entry); + struct ldlm_bl_work_item, + blwi_entry);if (blwi) {if (++num_bl >=atomic_read (&blp->blp_num_threads))
@@ -741,7 +741,7 @@ static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp)init_completion (&bltd.bltd_comp); bltd.bltd_num =atomic_read (&blp->blp_num_threads);snprintf (bltd.bltd_name,sizeof (bltd.bltd_name), -"ldlm_bl_%02d" , bltd.bltd_num); +"ldlm_bl_%02d" , bltd.bltd_num); task =kthread_run (ldlm_bl_thread_main, &bltd,"%s" , bltd.bltd_name);if (IS_ERR (task)) { CERROR("cannot start LDLM thread ldlm_bl_%02d: rc %ld\n",
@@ -786,8 +786,8 @@ static int ldlm_bl_thread_main(void *arg)if (!blwi) {atomic_dec (&blp->blp_busy_threads);l_wait_event_exclusive (blp->blp_waitq, - (blwi =ldlm_bl_get_work (blp)), - &lwi); + (blwi =ldlm_bl_get_work (blp)), + &lwi); busy =atomic_inc_return (&blp->blp_busy_threads); }else { busy =atomic_read (&blp->blp_busy_threads);
@@ -1094,16 +1094,17 @@ int ldlm_init(void)return -ENOMEM ; ldlm_lock_slab =kmem_cache_create ("ldlm_locks" , -sizeof (struct ldlm_lock ),0 , -SLAB_HWCACHE_ALIGN |SLAB_DESTROY_BY_RCU ,NULL ); +sizeof (struct ldlm_lock ),0 , +SLAB_HWCACHE_ALIGN | +SLAB_DESTROY_BY_RCU ,NULL );if (!ldlm_lock_slab) {kmem_cache_destroy (ldlm_resource_slab);return -ENOMEM ; } ldlm_interval_slab =kmem_cache_create ("interval_node" , -sizeof (struct ldlm_interval ), -0 ,SLAB_HWCACHE_ALIGN ,NULL ); +sizeof (struct ldlm_interval ), +0 ,SLAB_HWCACHE_ALIGN ,NULL );if (!ldlm_interval_slab) {kmem_cache_destroy (ldlm_resource_slab);kmem_cache_destroy (ldlm_lock_slab);
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +2 -2
@@ -995,7 +995,7 @@ static int ldlm_pools_thread_main(void *arg)wake_up (&thread->t_ctl_waitq);CDEBUG (D_DLMTRACE ,"%s: pool thread starting, process %d\n" , -"ldlm_poold" ,current_pid ()); +"ldlm_poold" ,current_pid ());while (1 ) {struct l_wait_info lwi;
@@ -1025,7 +1025,7 @@ static int ldlm_pools_thread_main(void *arg)wake_up (&thread->t_ctl_waitq);CDEBUG (D_DLMTRACE ,"%s: pool thread exiting, process %d\n" , -"ldlm_poold" ,current_pid ()); +"ldlm_poold" ,current_pid ());complete_and_exit (&ldlm_pools_comp,0 ); }
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +4 -6
@@ -1178,8 +1178,7 @@ static enum ldlm_policy_res ldlm_cancel_lrur_policy(struct ldlm_namespace *ns, slv =ldlm_pool_get_slv (pl); lvf =ldlm_pool_get_lvf (pl); - la =cfs_duration_sec (cfs_time_sub (cur, - lock->l_last_used)); + la =cfs_duration_sec (cfs_time_sub (cur, lock->l_last_used)); lv = lvf * la * unused;/* Inform pool about current CLV to see it via debugfs. */
@@ -1372,7 +1371,7 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns,break ;list_for_each_entry_safe (lock, next, &ns->ns_unused_list, - l_lru) { + l_lru) {/* No locks which got blocking requests. */ LASSERT (!ldlm_is_bl_ast (lock));
@@ -1608,8 +1607,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count,*/ while (count >0 ) {LASSERT (!list_empty (cancels)); - lock = list_entry(cancels->next, struct ldlm_lock, - l_bl_ast); + lock = list_entry(cancels->next, struct ldlm_lock, l_bl_ast);LASSERT (lock->l_conn_export);if (exp_connect_cancelset (lock->l_conn_export)) {
@@ -2008,7 +2006,7 @@ static void ldlm_cancel_unused_locks_for_replay(struct ldlm_namespace *ns) LCF_LOCAL, LDLM_CANCEL_NO_WAIT);CDEBUG (D_DLMTRACE ,"Canceled %d unused locks from namespace %s\n" , - canceled,ldlm_ns_name (ns)); + canceled,ldlm_ns_name (ns)); }int ldlm_replay_locks (struct obd_import *imp)
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +2 -3
@@ -758,8 +758,7 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,*/ lock_res (res);list_for_each (tmp, q) { - lock = list_entry(tmp, struct ldlm_lock, - l_res_link); + lock = list_entry(tmp, struct ldlm_lock, l_res_link);if (ldlm_is_cleaned (lock)) { lock =NULL ;continue ;
@@ -1381,7 +1380,7 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res)if (!list_empty (&res->lr_granted)) {CDEBUG (level,"Granted locks (in reverse order):\n" );list_for_each_entry_reverse (lock, &res->lr_granted, - l_res_link) { + l_res_link) {LDLM_DEBUG_LIMIT (level, lock,"###" );if (!(level &D_CANTMASK ) && ++granted > ldlm_dump_granted_max) {
drivers/staging/lustre/lustre/llite/llite_lib.c +2 -2
@@ -1357,8 +1357,8 @@ static int ll_setattr_done_writing(struct inode *inode, rc =ll_som_update (inode, op_data); else if (rc) {CERROR ("%s: inode " DFID " mdc truncate failed: rc = %d\n" , -ll_i2sbi (inode)->ll_md_exp->exp_obd->obd_name, -PFID (ll_inode2fid (inode)), rc); +ll_i2sbi (inode)->ll_md_exp->exp_obd->obd_name, +PFID (ll_inode2fid (inode)), rc); }return rc; }
drivers/staging/lustre/lustre/llite/rw.c +2 -2
@@ -648,8 +648,8 @@ 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 )) { +if ((stride_gap !=0 || ras->ras_consecutive_stride_requests ==0 ) && + !stride_io_mode (ras)) { ras->ras_stride_pages = ras->ras_consecutive_pages; ras->ras_stride_length = ras->ras_consecutive_pages + stride_gap;
drivers/staging/lustre/lustre/llite/statahead.c +2 -1
@@ -918,7 +918,8 @@ static void ll_statahead_one(struct dentry *parent, const char *entry_name,if (rc) { rc1 =ll_sa_entry_to_stated (sai, entry, - rc <0 ?SA_ENTRY_INVA :SA_ENTRY_SUCC ); + rc <0 ?SA_ENTRY_INVA : +SA_ENTRY_SUCC );if (rc1 ==0 && entry->se_index == sai->sai_index_wait)wake_up (&sai->sai_waitq); }else {
drivers/staging/lustre/lustre/llite/vvp_page.c +2 -2
@@ -249,7 +249,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->vob_discard_page_warned ==0 ) { + obj->vob_discard_page_warned ==0 ) { obj->vob_discard_page_warned =1 ;ll_dirty_page_discard_warn (vmpage, ioret); }
@@ -549,7 +549,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,pgoff_t index) +struct cl_page *page,pgoff_t index) {struct vvp_page *vpg =cl_object_page_slice (obj, page);struct page *vmpage = page->cp_vmpage;
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -2
@@ -2162,8 +2162,8 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp, &mgi->group, set); }else if (next_id) { err =obd_set_info_async (env, tgt->ltd_exp, - keylen, key, vallen, - ((struct obd_id_info *)val)->data, set); + keylen, key, vallen, + ((struct obd_id_info *)val)->data, set); }else {/* Only want a specific OSC */ if (check_uuid &&
drivers/staging/lustre/lustre/mdc/mdc_locks.c +2 -1
@@ -665,7 +665,8 @@ static int mdc_finish_enqueue(struct obd_export *exp, lvb_len =req_capsule_get_size (pill, &RMF_DLM_LVB ,RCL_SERVER );if (lvb_len >0 ) { lvb_data =req_capsule_server_sized_get (pill, - &RMF_DLM_LVB , lvb_len); + &RMF_DLM_LVB , + lvb_len);if (!lvb_data)return -EPROTO ; }
drivers/staging/lustre/lustre/obdclass/obd_mount.c +1 -1
@@ -68,7 +68,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;
drivers/staging/lustre/lustre/osc/osc_cache.c +2 -2
@@ -958,8 +958,8 @@ static int osc_extent_wait(const struct lu_env *env, struct osc_extent *ext, rc =l_wait_event (ext->oe_waitq,extent_wait_cb (ext, state), &lwi);if (rc == -ETIMEDOUT ) {OSC_EXTENT_DUMP (D_ERROR , ext, -"%s: wait ext to %d timedout, recovery in progress?\n" , -osc_export (obj)->exp_obd->obd_name, state); +"%s: wait ext to %d timedout, recovery in progress?\n" , +osc_export (obj)->exp_obd->obd_name, state); lwi =LWI_INTR (NULL ,NULL ); rc = l_wait_event(ext->oe_waitq, extent_wait_cb(ext, state),
drivers/staging/lustre/lustre/ptlrpc/niobuf.c +2 -1
@@ -398,7 +398,8 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)lustre_msg_set_status (req->rq_repmsg,ptlrpc_status_hton (req->rq_status));lustre_msg_set_opc (req->rq_repmsg, - req->rq_reqmsg ?lustre_msg_get_opc (req->rq_reqmsg) :0 ); + req->rq_reqmsg ? +lustre_msg_get_opc (req->rq_reqmsg) :0 );target_pack_pool_reply (req);
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +3 -2
@@ -1203,8 +1203,9 @@ __u32 lustre_msg_calc_cksum(struct lustre_msg *msg)unsigned int hsize =4 ;cfs_crypto_hash_digest (CFS_HASH_ALG_CRC32 , (unsigned char *)pb, -lustre_msg_buflen (msg,MSG_PTLRPC_BODY_OFF ), -NULL ,0 , (unsigned char *)&crc, &hsize); +lustre_msg_buflen (msg, +MSG_PTLRPC_BODY_OFF ), +NULL ,0 , (unsigned char *)&crc, &hsize);return crc; }default :
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +3 -2
@@ -523,8 +523,9 @@ int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg,for (i =0 ; i < desc->bd_iov_count; i++) {cfs_crypto_hash_update_page (hdesc, desc->bd_iov[i].bv_page, - desc->bd_iov[i].bv_offset & ~PAGE_MASK , - desc->bd_iov[i].bv_len); + desc->bd_iov[i].bv_offset & + ~PAGE_MASK , + desc->bd_iov[i].bv_len); }if (hashsize > buflen) {
drivers/staging/lustre/lustre/ptlrpc/sec_plain.c +12 -6
@@ -249,9 +249,12 @@ int plain_ctx_verify(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)unsigned int hsize =4 ;cfs_crypto_hash_digest (CFS_HASH_ALG_CRC32 , -lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF ,0 ), -lustre_msg_buflen (msg,PLAIN_PACK_MSG_OFF ), -NULL ,0 , (unsigned char *)&cksum, &hsize); +lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF , +0 ), +lustre_msg_buflen (msg, +PLAIN_PACK_MSG_OFF ), +NULL ,0 , (unsigned char *)&cksum, + &hsize);if (cksum != msg->lm_cksum) { CDEBUG(D_SEC, "early reply checksum mismatch: %08x != %08x\n",
@@ -869,9 +872,12 @@ int plain_authorize(struct ptlrpc_request *req)unsigned int hsize =4 ;cfs_crypto_hash_digest (CFS_HASH_ALG_CRC32 , -lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF ,0 ), -lustre_msg_buflen (msg,PLAIN_PACK_MSG_OFF ), -NULL ,0 , (unsigned char *)&msg->lm_cksum, &hsize); +lustre_msg_buf (msg,PLAIN_PACK_MSG_OFF , +0 ), +lustre_msg_buflen (msg, +PLAIN_PACK_MSG_OFF ), +NULL ,0 , (unsigned char *)&msg->lm_cksum, + &hsize); req->rq_reply_off =0 ; }
drivers/staging/lustre/lustre/ptlrpc/service.c +12 -10
@@ -1990,11 +1990,12 @@ ptlrpc_wait_event(struct ptlrpc_service_part *svcpt,cond_resched ();l_wait_event_exclusive_head (svcpt->scp_waitq, -ptlrpc_thread_stopping (thread) || -ptlrpc_server_request_incoming (svcpt) || -ptlrpc_server_request_pending (svcpt, false) || -ptlrpc_rqbd_pending (svcpt) || -ptlrpc_at_check (svcpt), &lwi); +ptlrpc_thread_stopping (thread) || +ptlrpc_server_request_incoming (svcpt) || +ptlrpc_server_request_pending (svcpt, + false) || +ptlrpc_rqbd_pending (svcpt) || +ptlrpc_at_check (svcpt), &lwi);if (ptlrpc_thread_stopping (thread))return -EINTR ;
@@ -2357,7 +2358,7 @@ static void ptlrpc_svcpt_stop_threads(struct ptlrpc_service_part *svcpt)while (!list_empty (&zombie)) { thread =list_entry (zombie.next, - struct ptlrpc_thread, t_link); + struct ptlrpc_thread, t_link);list_del (&thread->t_link);kfree (thread); }
@@ -2547,8 +2548,8 @@ int ptlrpc_hr_init(void)LASSERT (hrp->hrp_nthrs >0 ); hrp->hrp_thrs =kzalloc_node (hrp->hrp_nthrs *sizeof (*hrt),GFP_NOFS , -cfs_cpt_spread_node (ptlrpc_hr.hr_cpt_table, - i)); +cfs_cpt_spread_node (ptlrpc_hr.hr_cpt_table, + i));if (!hrp->hrp_thrs) { rc = -ENOMEM ; goto out;
@@ -2601,7 +2602,8 @@ static void ptlrpc_wait_replies(struct ptlrpc_service_part *svcpt) NULL, NULL); rc =l_wait_event (svcpt->scp_waitq, -atomic_read (&svcpt->scp_nreps_difficult) ==0 , &lwi); +atomic_read (&svcpt->scp_nreps_difficult) ==0 , + &lwi);if (rc ==0 )break ; CWARN("Unexpectedly long timeout %s %p\n",
@@ -2647,7 +2649,7 @@ ptlrpc_service_unlink_rqbd(struct ptlrpc_service *svc)* event with its 'unlink' flag set for each posted rqbd */ list_for_each_entry (rqbd, &svcpt->scp_rqbd_posted, - rqbd_list) { + rqbd_list) { rc =LNetMDUnlink (rqbd->rqbd_md_h);LASSERT (rc ==0 || rc == -ENOENT ); }
drivers/staging/lustre/lustre/ptlrpc/wiretest.c +144 -144
508 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 3/3 staging/lustre: Remove unused cp_error from struct cl_page
In reply to Oleg Drokincp_error member is not really set anywhere, so kill it and the only printing user of it too.
--- drivers/staging/lustre/lustre/include/cl_object.h | 2 -- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/include/cl_object.h +0 -2
@@ -701,8 +701,6 @@ enum cl_page_type {struct cl_page {/** Reference counter. */ atomic_t cp_ref; -/** Transfer error. */ -int cp_error;/** An object this page is a part of. Immutable after creation. */ struct cl_object *cp_obj;/** vmpage */
drivers/staging/lustre/lustre/obdclass/cl_page.c +2 -2
@@ -981,9 +981,9 @@ void cl_page_header_print(const struct lu_env *env, void *cookie, lu_printer_t printer, const struct cl_page *pg) { (*printer)(env, cookie, -"page@%p[%d %p %d %d %d %p %p]\n" , +"page@%p[%d %p %d %d %p %p]\n" , pg,atomic_read (&pg->cp_ref), pg->cp_obj, - pg->cp_state, pg->cp_error, pg->cp_type, + pg->cp_state, pg->cp_type, pg->cp_owner, pg->cp_req); }EXPORT_SYMBOL (cl_page_header_print);
Signature · 1 line
2.7.4