staging: lustre: fix code styling issues and remove macros without users
v4 cover staging: lustre: fix code styling issues and remove macros without users
These patches fix:
- multi line comment styling
- line over 80 characters
- drops macros without any users
- coding style for error messages
Changes in v4:
- resolved build errors
Aastha Gupta (7):
staging: lustre: drop macro that has no uses
staging: lustre: fid: fix line over 80 characters
staging: lustre: fld: fix line over 80 characters
staging: lustre: ldlm: fix lines over 80 characters in ldlm files
staging: lustre: llite: fix lines over 80 characters in llite files
staging: lustre: llite: fix coding style for error messages
staging: lustre: lllite: fix multi line comments style
drivers/staging/lustre/lustre/fid/fid_request.c | 3 +- drivers/staging/lustre/lustre/fld/fld_request.c | 3 +- drivers/staging/lustre/lustre/include/lu_object.h | 2 -- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 3 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 33 +++++++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 42 +++++++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +- drivers/staging/lustre/lustre/llite/dcache.c | 9 +++-- drivers/staging/lustre/lustre/llite/dir.c | 20 ++++++----- drivers/staging/lustre/lustre/llite/file.c | 13 ++++--- .../staging/lustre/lustre/llite/llite_internal.h | 18 ++++++---- drivers/staging/lustre/lustre/llite/llite_lib.c | 29 +++++++++------ drivers/staging/lustre/lustre/llite/llite_mmap.c | 3 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 +- drivers/staging/lustre/lustre/llite/namei.c | 15 +++++--- drivers/staging/lustre/lustre/llite/rw.c | 17 +++++---- drivers/staging/lustre/lustre/llite/statahead.c | 3 +- drivers/staging/lustre/lustre/llite/super25.c | 3 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 +- 23 files changed, 155 insertions(+), 90 deletions(-)
Signature · 1 line
2.7.4
PATCH v4 1/7 staging: lustre: drop macro that has no uses
This patch removes DLUBUF and PLUBUF macro, both of which have no users.
--- drivers/staging/lustre/lustre/include/lu_object.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/lustre/lustre/include/lu_object.h +0 -2
@@ -1303,8 +1303,6 @@ struct lu_buf {size_t lb_len; }; -#define DLUBUF "(%p %zu)" -#define PLUBUF (buf) (buf)->lb_buf, (buf)->lb_len/** * One-time initializers, called at obdclass module initialization, not * exported.
Signature · 1 line
2.7.4
PATCH v4 2/7 staging: lustre: fid: fix line over 80 characters
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: line over 80 characters
--- drivers/staging/lustre/lustre/fid/fid_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/fid/fid_request.c +2 -1
@@ -279,7 +279,8 @@ int seq_client_alloc_fid(const struct lu_env *env, *fid = seq->lcs_fid;mutex_unlock (&seq->lcs_mutex); -CDEBUG (D_INFO ,"%s: Allocated FID " DFID "\n" , seq->lcs_name,PFID (fid)); +CDEBUG (D_INFO , +"%s: Allocated FID " DFID "\n" , seq->lcs_name,PFID (fid));return rc; }EXPORT_SYMBOL (seq_client_alloc_fid);
Signature · 1 line
2.7.4
Re: [PATCH v4 2/7] staging: lustre: fid: fix line over 80 characters
Quoted 6 lines · Aastha Gupta
This patch fixes checkpatch.pl warning:
WARNING: line over 80 characters
Signed-off-by Aastha Gupta <[email protected]>
Quoted 21 lines
---
drivers/staging/lustre/lustre/fid/fid_request.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/lustre/lustre/fid/fid_request.c +2
-1@@ -279,7 +279,8 @@ int seq_client_alloc_fid(const struct lu_env *env, *fid = seq->lcs_fid;mutex_unlock (&seq->lcs_mutex); -CDEBUG (D_INFO ,"%s: Allocated FID " DFID "\n" , seq->lcs_name,PFID (fid)); +CDEBUG (D_INFO , +"%s: Allocated FID " DFID "\n" , seq->lcs_name,PFID (fid));return rc; }EXPORT_SYMBOL (seq_client_alloc_fid);Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH v4 3/7 staging: lustre: fld: fix line over 80 characters
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: line over 80 characters
--- drivers/staging/lustre/lustre/fld/fld_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/fld/fld_request.c +2 -1
@@ -425,7 +425,8 @@ int fld_client_lookup(struct lu_client_fld *fld, u64 seq, u32 *mds, target =fld_client_get_target (fld, seq);LASSERT (target); -CDEBUG (D_INFO ,"%s: Lookup fld entry (seq: %#llx) on target %s (idx %llu)\n" , +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); res.lsr_start = seq;
Signature · 1 line
2.7.4
Re: [PATCH v4 3/7] staging: lustre: fld: fix line over 80 characters
Quoted 6 lines · Aastha Gupta
This patch fixes checkpatch.pl warning:
WARNING: line over 80 characters
Signed-off-by Aastha Gupta <[email protected]>
Quoted 21 lines
---
drivers/staging/lustre/lustre/fld/fld_request.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/lustre/lustre/fld/fld_request.c +2
-1@@ -425,7 +425,8 @@ int fld_client_lookup(struct lu_client_fld *fld, u64 seq, u32 *mds, target =fld_client_get_target (fld, seq);LASSERT (target); -CDEBUG (D_INFO ,"%s: Lookup fld entry (seq: %#llx) on target %s (idx %llu)\n" , +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); res.lsr_start = seq;Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH v4 4/7 staging: lustre: ldlm: fix lines over 80 characters in ldlm files
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: line over 80 characters
--- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 3 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 33 +++++++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 42 +++++++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +- 8 files changed, 65 insertions(+), 36 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +2 -1
@@ -207,7 +207,8 @@ void ldlm_extent_add_lock(struct ldlm_resource *res,continue ;if (ldlm_extent_overlap (&lck->l_req_extent, &lock->l_req_extent)) { -CDEBUG (D_ERROR ,"granting conflicting lock %p %p\n" , +CDEBUG (D_ERROR , +"granting conflicting lock %p %p\n" , lck, lock);ldlm_resource_dump (D_ERROR , res);LBUG ();
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +4 -2
@@ -479,7 +479,8 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)return 0 ; } -LDLM_DEBUG (lock,"client-side enqueue returned a blocked lock, sleeping" ); +LDLM_DEBUG (lock, +"client-side enqueue returned a blocked lock, sleeping" ); fwd.fwd_lock = lock; obd =class_exp2obd (lock->l_conn_export);
@@ -561,7 +562,8 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) mode = lock->l_granted_mode;if (ldlm_is_flock_deadlock (lock)) { -LDLM_DEBUG (lock,"client-side enqueue deadlock received" ); +LDLM_DEBUG (lock, +"client-side enqueue deadlock received" ); rc = -EDEADLK ; }ldlm_flock_destroy (lock, mode,LDLM_FL_WAIT_NOREPROC );
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +1 -1
@@ -88,7 +88,7 @@ struct ldlm_namespace *ldlm_namespace_first_locked(enum ldlm_side client);/* ldlm_request.c */ /* Cancel lru flag, it indicates we cancel aged locks. */ enum { -LDLM_LRU_FLAG_AGED =BIT (0 ),/* Cancel aged locks (non lru resize). */ +LDLM_LRU_FLAG_AGED =BIT (0 ),/* Cancel old non-LRU resize locks */ LDLM_LRU_FLAG_PASSED =BIT (1 ),/* Cancel passed number of locks. */ LDLM_LRU_FLAG_SHRINK =BIT (2 ),/* Cancel locks from shrinker. */ LDLM_LRU_FLAG_LRUR =BIT (3 ),/* Cancel locks from lru resize. */
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +22 -11
@@ -1035,7 +1035,8 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)ldlm_extent_add_lock (res, lock); }else if (res->lr_type ==LDLM_FLOCK ) {/* -* We should not add locks to granted list in the following cases: +* We should not add locks to granted list in +* the following cases: * - this is an UNLOCK but not a real lock; * - this is a TEST lock; * - this is a F_CANCELLK lock (async flock has req_mode == 0)
@@ -2051,13 +2052,16 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,libcfs_debug_vmsg2 (msgdata, fmt, args," ns: \?\? lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: \?\? rrc=\?\? type: \?\?\? flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n" , lock, - lock->l_handle.h_cookie,atomic_read (&lock->l_refc), + lock->l_handle.h_cookie, +atomic_read (&lock->l_refc), lock->l_readers, lock->l_writers, ldlm_lockname[lock->l_granted_mode], ldlm_lockname[lock->l_req_mode], - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , - lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type); + lock->l_pid, lock->l_callback_timeout, + lock->l_lvb_type);va_end (args);return ; }
@@ -2067,7 +2071,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, libcfs_debug_vmsg2(msgdata, fmt, args, " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s [%llu->%llu] (req %llu->%llu) flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n", ldlm_lock_to_ns_name(lock), lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), + lock->l_handle.h_cookie, + atomic_read(&lock->l_refc), lock->l_readers, lock->l_writers, ldlm_lockname[lock->l_granted_mode], ldlm_lockname[lock->l_req_mode],
@@ -2076,8 +2081,10 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, ldlm_typename[resource->lr_type], lock->l_policy_data.l_extent.start, lock->l_policy_data.l_extent.end, - lock->l_req_extent.start, lock->l_req_extent.end, - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_req_extent.start, + lock->l_req_extent.end, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);
@@ -2087,7 +2094,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, libcfs_debug_vmsg2(msgdata, fmt, args, " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s pid: %d [%llu->%llu] flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu\n", ldlm_lock_to_ns_name(lock), lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), + lock->l_handle.h_cookie, + atomic_read(&lock->l_refc), lock->l_readers, lock->l_writers, ldlm_lockname[lock->l_granted_mode], ldlm_lockname[lock->l_req_mode],
@@ -2097,7 +2105,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, lock->l_policy_data.l_flock.pid, lock->l_policy_data.l_flock.start, lock->l_policy_data.l_flock.end, - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout);break ;
@@ -2115,7 +2124,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, lock->l_policy_data.l_inodebits.bits,atomic_read (&resource->lr_refcount), ldlm_typename[resource->lr_type], - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);
@@ -2133,7 +2143,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,PLDLMRES (resource),atomic_read (&resource->lr_refcount), ldlm_typename[resource->lr_type], - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +4 -2
@@ -184,7 +184,8 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,LASSERT (lock->l_lvb_data);if (unlikely (lock->l_lvb_len < lvb_len)) { -LDLM_ERROR (lock,"Replied LVB is larger than expectation, expected = %d, replied = %d" , +LDLM_ERROR (lock, +"Replied LVB is larger than expectation, expected = %d, replied = %d" , lock->l_lvb_len, lvb_len); rc = -EINVAL ; goto out;
@@ -598,7 +599,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req) lock =ldlm_handle2lock_long (&dlm_req->lock_handle[0 ],0 );if (!lock) { -CDEBUG (D_DLMTRACE ,"callback on lock %#llx - lock disappeared\n" , +CDEBUG (D_DLMTRACE , +"callback on lock %#llx - lock disappeared\n" , dlm_req->lock_handle[0 ].cookie); rc =ldlm_callback_reply (req, -EINVAL ); ldlm_callback_errmsg(req, "Operate with invalid parameter", rc,
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +4 -2
@@ -386,7 +386,8 @@ static int ldlm_pool_recalc(struct ldlm_pool *pl) pl->pl_recalc_period;if (recalc_interval_sec <=0 ) {/* DEBUG: should be re-removed after LU-4536 is fixed */ -CDEBUG (D_DLMTRACE ,"%s: Negative interval(%ld), too short period(%ld)\n" , +CDEBUG (D_DLMTRACE , +"%s: Negative interval(%ld), too short period(%ld)\n" , pl->pl_name, (long )recalc_interval_sec, (long )pl->pl_recalc_period);
@@ -415,7 +416,8 @@ static int ldlm_pool_shrink(struct ldlm_pool *pl, int nr, gfp_t gfp_mask)lprocfs_counter_add (pl->pl_stats,LDLM_POOL_SHRINK_FREED_STAT , cancel); -CDEBUG (D_DLMTRACE ,"%s: request to shrink %d locks, shrunk %d\n" , +CDEBUG (D_DLMTRACE , +"%s: request to shrink %d locks, shrunk %d\n" , pl->pl_name, nr, cancel); } }
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +26 -16
110 lines not on this page · raw message
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +2 -1
@@ -1358,7 +1358,8 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res)LDLM_DEBUG_LIMIT (level, lock,"###" );if (!(level &D_CANTMASK ) && ++granted > ldlm_dump_granted_max) { -CDEBUG (level,"only dump %d granted locks to avoid DDOS.\n" , +CDEBUG (level, +"only dump %d granted locks to avoid DDOS.\n" , granted);break ; }
Signature · 1 line
2.7.4
Re: [PATCH v4 4/7] staging: lustre: ldlm: fix lines over 80 characters in ldlm files
Quoted 6 lines · Aastha Gupta
This patch fixes checkpatch.pl warning:
WARNING: line over 80 characters
Signed-off-by Aastha Gupta <[email protected]>
Quoted 349 lines
---
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 3 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 33 +++++++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 42 +++++++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +- 8 files changed, 65 insertions(+), 36 deletions(-)drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +2
-1@@ -207,7 +207,8 @@ void ldlm_extent_add_lock(struct ldlm_resource *res,continue ;if (ldlm_extent_overlap (&lck->l_req_extent, &lock->l_req_extent)) { -CDEBUG (D_ERROR ,"granting conflicting lock %p %p\n" , +CDEBUG (D_ERROR , +"granting conflicting lock %p %p\n" , lck, lock);ldlm_resource_dump (D_ERROR , res);LBUG ();drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +4
-2@@ -479,7 +479,8 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)return 0 ; } -LDLM_DEBUG (lock,"client-side enqueue returned a blocked lock, sleeping" ); +LDLM_DEBUG (lock, +"client-side enqueue returned a blocked lock, sleeping" ); fwd.fwd_lock = lock; obd =class_exp2obd (lock->l_conn_export);@@ -561,7 +562,8 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) mode = lock->l_granted_mode;if (ldlm_is_flock_deadlock (lock)) { -LDLM_DEBUG (lock,"client-side enqueue deadlock received" ); +LDLM_DEBUG (lock, +"client-side enqueue deadlock received" ); rc = -EDEADLK ; }ldlm_flock_destroy (lock, mode,LDLM_FL_WAIT_NOREPROC );drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +1
-1@@ -88,7 +88,7 @@ struct ldlm_namespace *ldlm_namespace_first_locked(enum ldlm_side client);/* ldlm_request.c */ /* Cancel lru flag, it indicates we cancel aged locks. */ enum { -LDLM_LRU_FLAG_AGED =BIT (0 ),/* Cancel aged locks (non lru resize). */ +LDLM_LRU_FLAG_AGED =BIT (0 ),/* Cancel old non-LRU resize locks */ LDLM_LRU_FLAG_PASSED =BIT (1 ),/* Cancel passed number of locks. */ LDLM_LRU_FLAG_SHRINK =BIT (2 ),/* Cancel locks from shrinker. */ LDLM_LRU_FLAG_LRUR =BIT (3 ),/* Cancel locks from lru resize. */ drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +22
-11@@ -1035,7 +1035,8 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)ldlm_extent_add_lock (res, lock); }else if (res->lr_type ==LDLM_FLOCK ) {/* -* We should not add locks to granted list in the following cases: +* We should not add locks to granted list in +* the following cases: * - this is an UNLOCK but not a real lock; * - this is a TEST lock; * - this is a F_CANCELLK lock (async flock has req_mode == 0) @@ -2051,13 +2052,16 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,libcfs_debug_vmsg2 (msgdata, fmt, args," ns: \?\? lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: \?\? rrc=\?\? type: \?\?\? flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n" , lock, - lock->l_handle.h_cookie,atomic_read (&lock->l_refc), + lock->l_handle.h_cookie, +atomic_read (&lock->l_refc), lock->l_readers, lock->l_writers, ldlm_lockname[lock->l_granted_mode], ldlm_lockname[lock->l_req_mode], - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , - lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type); + lock->l_pid, lock->l_callback_timeout, + lock->l_lvb_type);va_end (args);return ; }@@ -2067,7 +2071,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, libcfs_debug_vmsg2(msgdata, fmt, args, " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s [%llu->%llu] (req %llu->%llu) flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu lvb_type: %d\n", ldlm_lock_to_ns_name(lock), lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), + lock->l_handle.h_cookie, + atomic_read(&lock->l_refc), lock->l_readers, lock->l_writers, ldlm_lockname[lock->l_granted_mode], ldlm_lockname[lock->l_req_mode],@@ -2076,8 +2081,10 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, ldlm_typename[resource->lr_type], lock->l_policy_data.l_extent.start, lock->l_policy_data.l_extent.end, - lock->l_req_extent.start, lock->l_req_extent.end, - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_req_extent.start, + lock->l_req_extent.end, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);@@ -2087,7 +2094,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, libcfs_debug_vmsg2(msgdata, fmt, args, " ns: %s lock: %p/%#llx lrc: %d/%d,%d mode: %s/%s res: " DLDLMRES " rrc: %d type: %s pid: %d [%llu->%llu] flags: %#llx nid: %s remote: %#llx expref: %d pid: %u timeout: %lu\n", ldlm_lock_to_ns_name(lock), lock, - lock->l_handle.h_cookie, atomic_read(&lock->l_refc), + lock->l_handle.h_cookie, + atomic_read(&lock->l_refc), lock->l_readers, lock->l_writers, ldlm_lockname[lock->l_granted_mode], ldlm_lockname[lock->l_req_mode],@@ -2097,7 +2105,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, lock->l_policy_data.l_flock.pid, lock->l_policy_data.l_flock.start, lock->l_policy_data.l_flock.end, - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout);break ;@@ -2115,7 +2124,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, lock->l_policy_data.l_inodebits.bits,atomic_read (&resource->lr_refcount), ldlm_typename[resource->lr_type], - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);@@ -2133,7 +2143,8 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,PLDLMRES (resource),atomic_read (&resource->lr_refcount), ldlm_typename[resource->lr_type], - lock->l_flags, nid, lock->l_remote_handle.cookie, + lock->l_flags, nid, + lock->l_remote_handle.cookie, exp ?atomic_read (&exp->exp_refcount) :-99 , lock->l_pid, lock->l_callback_timeout, lock->l_lvb_type);drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +4
-2@@ -184,7 +184,8 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,LASSERT (lock->l_lvb_data);if (unlikely (lock->l_lvb_len < lvb_len)) { -LDLM_ERROR (lock,"Replied LVB is larger than expectation, expected = %d, replied = %d" , +LDLM_ERROR (lock, +"Replied LVB is larger than expectation, expected = %d, replied = %d" , lock->l_lvb_len, lvb_len); rc = -EINVAL ; goto out;@@ -598,7 +599,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req) lock =ldlm_handle2lock_long (&dlm_req->lock_handle[0 ],0 );if (!lock) { -CDEBUG (D_DLMTRACE ,"callback on lock %#llx - lock disappeared\n" , +CDEBUG (D_DLMTRACE , +"callback on lock %#llx - lock disappeared\n" , dlm_req->lock_handle[0 ].cookie); rc =ldlm_callback_reply (req, -EINVAL ); ldlm_callback_errmsg(req, "Operate with invalid parameter", rc,drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +4
-2@@ -386,7 +386,8 @@ static int ldlm_pool_recalc(struct ldlm_pool *pl) pl->pl_recalc_period;if (recalc_interval_sec <=0 ) {/* DEBUG: should be re-removed after LU-4536 is fixed */ -CDEBUG (D_DLMTRACE ,"%s: Negative interval(%ld), too short period(%ld)\n" , +CDEBUG (D_DLMTRACE , +"%s: Negative interval(%ld), too short period(%ld)\n" , pl->pl_name, (long )recalc_interval_sec, (long )pl->pl_recalc_period);@@ -415,7 +416,8 @@ static int ldlm_pool_shrink(struct ldlm_pool *pl, int nr, gfp_t gfp_mask)lprocfs_counter_add (pl->pl_stats,LDLM_POOL_SHRINK_FREED_STAT , cancel); -CDEBUG (D_DLMTRACE ,"%s: request to shrink %d locks, shrunk %d\n" , +CDEBUG (D_DLMTRACE , +"%s: request to shrink %d locks, shrunk %d\n" , pl->pl_name, nr, cancel); } }drivers/staging/lustre/lustre/ldlm/ldlm_request.c +8
-4@@ -121,7 +121,8 @@ static int ldlm_expired_completion_wait(void *data)if (!lock->l_conn_export) {static unsigned long next_dump, last_dump; -LDLM_ERROR (lock,"lock timed out (enqueued at %lld, %llds ago); not entering recovery in server code, just going back to sleep" , +LDLM_ERROR (lock, +"lock timed out (enqueued at %lld, %llds ago); not entering recovery in server code, just going back to sleep" , (s64 )lock->l_last_activity, (s64)(ktime_get_real_seconds () - lock->l_last_activity));@@ -139,7 +140,8 @@ static int ldlm_expired_completion_wait(void *data) obd = lock->l_conn_export->exp_obd; imp = obd->u.cli.cl_import;ptlrpc_fail_import (imp, lwd->lwd_conn_cnt); -LDLM_ERROR (lock,"lock timed out (enqueued at %lld, %llds ago), entering recovery for %s@%s" , +LDLM_ERROR (lock, +"lock timed out (enqueued at %lld, %llds ago), entering recovery for %s@%s" , (s64 )lock->l_last_activity, (s64)(ktime_get_real_seconds () - lock->l_last_activity),obd2cli_tgt (obd), imp->imp_connection->c_remote_uuid.uuid);@@ -218,7 +220,8 @@ int ldlm_completion_ast_async(struct ldlm_lock *lock, __u64 flags, void *data)return ldlm_completion_tail (lock, data); } -LDLM_DEBUG (lock,"client-side enqueue returned a blocked lock, going forward" ); +LDLM_DEBUG (lock, +"client-side enqueue returned a blocked lock, going forward" );return 0 ; }EXPORT_SYMBOL (ldlm_completion_ast_async);@@ -264,7 +267,8 @@ int ldlm_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)return 0 ; } -LDLM_DEBUG (lock,"client-side enqueue returned a blocked lock, sleeping" ); +LDLM_DEBUG (lock, +"client-side enqueue returned a blocked lock, sleeping" );noreproc:
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +18
-12@@ -414,7 +418,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, rc = size; goto cleanup; }else if (unlikely (size > lvb_len)) { -LDLM_ERROR (lock,"Replied LVB is larger than expectation, expected = %d, replied = %d" , +LDLM_ERROR (lock, +"Replied LVB is larger than expectation, expected = %d, replied = %d" , lvb_len, size); rc = -EINVAL ; goto cleanup;@@ -473,8 +478,8 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,if (!ldlm_res_eq (&reply->lock_desc.l_resource.lr_name, &lock->l_resource->lr_name)) { -CDEBUG (D_INFO ,"remote intent success, locking " DLDLMRES -" instead of " DLDLMRES "\n" , +CDEBUG (D_INFO , +"remote intent success, locking " DLDLMRES " instead of " DLDLMRES "\n" ,PLDLMRES (&reply->lock_desc.l_resource),PLDLMRES (lock->l_resource));@@ -850,7 +855,8 @@ static __u64 ldlm_cli_cancel_local(struct ldlm_lock *lock)unlock_res_and_lock (lock);if (local_only) { -CDEBUG (D_DLMTRACE ,"not sending request (at caller's instruction)\n" ); +CDEBUG (D_DLMTRACE , +"not sending request (at caller's instruction)\n" ); rc =LDLM_FL_LOCAL_ONLY ; }ldlm_lock_cancel (lock);@@ -963,7 +969,8 @@ static int ldlm_cli_cancel_req(struct obd_export *exp, rc =ptlrpc_queue_wait (req);if (rc ==LUSTRE_ESTALE ) { -CDEBUG (D_DLMTRACE ,"client/server (nid %s) out of sync -- not fatal\n" , +CDEBUG (D_DLMTRACE , +"client/server (nid %s) out of sync -- not fatal\n" ,libcfs_nid2str (req->rq_import-> imp_connection->c_peer.nid)); rc =0 ;@@ -1364,13 +1371,14 @@ ldlm_cancel_lru_policy(struct ldlm_namespace *ns, int flags)* flags & LDLM_LRU_FLAG_LRUR - use LRU resize policy (SLV from server) to * cancel not more than \a count locks; * -* flags & LDLM_LRU_FLAG_PASSED - cancel \a count number of old locks (located at -* the beginning of LRU list); +* flags & LDLM_LRU_FLAG_PASSED - cancel \a count number of old locks (located +* at the beginning of LRU list); * -* flags & LDLM_LRU_FLAG_SHRINK - cancel not more than \a count locks according to -* memory pressure policy function; +* flags & LDLM_LRU_FLAG_SHRINK - cancel not more than \a count locks according +* to memory pressure policy function; * -* flags & LDLM_LRU_FLAG_AGED - cancel \a count locks according to "aged policy". +* flags & LDLM_LRU_FLAG_AGED - cancel \a count locks according to +* "aged policy". * * flags & LDLM_LRU_FLAG_NO_WAIT - cancel as many unused locks as possible * (typically before replaying locks) w/o @@ -1384,7 +1392,8 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns,ldlm_cancel_lru_policy_t pf;struct ldlm_lock *lock, *next;int added =0 , unused, remained; -int no_wait = flags & (LDLM_LRU_FLAG_NO_WAIT |LDLM_LRU_FLAG_LRUR_NO_WAIT ); +int no_wait = flags & + (LDLM_LRU_FLAG_NO_WAIT |LDLM_LRU_FLAG_LRUR_NO_WAIT );spin_lock (&ns->ns_lock); unused = ns->ns_nr_unused;@@ -2035,7 +2044,8 @@ static void ldlm_cancel_unused_locks_for_replay(struct ldlm_namespace *ns)int canceled;LIST_HEAD (cancels); -CDEBUG (D_DLMTRACE ,"Dropping as many unused locks as possible before replay for namespace %s (%d)\n" , +CDEBUG (D_DLMTRACE , +"Dropping as many unused locks as possible before replay for namespace %s (%d)\n" ,ldlm_ns_name (ns), ns->ns_nr_unused);/* We don't need to care whether or not LRU resize is enabled drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +2
-1@@ -1358,7 +1358,8 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res)LDLM_DEBUG_LIMIT (level, lock,"###" );if (!(level &D_CANTMASK ) && ++granted > ldlm_dump_granted_max) { -CDEBUG (level,"only dump %d granted locks to avoid DDOS.\n" , +CDEBUG (level, +"only dump %d granted locks to avoid DDOS.\n" , granted);break ; }Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH v4 5/7 staging: lustre: llite: fix lines over 80 characters in llite files
In reply to Aastha GuptaThis fixes checkpatch.pl warning:
WARNING: line over 80 characters
--- drivers/staging/lustre/lustre/llite/dcache.c | 9 ++++--- drivers/staging/lustre/lustre/llite/dir.c | 9 ++++--- drivers/staging/lustre/lustre/llite/file.c | 9 ++++--- .../staging/lustre/lustre/llite/llite_internal.h | 13 ++++++---- drivers/staging/lustre/lustre/llite/llite_lib.c | 29 ++++++++++++++-------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 3 ++- drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 ++- drivers/staging/lustre/lustre/llite/namei.c | 15 +++++++---- drivers/staging/lustre/lustre/llite/rw.c | 14 +++++++---- drivers/staging/lustre/lustre/llite/statahead.c | 3 ++- drivers/staging/lustre/lustre/llite/super25.c | 3 ++- drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 ++- 12 files changed, 74 insertions(+), 39 deletions(-)
drivers/staging/lustre/lustre/llite/dcache.c +6 -3
@@ -141,7 +141,8 @@ void ll_intent_drop_lock(struct lookup_intent *it) handle.cookie = it->it_lock_handle; -CDEBUG (D_DLMTRACE ,"releasing lock with cookie %#llx from it %p\n" , +CDEBUG (D_DLMTRACE , +"releasing lock with cookie %#llx from it %p\n" , handle.cookie, it);ldlm_lock_decref (&handle, it->it_lock_mode);
@@ -152,7 +153,8 @@ void ll_intent_drop_lock(struct lookup_intent *it)if (it->it_remote_lock_mode !=0 ) { handle.cookie = it->it_remote_lock_handle; -CDEBUG (D_DLMTRACE ,"releasing remote lock with cookie%#llx from it %p\n" , +CDEBUG (D_DLMTRACE , +"releasing remote lock with cookie%#llx from it %p\n" , handle.cookie, it);ldlm_lock_decref (&handle, it->it_remote_lock_mode);
@@ -185,7 +187,8 @@ void ll_invalidate_aliases(struct inode *inode)spin_lock (&inode->i_lock);hlist_for_each_entry (dentry, &inode->i_dentry, d_u.d_alias) { -CDEBUG (D_DENTRY ,"dentry in drop %pd (%p) parent %p inode %p flags %d\n" , +CDEBUG (D_DENTRY , +"dentry in drop %pd (%p) parent %p inode %p flags %d\n" , dentry, dentry, dentry->d_parent,d_inode (dentry), dentry->d_flags);
drivers/staging/lustre/lustre/llite/dir.c +6 -3
@@ -303,7 +303,8 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)struct md_op_data *op_data;int rc; -CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p) pos/size %lu/%llu 32bit_api %d\n" , +CDEBUG (D_VFSTRACE , +"VFS Op:inode=" DFID "(%p) pos/size %lu/%llu 32bit_api %d\n" ,PFID (ll_inode2fid (inode)), inode, (unsigned long )pos,i_size_read (inode), api32);
@@ -502,7 +503,8 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,break ; }default : { -CDEBUG (D_IOCTL ,"bad userland LOV MAGIC: %#08x != %#08x nor %#08x\n" , +CDEBUG (D_IOCTL , +"bad userland LOV MAGIC: %#08x != %#08x nor %#08x\n" , lump->lmm_magic,LOV_USER_MAGIC_V1 ,LOV_USER_MAGIC_V3 );return -EINVAL ;
@@ -816,7 +818,8 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy) rc =ll_data_version (inode, &data_version,LL_DV_RD_FLUSH );iput (inode);if (rc) { -CDEBUG (D_HSM ,"Could not read file data version. Request could not be confirmed.\n" ); +CDEBUG (D_HSM , +"Could not read file data version. Request could not be confirmed.\n" );if (hpk.hpk_errval ==0 ) hpk.hpk_errval = -rc; goto progress;
drivers/staging/lustre/lustre/llite/file.c +6 -3
@@ -605,7 +605,8 @@ int ll_file_open(struct inode *inode, struct file *file)* to get file with different fid. */ it->it_flags |=MDS_OPEN_LOCK |MDS_OPEN_BY_FID ; - rc =ll_intent_file_open (file->f_path.dentry,NULL ,0 , it); + rc =ll_intent_file_open (file->f_path.dentry, +NULL ,0 , it);if (rc) goto out_openerr;
@@ -1119,7 +1120,8 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,cl_io_fini (env, io);if ((!rc || rc == -ENODATA ) && count >0 && io->ci_need_restart) { -CDEBUG (D_VFSTRACE ,"%s: restart %s from %lld, count:%zu, result: %zd\n" , +CDEBUG (D_VFSTRACE , +"%s: restart %s from %lld, count:%zu, result: %zd\n" ,file_dentry (file)->d_name.name, iot ==CIT_READ ?"read" :"write" , *ppos, count, result);
@@ -3455,7 +3457,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,if (rc ==0 ) rc = -EAGAIN ; -CDEBUG (D_INODE ,"%s: file=" DFID " waiting layout return: %d.\n" , +CDEBUG (D_INODE , +"%s: file=" DFID " waiting layout return: %d.\n" ,ll_get_fsname (inode->i_sb,NULL ,0 ),PFID (&lli->lli_fid), rc); }
drivers/staging/lustre/lustre/llite/llite_internal.h +8 -5
@@ -84,7 +84,7 @@ struct ll_dentry_data {struct ll_getname_data {struct dir_context ctx; -char *lgd_name;/* points to a buffer with NAME_MAX+1 size */ +char *lgd_name;/* points to buffer with NAME_MAX+1 size */ struct lu_fid lgd_fid;/* target fid we are looking for */ int lgd_found;/* inode matched? */ };
@@ -637,7 +637,8 @@ static inline int ll_need_32bit_api(struct ll_sb_info *sbi)#if BITS_PER_LONG ==32 return 1 ;#elif defined(CONFIG_COMPAT ) -return unlikely (in_compat_syscall () || (sbi->ll_flags &LL_SBI_32BIT_API )); +return unlikely (in_compat_syscall () || + (sbi->ll_flags &LL_SBI_32BIT_API ));#else return unlikely (sbi->ll_flags &LL_SBI_32BIT_API );#endif
@@ -1065,7 +1066,7 @@ struct ll_statahead_info {* hidden entries */ sai_agl_valid:1 ,/* AGL is valid for the dir */ - sai_in_readpage:1;/* statahead is in readdir() */ + sai_in_readpage:1;/* statahead in readdir() */wait_queue_head_t sai_waitq;/* stat-ahead wait queue */ struct ptlrpc_thread sai_thread;/* stat-ahead thread */ struct ptlrpc_thread sai_agl_thread;/* AGL thread */
@@ -1261,7 +1262,8 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, handle.cookie = it->it_lock_handle; -CDEBUG (D_DLMTRACE ,"setting l_data to inode " DFID "%p for lock %#llx\n" , +CDEBUG (D_DLMTRACE , +"setting l_data to inode " DFID "%p for lock %#llx\n" ,PFID (ll_inode2fid (inode)), inode, handle.cookie);md_set_lock_data (exp, &handle, inode, &it->it_lock_bits);
@@ -1284,7 +1286,8 @@ static inline int d_lustre_invalid(const struct dentry *dentry)*/ static inline void d_lustre_invalidate (struct dentry *dentry,int nested) { -CDEBUG (D_DENTRY ,"invalidate dentry %pd (%p) parent %p inode %p refc %d\n" , +CDEBUG (D_DENTRY , +"invalidate dentry %pd (%p) parent %p inode %p refc %d\n" , dentry, dentry, dentry->d_parent,d_inode (dentry),d_count (dentry));
drivers/staging/lustre/lustre/llite/llite_lib.c +19 -10
@@ -231,7 +231,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err =obd_connect (NULL , &sbi->ll_md_exp, obd, &sbi->ll_sb_uuid, data,NULL );if (err == -EBUSY ) { -LCONSOLE_ERROR_MSG (0x14f ,"An MDT (md %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , +LCONSOLE_ERROR_MSG (0x14f , +"An MDT (md %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , md); goto out; }else if (err) {
@@ -279,7 +280,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, }obd_connect_flags2str (buf,PAGE_SIZE , valid ^CLIENT_CONNECT_MDT_REQD ,"," ); -LCONSOLE_ERROR_MSG (0x170 ,"Server %s does not support feature(s) needed for correct operation of this client (%s). Please upgrade server or downgrade client.\n" , +LCONSOLE_ERROR_MSG (0x170 , +"Server %s does not support feature(s) needed for correct operation of this client (%s). Please upgrade server or downgrade client.\n" , sbi->ll_md_exp->exp_obd->obd_name, buf);kfree (buf); err = -EPROTO ;
@@ -380,7 +382,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,if (sbi->ll_flags &LL_SBI_ALWAYS_PING ) data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS ; -CDEBUG (D_RPCTRACE ,"ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n" , +CDEBUG (D_RPCTRACE , +"ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n" , data->ocd_connect_flags, data->ocd_version, data->ocd_grant);
@@ -392,7 +395,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err =obd_connect (NULL , &sbi->ll_dt_exp, obd, &sbi->ll_sb_uuid, data,NULL );if (err == -EBUSY ) { -LCONSOLE_ERROR_MSG (0x150 ,"An OST (dt %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , +LCONSOLE_ERROR_MSG (0x150 , +"An OST (dt %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , dt); goto out_md; }else if (err) {
@@ -915,7 +919,8 @@ int ll_fill_super(struct super_block *sb, struct vfsmount *mnt)/* Profile set with LCFG_MOUNTOPT so we can find our mdc and osc obds */ lprof =class_get_profile (profilenm);if (!lprof) { -LCONSOLE_ERROR_MSG (0x156 ,"The client profile '%s' could not be read from the MGS. Does that filesystem exist?\n" , +LCONSOLE_ERROR_MSG (0x156 , +"The client profile '%s' could not be read from the MGS. Does that filesystem exist?\n" , profilenm); err = -EINVAL ; goto out_free;
@@ -1042,7 +1047,8 @@ struct inode *ll_inode_from_resource_lock(struct ldlm_lock *lock) }else { inode = lock->l_resource->lr_lvb_inode;LDLM_DEBUG_LIMIT (inode->i_state &I_FREEING ?D_INFO : -D_WARNING , lock,"lr_lvb_inode %p is bogus: magic %08x" , +D_WARNING , lock, +"lr_lvb_inode %p is bogus: magic %08x" , lock->l_resource->lr_lvb_inode, lli->lli_inode_magic); inode =NULL ;
@@ -1744,7 +1750,8 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md) }if (body->mbo_valid &OBD_MD_FLMTIME ) {if (body->mbo_mtime >LTIME_S (inode->i_mtime)) { -CDEBUG (D_INODE ,"setting ino %lu mtime from %lu to %llu\n" , +CDEBUG (D_INODE , +"setting ino %lu mtime from %lu to %llu\n" , inode->i_ino,LTIME_S (inode->i_mtime), body->mbo_mtime);LTIME_S (inode->i_mtime) = body->mbo_mtime;
@@ -2254,7 +2261,8 @@ int ll_process_config(struct lustre_cfg *lcfg)return -EINVAL ; sb = (void *)x;/* This better be a real Lustre superblock! */ -LASSERT (s2lsi ((struct super_block *)sb)->lsi_lmd->lmd_magic ==LMD_MAGIC ); +LASSERT (s2lsi ((struct super_block *)sb)->lsi_lmd->lmd_magic == +LMD_MAGIC );/* Note we have not called client_common_fill_super yet, so * proc fns must be able to handle that!
@@ -2571,8 +2579,9 @@ static int ll_linkea_decode(struct linkea_data *ldata, unsigned int linkno,* * \param[in] file - File descriptor against which to perform the operation * \param[in,out] arg - User-filled structure containing the linkno to operate -* on and the available size. It is eventually filled with -* the requested information or left untouched on error +* on and the available size. It is eventually filled +* with the requested information or left untouched on +* error * * \retval - 0 on success * \retval - Appropriate negative error code on failure
drivers/staging/lustre/lustre/llite/llite_mmap.c +2 -1
@@ -208,7 +208,8 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage,*/ unlock_page (vmpage); -CDEBUG (D_MMAP ,"Race on page_mkwrite %p/%lu, page has been written out, retry.\n" , +CDEBUG (D_MMAP , +"Race on page_mkwrite %p/%lu, page has been written out, retry.\n" , vmpage, vmpage->index); *retry = true;
drivers/staging/lustre/lustre/llite/llite_nfs.c +2 -1
@@ -127,7 +127,8 @@ struct lustre_nfs_fid { };static struct dentry * -ll_iget_for_nfs (struct super_block *sb,struct lu_fid *fid,struct lu_fid *parent) +ll_iget_for_nfs (struct super_block *sb, +struct lu_fid *fid,struct lu_fid *parent) {struct inode *inode;struct dentry *result;
drivers/staging/lustre/lustre/llite/namei.c +10 -5
@@ -204,7 +204,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,if (!fid_res_name_eq (ll_inode2fid (inode), &lock->l_resource->lr_name)) { -LDLM_ERROR (lock,"data mismatch with object " DFID "(%p)" , +LDLM_ERROR (lock, +"data mismatch with object " DFID "(%p)" ,PFID (ll_inode2fid (inode)), inode);LBUG (); }
@@ -289,7 +290,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,* we have to invalidate the negative children * on master inode */ -CDEBUG (D_INODE ,"Invalidate s" DFID " m" DFID "\n" , +CDEBUG (D_INODE , +"Invalidate s" DFID " m" DFID "\n" ,PFID (ll_inode2fid (inode)),PFID (&lli->lli_pfid));
@@ -736,7 +738,8 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry, *opened |=FILE_CREATED ; } -if (d_really_is_positive (dentry) &&it_disposition (it,DISP_OPEN_OPEN )) { +if (d_really_is_positive (dentry) && +it_disposition (it,DISP_OPEN_OPEN )) {/* Open dentry. */ if (S_ISFIFO (d_inode (dentry)->i_mode)) {/* We cannot call open here as it might
@@ -982,7 +985,8 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry, {int rc; -CDEBUG (D_VFSTRACE ,"VFS Op:name=%pd, dir=" DFID "(%p), flags=%u, excl=%d\n" , +CDEBUG (D_VFSTRACE , +"VFS Op:name=%pd, dir=" DFID "(%p), flags=%u, excl=%d\n" , dentry,PFID (ll_inode2fid (dir)), dir, mode, want_excl); rc =ll_mknod (dir, dentry, mode,0 );
@@ -1103,7 +1107,8 @@ static int ll_link(struct dentry *old_dentry, struct inode *dir,struct md_op_data *op_data;int err; -CDEBUG (D_VFSTRACE ,"VFS Op: inode=" DFID "(%p), dir=" DFID "(%p), target=%pd\n" , +CDEBUG (D_VFSTRACE , +"VFS Op: inode=" DFID "(%p), dir=" DFID "(%p), target=%pd\n" ,PFID (ll_inode2fid (src)), src,PFID (ll_inode2fid (dir)), dir, new_dentry);
drivers/staging/lustre/lustre/llite/rw.c +9 -5
@@ -297,7 +297,8 @@ stride_pg_count(pgoff_t st_off, unsigned long st_len, unsigned long st_pgs,else pg_count = start_left + st_pgs * (end - start -1 ) + end_left; -CDEBUG (D_READA ,"st_off %lu, st_len %lu st_pgs %lu off %lu length %lu pgcount %lu\n" , +CDEBUG (D_READA , +"st_off %lu, st_len %lu st_pgs %lu off %lu length %lu pgcount %lu\n" , st_off, st_len, st_pgs, off, length, pg_count);return pg_count;
@@ -404,7 +405,8 @@ ll_read_ahead_pages(const struct lu_env *env, struct cl_io *io,* forward read-ahead, it will be fixed when backward * read-ahead is implemented */ -LASSERTF (page_idx >= ria->ria_stoff,"Invalid page_idx %lu rs %lu re %lu ro %lu rl %lu rp %lu\n" , +LASSERTF (page_idx >= ria->ria_stoff, +"Invalid page_idx %lu rs %lu re %lu ro %lu rl %lu rp %lu\n" , page_idx, ria->ria_start, ria->ria_end, ria->ria_stoff, ria->ria_length, ria->ria_pages);
@@ -669,8 +671,9 @@ static void ras_stride_increase_window(struct ll_readahead_state *ras,unsigned long stride_len;LASSERT (ras->ras_stride_length >0 ); -LASSERTF (ras->ras_window_start + ras->ras_window_len - >= ras->ras_stride_offset,"window_start %lu, window_len %lu stride_offset %lu\n" , +LASSERTF (ras->ras_window_start + ras->ras_window_len >= + ras->ras_stride_offset, +"window_start %lu, window_len %lu stride_offset %lu\n" , ras->ras_window_start, ras->ras_window_len, ras->ras_stride_offset);
@@ -766,7 +769,8 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode,PAGE_SHIFT ;CDEBUG (D_READA ,"kmsp %llu mwp %lu mp %lu\n" , kms_pages, - ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages_per_file); + ra->ra_max_read_ahead_whole_pages, + ra->ra_max_pages_per_file);if (kms_pages && kms_pages <= ra->ra_max_read_ahead_whole_pages) {
drivers/staging/lustre/lustre/llite/statahead.c +2 -1
@@ -1082,7 +1082,8 @@ static int ll_statahead_thread(void *arg)struct ll_inode_info *clli; clli =list_entry (sai->sai_agls.next, - struct ll_inode_info, lli_agl_list); + struct ll_inode_info, + lli_agl_list);list_del_init (&clli->lli_agl_list);spin_unlock (&lli->lli_agl_lock);
drivers/staging/lustre/lustre/llite/super25.c +2 -1
@@ -88,7 +88,8 @@ static int __init lustre_init(void)struct timespec64 ts;int i, rc, seed[2 ]; -BUILD_BUG_ON (sizeof (LUSTRE_VOLATILE_HDR ) !=LUSTRE_VOLATILE_HDR_LEN +1 ); +BUILD_BUG_ON (sizeof (LUSTRE_VOLATILE_HDR ) != +LUSTRE_VOLATILE_HDR_LEN +1 );/* print an address of _any_ initialized kernel symbol from this * module, to allow debugging with gdb that doesn't support data
drivers/staging/lustre/lustre/llite/xattr_cache.c +2 -1
@@ -364,7 +364,8 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) }if (oit->it_status <0 ) { -CDEBUG (D_CACHE ,"getxattr intent returned %d for fid " DFID "\n" , +CDEBUG (D_CACHE , +"getxattr intent returned %d for fid " DFID "\n" , oit->it_status,PFID (ll_inode2fid (inode))); rc = oit->it_status;/* xattr data is so large that we don't want to cache it */
Signature · 1 line
2.7.4
Re: [PATCH v4 5/7] staging: lustre: llite: fix lines over 80 characters in llite files
Quoted 5 lines · Aastha Gupta
This fixes checkpatch.pl warning:
WARNING: line over 80 charactersSigned-off-by Aastha Gupta <[email protected]>
Quoted 438 lines
---
drivers/staging/lustre/lustre/llite/dcache.c | 9 ++++--- drivers/staging/lustre/lustre/llite/dir.c | 9 ++++--- drivers/staging/lustre/lustre/llite/file.c | 9 ++++--- .../staging/lustre/lustre/llite/llite_internal.h | 13 ++++++---- drivers/staging/lustre/lustre/llite/llite_lib.c | 29 ++++++++++++++-------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 3 ++- drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 ++- drivers/staging/lustre/lustre/llite/namei.c | 15 +++++++---- drivers/staging/lustre/lustre/llite/rw.c | 14 +++++++---- drivers/staging/lustre/lustre/llite/statahead.c | 3 ++- drivers/staging/lustre/lustre/llite/super25.c | 3 ++- drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 ++- 12 files changed, 74 insertions(+), 39 deletions(-)drivers/staging/lustre/lustre/llite/dcache.c +6
-3@@ -141,7 +141,8 @@ void ll_intent_drop_lock(struct lookup_intent *it) handle.cookie = it->it_lock_handle; -CDEBUG (D_DLMTRACE ,"releasing lock with cookie %#llx from it %p\n" , +CDEBUG (D_DLMTRACE , +"releasing lock with cookie %#llx from it %p\n" , handle.cookie, it);ldlm_lock_decref (&handle, it->it_lock_mode);@@ -152,7 +153,8 @@ void ll_intent_drop_lock(struct lookup_intent *it)if (it->it_remote_lock_mode !=0 ) { handle.cookie = it->it_remote_lock_handle; -CDEBUG (D_DLMTRACE ,"releasing remote lock with cookie%#llx from it %p\n" , +CDEBUG (D_DLMTRACE , +"releasing remote lock with cookie%#llx from it %p\n" , handle.cookie, it);ldlm_lock_decref (&handle, it->it_remote_lock_mode);@@ -185,7 +187,8 @@ void ll_invalidate_aliases(struct inode *inode)spin_lock (&inode->i_lock);hlist_for_each_entry (dentry, &inode->i_dentry, d_u.d_alias) { -CDEBUG (D_DENTRY ,"dentry in drop %pd (%p) parent %p inode %p flags %d\n" , +CDEBUG (D_DENTRY , +"dentry in drop %pd (%p) parent %p inode %p flags %d\n" , dentry, dentry, dentry->d_parent,d_inode (dentry), dentry->d_flags);drivers/staging/lustre/lustre/llite/dir.c +6
-3@@ -303,7 +303,8 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)struct md_op_data *op_data;int rc; -CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p) pos/size %lu/%llu 32bit_api %d\n" , +CDEBUG (D_VFSTRACE , +"VFS Op:inode=" DFID "(%p) pos/size %lu/%llu 32bit_api %d\n" ,PFID (ll_inode2fid (inode)), inode, (unsigned long )pos,i_size_read (inode), api32);@@ -502,7 +503,8 @@ int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,break ; }default : { -CDEBUG (D_IOCTL ,"bad userland LOV MAGIC: %#08x != %#08x nor %#08x\n" , +CDEBUG (D_IOCTL , +"bad userland LOV MAGIC: %#08x != %#08x nor %#08x\n" , lump->lmm_magic,LOV_USER_MAGIC_V1 ,LOV_USER_MAGIC_V3 );return -EINVAL ;@@ -816,7 +818,8 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy) rc =ll_data_version (inode, &data_version,LL_DV_RD_FLUSH );iput (inode);if (rc) { -CDEBUG (D_HSM ,"Could not read file data version. Request could not be confirmed.\n" ); +CDEBUG (D_HSM , +"Could not read file data version. Request could not be confirmed.\n" );if (hpk.hpk_errval ==0 ) hpk.hpk_errval = -rc; goto progress;drivers/staging/lustre/lustre/llite/file.c +6
-3@@ -605,7 +605,8 @@ int ll_file_open(struct inode *inode, struct file *file)* to get file with different fid. */ it->it_flags |=MDS_OPEN_LOCK |MDS_OPEN_BY_FID ; - rc =ll_intent_file_open (file->f_path.dentry,NULL ,0 , it); + rc =ll_intent_file_open (file->f_path.dentry, +NULL ,0 , it);if (rc) goto out_openerr;@@ -1119,7 +1120,8 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,cl_io_fini (env, io);if ((!rc || rc == -ENODATA ) && count >0 && io->ci_need_restart) { -CDEBUG (D_VFSTRACE ,"%s: restart %s from %lld, count:%zu, result: %zd\n" , +CDEBUG (D_VFSTRACE , +"%s: restart %s from %lld, count:%zu, result: %zd\n" ,file_dentry (file)->d_name.name, iot ==CIT_READ ?"read" :"write" , *ppos, count, result);@@ -3455,7 +3457,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,if (rc ==0 ) rc = -EAGAIN ; -CDEBUG (D_INODE ,"%s: file=" DFID " waiting layout return: %d.\n" , +CDEBUG (D_INODE , +"%s: file=" DFID " waiting layout return: %d.\n" ,ll_get_fsname (inode->i_sb,NULL ,0 ),PFID (&lli->lli_fid), rc); }drivers/staging/lustre/lustre/llite/llite_internal.h +8
-5@@ -84,7 +84,7 @@ struct ll_dentry_data {struct ll_getname_data {struct dir_context ctx; -char *lgd_name;/* points to a buffer with NAME_MAX+1 size */ +char *lgd_name;/* points to buffer with NAME_MAX+1 size */ struct lu_fid lgd_fid;/* target fid we are looking for */ int lgd_found;/* inode matched? */ };@@ -637,7 +637,8 @@ static inline int ll_need_32bit_api(struct ll_sb_info *sbi)#if BITS_PER_LONG ==32 return 1 ;#elif defined(CONFIG_COMPAT ) -return unlikely (in_compat_syscall () || (sbi->ll_flags &LL_SBI_32BIT_API )); +return unlikely (in_compat_syscall () || + (sbi->ll_flags &LL_SBI_32BIT_API ));#else return unlikely (sbi->ll_flags &LL_SBI_32BIT_API );#endif @@ -1065,7 +1066,7 @@ struct ll_statahead_info {* hidden entries */ sai_agl_valid:1 ,/* AGL is valid for the dir */ - sai_in_readpage:1;/* statahead is in readdir() */ + sai_in_readpage:1;/* statahead in readdir() */wait_queue_head_t sai_waitq;/* stat-ahead wait queue */ struct ptlrpc_thread sai_thread;/* stat-ahead thread */ struct ptlrpc_thread sai_agl_thread;/* AGL thread */ @@ -1261,7 +1262,8 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, handle.cookie = it->it_lock_handle; -CDEBUG (D_DLMTRACE ,"setting l_data to inode " DFID "%p for lock %#llx\n" , +CDEBUG (D_DLMTRACE , +"setting l_data to inode " DFID "%p for lock %#llx\n" ,PFID (ll_inode2fid (inode)), inode, handle.cookie);md_set_lock_data (exp, &handle, inode, &it->it_lock_bits);@@ -1284,7 +1286,8 @@ static inline int d_lustre_invalid(const struct dentry *dentry)*/ static inline void d_lustre_invalidate (struct dentry *dentry,int nested) { -CDEBUG (D_DENTRY ,"invalidate dentry %pd (%p) parent %p inode %p refc %d\n" , +CDEBUG (D_DENTRY , +"invalidate dentry %pd (%p) parent %p inode %p refc %d\n" , dentry, dentry, dentry->d_parent,d_inode (dentry),d_count (dentry));drivers/staging/lustre/lustre/llite/llite_lib.c +19
-10@@ -231,7 +231,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err =obd_connect (NULL , &sbi->ll_md_exp, obd, &sbi->ll_sb_uuid, data,NULL );if (err == -EBUSY ) { -LCONSOLE_ERROR_MSG (0x14f ,"An MDT (md %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , +LCONSOLE_ERROR_MSG (0x14f , +"An MDT (md %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , md); goto out; }else if (err) {@@ -279,7 +280,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, }obd_connect_flags2str (buf,PAGE_SIZE , valid ^CLIENT_CONNECT_MDT_REQD ,"," ); -LCONSOLE_ERROR_MSG (0x170 ,"Server %s does not support feature(s) needed for correct operation of this client (%s). Please upgrade server or downgrade client.\n" , +LCONSOLE_ERROR_MSG (0x170 , +"Server %s does not support feature(s) needed for correct operation of this client (%s). Please upgrade server or downgrade client.\n" , sbi->ll_md_exp->exp_obd->obd_name, buf);kfree (buf); err = -EPROTO ;@@ -380,7 +382,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,if (sbi->ll_flags &LL_SBI_ALWAYS_PING ) data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS ; -CDEBUG (D_RPCTRACE ,"ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n" , +CDEBUG (D_RPCTRACE , +"ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n" , data->ocd_connect_flags, data->ocd_version, data->ocd_grant);@@ -392,7 +395,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err =obd_connect (NULL , &sbi->ll_dt_exp, obd, &sbi->ll_sb_uuid, data,NULL );if (err == -EBUSY ) { -LCONSOLE_ERROR_MSG (0x150 ,"An OST (dt %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , +LCONSOLE_ERROR_MSG (0x150 , +"An OST (dt %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n" , dt); goto out_md; }else if (err) {@@ -915,7 +919,8 @@ int ll_fill_super(struct super_block *sb, struct vfsmount *mnt)/* Profile set with LCFG_MOUNTOPT so we can find our mdc and osc obds */ lprof =class_get_profile (profilenm);if (!lprof) { -LCONSOLE_ERROR_MSG (0x156 ,"The client profile '%s' could not be read from the MGS. Does that filesystem exist?\n" , +LCONSOLE_ERROR_MSG (0x156 , +"The client profile '%s' could not be read from the MGS. Does that filesystem exist?\n" , profilenm); err = -EINVAL ; goto out_free;@@ -1042,7 +1047,8 @@ struct inode *ll_inode_from_resource_lock(struct ldlm_lock *lock) }else { inode = lock->l_resource->lr_lvb_inode;LDLM_DEBUG_LIMIT (inode->i_state &I_FREEING ?D_INFO : -D_WARNING , lock,"lr_lvb_inode %p is bogus: magic %08x" , +D_WARNING , lock, +"lr_lvb_inode %p is bogus: magic %08x" , lock->l_resource->lr_lvb_inode, lli->lli_inode_magic); inode =NULL ;@@ -1744,7 +1750,8 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md) }if (body->mbo_valid &OBD_MD_FLMTIME ) {if (body->mbo_mtime >LTIME_S (inode->i_mtime)) { -CDEBUG (D_INODE ,"setting ino %lu mtime from %lu to %llu\n" , +CDEBUG (D_INODE , +"setting ino %lu mtime from %lu to %llu\n" , inode->i_ino,LTIME_S (inode->i_mtime), body->mbo_mtime);LTIME_S (inode->i_mtime) = body->mbo_mtime;@@ -2254,7 +2261,8 @@ int ll_process_config(struct lustre_cfg *lcfg)return -EINVAL ; sb = (void *)x;/* This better be a real Lustre superblock! */ -LASSERT (s2lsi ((struct super_block *)sb)->lsi_lmd->lmd_magic ==LMD_MAGIC ); +LASSERT (s2lsi ((struct super_block *)sb)->lsi_lmd->lmd_magic == +LMD_MAGIC );/* Note we have not called client_common_fill_super yet, so * proc fns must be able to handle that! @@ -2571,8 +2579,9 @@ static int ll_linkea_decode(struct linkea_data *ldata, unsigned int linkno,* * \param[in] file - File descriptor against which to perform the operation * \param[in,out] arg - User-filled structure containing the linkno to operate -* on and the available size. It is eventually filled with -* the requested information or left untouched on error +* on and the available size. It is eventually filled +* with the requested information or left untouched on +* error * * \retval - 0 on success * \retval - Appropriate negative error code on failure drivers/staging/lustre/lustre/llite/llite_mmap.c +2
-1@@ -208,7 +208,8 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage,*/ unlock_page (vmpage); -CDEBUG (D_MMAP ,"Race on page_mkwrite %p/%lu, page has been written out, retry.\n" , +CDEBUG (D_MMAP , +"Race on page_mkwrite %p/%lu, page has been written out, retry.\n" , vmpage, vmpage->index); *retry = true;drivers/staging/lustre/lustre/llite/llite_nfs.c +0
-0@@ -127,7 +127,8 @@ struct lustre_nfs_fid { };static struct dentry *
drivers/staging/lustre/lustre/llite/llite_nfs.c +2
-1-ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *parent) +ll_iget_for_nfs(struct super_block *sb, + struct lu_fid *fid, struct lu_fid *parent){ struct inode *inode; struct dentry *result;drivers/staging/lustre/lustre/llite/namei.c +10
-5@@ -204,7 +204,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,if (!fid_res_name_eq (ll_inode2fid (inode), &lock->l_resource->lr_name)) { -LDLM_ERROR (lock,"data mismatch with object " DFID "(%p)" , +LDLM_ERROR (lock, +"data mismatch with object " DFID "(%p)" ,PFID (ll_inode2fid (inode)), inode);LBUG (); }@@ -289,7 +290,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,* we have to invalidate the negative children * on master inode */ -CDEBUG (D_INODE ,"Invalidate s" DFID " m" DFID "\n" , +CDEBUG (D_INODE , +"Invalidate s" DFID " m" DFID "\n" ,PFID (ll_inode2fid (inode)),PFID (&lli->lli_pfid));@@ -736,7 +738,8 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry, *opened |=FILE_CREATED ; } -if (d_really_is_positive (dentry) &&it_disposition (it,DISP_OPEN_OPEN )) { +if (d_really_is_positive (dentry) && +it_disposition (it,DISP_OPEN_OPEN )) {/* Open dentry. */ if (S_ISFIFO (d_inode (dentry)->i_mode)) {/* We cannot call open here as it might @@ -982,7 +985,8 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry, {int rc; -CDEBUG (D_VFSTRACE ,"VFS Op:name=%pd, dir=" DFID "(%p), flags=%u, excl=%d\n" , +CDEBUG (D_VFSTRACE , +"VFS Op:name=%pd, dir=" DFID "(%p), flags=%u, excl=%d\n" , dentry,PFID (ll_inode2fid (dir)), dir, mode, want_excl); rc =ll_mknod (dir, dentry, mode,0 );@@ -1103,7 +1107,8 @@ static int ll_link(struct dentry *old_dentry, struct inode *dir,struct md_op_data *op_data;int err; -CDEBUG (D_VFSTRACE ,"VFS Op: inode=" DFID "(%p), dir=" DFID "(%p), target=%pd\n" , +CDEBUG (D_VFSTRACE , +"VFS Op: inode=" DFID "(%p), dir=" DFID "(%p), target=%pd\n" ,PFID (ll_inode2fid (src)), src,PFID (ll_inode2fid (dir)), dir, new_dentry);drivers/staging/lustre/lustre/llite/rw.c +9
-5@@ -297,7 +297,8 @@ stride_pg_count(pgoff_t st_off, unsigned long st_len, unsigned long st_pgs,else pg_count = start_left + st_pgs * (end - start -1 ) + end_left; -CDEBUG (D_READA ,"st_off %lu, st_len %lu st_pgs %lu off %lu length %lu pgcount %lu\n" , +CDEBUG (D_READA , +"st_off %lu, st_len %lu st_pgs %lu off %lu length %lu pgcount %lu\n" , st_off, st_len, st_pgs, off, length, pg_count);return pg_count;@@ -404,7 +405,8 @@ ll_read_ahead_pages(const struct lu_env *env, struct cl_io *io,* forward read-ahead, it will be fixed when backward * read-ahead is implemented */ -LASSERTF (page_idx >= ria->ria_stoff,"Invalid page_idx %lu rs %lu re %lu ro %lu rl %lu rp %lu\n" , +LASSERTF (page_idx >= ria->ria_stoff, +"Invalid page_idx %lu rs %lu re %lu ro %lu rl %lu rp %lu\n" , page_idx, ria->ria_start, ria->ria_end, ria->ria_stoff, ria->ria_length, ria->ria_pages);@@ -669,8 +671,9 @@ static void ras_stride_increase_window(struct ll_readahead_state *ras,unsigned long stride_len;LASSERT (ras->ras_stride_length >0 ); -LASSERTF (ras->ras_window_start + ras->ras_window_len - >= ras->ras_stride_offset,"window_start %lu, window_len %lu stride_offset %lu\n" , +LASSERTF (ras->ras_window_start + ras->ras_window_len >= + ras->ras_stride_offset, +"window_start %lu, window_len %lu stride_offset %lu\n" , ras->ras_window_start, ras->ras_window_len, ras->ras_stride_offset);@@ -766,7 +769,8 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode,PAGE_SHIFT ;CDEBUG (D_READA ,"kmsp %llu mwp %lu mp %lu\n" , kms_pages, - ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages_per_file); + ra->ra_max_read_ahead_whole_pages, + ra->ra_max_pages_per_file);if (kms_pages && kms_pages <= ra->ra_max_read_ahead_whole_pages) {drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1082,7 +1082,8 @@ static int ll_statahead_thread(void *arg)struct ll_inode_info *clli; clli =list_entry (sai->sai_agls.next, - struct ll_inode_info, lli_agl_list); + struct ll_inode_info, + lli_agl_list);list_del_init (&clli->lli_agl_list);spin_unlock (&lli->lli_agl_lock);drivers/staging/lustre/lustre/llite/super25.c +2
-1@@ -88,7 +88,8 @@ static int __init lustre_init(void)struct timespec64 ts;int i, rc, seed[2 ]; -BUILD_BUG_ON (sizeof (LUSTRE_VOLATILE_HDR ) !=LUSTRE_VOLATILE_HDR_LEN +1 ); +BUILD_BUG_ON (sizeof (LUSTRE_VOLATILE_HDR ) != +LUSTRE_VOLATILE_HDR_LEN +1 );/* print an address of _any_ initialized kernel symbol from this * module, to allow debugging with gdb that doesn't support data drivers/staging/lustre/lustre/llite/xattr_cache.c +2
-1@@ -364,7 +364,8 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) }if (oit->it_status <0 ) { -CDEBUG (D_CACHE ,"getxattr intent returned %d for fid " DFID "\n" , +CDEBUG (D_CACHE , +"getxattr intent returned %d for fid " DFID "\n" , oit->it_status,PFID (ll_inode2fid (inode))); rc = oit->it_status;/* xattr data is so large that we don't want to cache it */ Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH v4 6/7 staging: lustre: llite: fix coding style for error messages
In reply to Aastha GuptaThe "DFID" part should be added to the same line as the rest of the message, to match current coding style.
--- drivers/staging/lustre/lustre/llite/dir.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/llite/dir.c +5 -6
@@ -734,10 +734,10 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy) rc =ll_data_version (inode, &data_version,LL_DV_RD_FLUSH );iput (inode);if (rc !=0 ) { -CDEBUG (D_HSM ,"Could not read file data version of " -DFID " (rc = %d). Archive request (%#llx) could not be done.\n" , -PFID (©->hc_hai.hai_fid), rc, - copy->hc_hai.hai_cookie); +CDEBUG (D_HSM , +"Could not read file data version of " DFID " (rc = %d). Archive request (%#llx) could not be done.\n" , +PFID (©->hc_hai.hai_fid), rc, + copy->hc_hai.hai_cookie); hpk.hpk_flags |=HP_FLAG_RETRY ;/* hpk_errval must be >= 0 */ hpk.hpk_errval = -rc;
@@ -835,8 +835,7 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy)*/ if ((copy->hc_hai.hai_action ==HSMA_ARCHIVE ) && (copy->hc_data_version != data_version)) { -CDEBUG (D_HSM ,"File data version mismatched. File content was changed during archiving. " -DFID ", start:%#llx current:%#llx\n" , +CDEBUG (D_HSM ,"File data version mismatched. File content was changed during archiving. " DFID ", start:%#llx current:%#llx\n" ,PFID (©->hc_hai.hai_fid), copy->hc_data_version, data_version);/* File was changed, send error to cdt. Do not ask for
Signature · 1 line
2.7.4
Re: [PATCH v4 6/7] staging: lustre: llite: fix coding style for error messages
Quoted 5 lines · Aastha Gupta
The "DFID" part should be added to the same line as the rest of the message, to match current coding style.
Signed-off-by Aastha Gupta <[email protected]>
Quoted 36 lines
---
drivers/staging/lustre/lustre/llite/dir.c| 11 +++++------1 file changed, 5 insertions(+), 6 deletions(-)drivers/staging/lustre/lustre/llite/dir.c +5
-6@@ -734,10 +734,10 @@ static int ll_ioc_copy_start(struct super_block *sb, struct hsm_copy *copy) rc =ll_data_version (inode, &data_version,LL_DV_RD_FLUSH );iput (inode);if (rc !=0 ) { -CDEBUG (D_HSM ,"Could not read file data version of " -DFID " (rc = %d). Archive request (%#llx) could not be done.\n" , -PFID (©->hc_hai.hai_fid), rc, - copy->hc_hai.hai_cookie); +CDEBUG (D_HSM , +"Could not read file data version of " DFID " (rc = %d). Archive request (%#llx) could not be done.\n" , +PFID (©->hc_hai.hai_fid), rc, + copy->hc_hai.hai_cookie); hpk.hpk_flags |=HP_FLAG_RETRY ;/* hpk_errval must be >= 0 */ hpk.hpk_errval = -rc;@@ -835,8 +835,7 @@ static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy)*/ if ((copy->hc_hai.hai_action ==HSMA_ARCHIVE ) && (copy->hc_data_version != data_version)) { -CDEBUG (D_HSM ,"File data version mismatched. File content was changed during archiving. " -DFID ", start:%#llx current:%#llx\n" , +CDEBUG (D_HSM ,"File data version mismatched. File content was changed during archiving. " DFID ", start:%#llx current:%#llx\n" ,PFID (©->hc_hai.hai_fid), copy->hc_data_version, data_version);/* File was changed, send error to cdt. Do not ask for Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH v4 7/7 staging: lustre: lllite: fix multi line comments style
In reply to Aastha GuptaThis patch fixes checkpatch.pl warnings:
WARNING: Block comments should align the * on each line
WARNING: Block comments use a trailing */ on a separate line
--- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_internal.h | 5 +++-- drivers/staging/lustre/lustre/llite/rw.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +2 -2
@@ -386,8 +386,8 @@ static int ll_intent_file_open(struct dentry *de, void *lmm, int lmmsize,ll_finish_md_op_data (op_data);if (rc == -ESTALE ) {/* reason for keep own exit path - don`t flood log -* with messages with -ESTALE errors. -*/ +* with messages with -ESTALE errors. +*/ if (!it_disposition (itp,DISP_OPEN_OPEN ) ||it_open_error (DISP_OPEN_OPEN , itp)) goto out;
drivers/staging/lustre/lustre/llite/llite_internal.h +3 -2
@@ -392,7 +392,8 @@ enum stats_track_type {#define LL_SBI_XATTR_CACHE 0x80000/* support for xattr cache */ #define LL_SBI_NOROOTSQUASH 0x100000/* do not apply root squash */ #define LL_SBI_ALWAYS_PING 0x200000/* always ping even if server -* suppress_pings */ +* suppress_pings +*/ #define LL_SBI_FLAGS { \ "nolck", \
@@ -1199,7 +1200,7 @@ typedef enum llioc_iter (*llioc_callback_t)(struct inode *inode,* Return value: * A magic pointer will be returned if success; * otherwise, NULL will be returned. -* */ +*/ void *ll_iocontrol_register (llioc_callback_t cb,int count,unsigned int *cmd);void ll_iocontrol_unregister (void *magic);
drivers/staging/lustre/lustre/llite/rw.c +2 -1
@@ -888,7 +888,8 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode,/* The initial ras_window_len is set to the request size. To avoid * uselessly reading and discarding pages for random IO the window is -* only increased once per consecutive request received. */ +* only increased once per consecutive request received. +*/ if ((ras->ras_consecutive_requests >1 || stride_detect) && !ras->ras_request_index)ras_increase_window (inode, ras, ra);
Signature · 1 line
2.7.4
Re: [PATCH v4 7/7] staging: lustre: lllite: fix multi line comments style
Quoted 8 lines · Aastha Gupta
This patch fixes checkpatch.pl warnings:
WARNING: Block comments should align the * on each line
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by Aastha Gupta <[email protected]>
Quoted 61 lines
---
drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_internal.h | 5 +++-- drivers/staging/lustre/lustre/llite/rw.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-)drivers/staging/lustre/lustre/llite/file.c +2
-2@@ -386,8 +386,8 @@ static int ll_intent_file_open(struct dentry *de, void *lmm, int lmmsize,ll_finish_md_op_data (op_data);if (rc == -ESTALE ) {/* reason for keep own exit path - don`t flood log -* with messages with -ESTALE errors. -*/ +* with messages with -ESTALE errors. +*/ if (!it_disposition (itp,DISP_OPEN_OPEN ) ||it_open_error (DISP_OPEN_OPEN , itp)) goto out;drivers/staging/lustre/lustre/llite/llite_internal.h +3
-2@@ -392,7 +392,8 @@ enum stats_track_type {#define LL_SBI_XATTR_CACHE 0x80000/* support for xattr cache */ #define LL_SBI_NOROOTSQUASH 0x100000/* do not apply root squash */ #define LL_SBI_ALWAYS_PING 0x200000/* always ping even if server -* suppress_pings */ +* suppress_pings +*/ #define LL_SBI_FLAGS { \ "nolck", \@@ -1199,7 +1200,7 @@ typedef enum llioc_iter (*llioc_callback_t)(struct inode *inode,* Return value: * A magic pointer will be returned if success; * otherwise, NULL will be returned. -* */ +*/ void *ll_iocontrol_register (llioc_callback_t cb,int count,unsigned int *cmd);void ll_iocontrol_unregister (void *magic);drivers/staging/lustre/lustre/llite/rw.c +2
-1@@ -888,7 +888,8 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode,/* The initial ras_window_len is set to the request size. To avoid * uselessly reading and discarding pages for random IO the window is -* only increased once per consecutive request received. */ +* only increased once per consecutive request received. +*/ if ((ras->ras_consecutive_requests >1 || stride_detect) && !ras->ras_request_index)ras_increase_window (inode, ras, ra);Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation