staging: lustre: fix code styling issues and remove macros without users
cover staging: lustre: fix code styling issues and remove macros without users
These patches fix:
- multi line comment styling
- line over 80 characters
- macro definitions warnings by checkpatch.pl
- drops macros without any users
- Comparisons should place the constant on the right side
This patch series includes all the patches I sent for this driver to show the correct order.
Aastha Gupta (11):
staging: lustre: fix incorrect multi-line comment style
staging: lustre: fix comparisons should place the constant on the
right side
staging: lustre: fix macro definitions warnings
staging: lustre: drop macro that has no uses
staging: lustre: put trailing */ on separate line
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: lllite: fix multi line comments alignment in file
staging: lustre: llite: 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 | 18 ++++---- .../lustre/lustre/include/lustre_dlm_flags.h | 6 ++- .../staging/lustre/lustre/include/lustre_errno.h | 51 ++++++++++++++-------- 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 | 4 +- 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 | 41 ++++++++++------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +- drivers/staging/lustre/lustre/llite/dcache.c | 9 ++-- drivers/staging/lustre/lustre/llite/dir.c | 24 ++++++---- drivers/staging/lustre/lustre/llite/file.c | 16 ++++--- .../staging/lustre/lustre/llite/llite_internal.h | 25 +++++++---- drivers/staging/lustre/lustre/llite/llite_lib.c | 45 ++++++++++++------- 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 | 24 ++++++---- drivers/staging/lustre/lustre/llite/rw.c | 15 ++++--- drivers/staging/lustre/lustre/llite/rw26.c | 3 +- drivers/staging/lustre/lustre/llite/statahead.c | 18 +++++--- drivers/staging/lustre/lustre/llite/super25.c | 3 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 +- 26 files changed, 242 insertions(+), 132 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/11 staging: lustre: fix incorrect multi-line comment style
This patch fixes the checkpatch.pl warning:
WARNING: block comments use a trailing */ on a separate line
--- .../staging/lustre/lustre/include/lustre_errno.h | 51 ++++++++++++++-------- 1 file changed, 34 insertions(+), 17 deletions(-)
drivers/staging/lustre/lustre/include/lustre_errno.h +34 -17
@@ -71,7 +71,8 @@#define LUSTRE_EMLINK 31/* Too many links */ #define LUSTRE_EPIPE 32/* Broken pipe */ #define LUSTRE_EDOM 33/* Math argument out of domain of -func */ +* func +*/ #define LUSTRE_ERANGE 34/* Math result not representable */ #define LUSTRE_EDEADLK 35/* Resource deadlock would occur */ #define LUSTRE_ENAMETOOLONG 36/* File name too long */
@@ -79,7 +80,8 @@#define LUSTRE_ENOSYS 38/* Function not implemented */ #define LUSTRE_ENOTEMPTY 39/* Directory not empty */ #define LUSTRE_ELOOP 40/* Too many symbolic links -encountered */ +* encountered +*/ #define LUSTRE_ENOMSG 42/* No message of desired type */ #define LUSTRE_EIDRM 43/* Identifier removed */ #define LUSTRE_ECHRNG 44/* Channel number out of range */
@@ -113,22 +115,28 @@#define LUSTRE_EDOTDOT 73/* RFS specific error */ #define LUSTRE_EBADMSG 74/* Not a data message */ #define LUSTRE_EOVERFLOW 75/* Value too large for defined data -type */ +* type +*/ #define LUSTRE_ENOTUNIQ 76/* Name not unique on network */ #define LUSTRE_EBADFD 77/* File descriptor in bad state */ #define LUSTRE_EREMCHG 78/* Remote address changed */ #define LUSTRE_ELIBACC 79/* Can not access a needed shared -library */ +* library +*/ #define LUSTRE_ELIBBAD 80/* Accessing a corrupted shared -library */ +* ibrary +*/ #define LUSTRE_ELIBSCN 81/* .lib section in a.out corrupted */ #define LUSTRE_ELIBMAX 82/* Attempting to link in too many shared -libraries */ +* libraries +*/ #define LUSTRE_ELIBEXEC 83/* Cannot exec a shared library -directly */ +* directly +*/ #define LUSTRE_EILSEQ 84/* Illegal byte sequence */ #define LUSTRE_ERESTART 85/* Interrupted system call should be -restarted */ +* restarted +*/ #define LUSTRE_ESTRPIPE 86/* Streams pipe error */ #define LUSTRE_EUSERS 87/* Too many users */ #define LUSTRE_ENOTSOCK 88/* Socket operation on non-socket */
@@ -139,25 +147,31 @@#define LUSTRE_EPROTONOSUPPORT 93/* Protocol not supported */ #define LUSTRE_ESOCKTNOSUPPORT 94/* Socket type not supported */ #define LUSTRE_EOPNOTSUPP 95/* Operation not supported on transport -endpoint */ +* endpoint +*/ #define LUSTRE_EPFNOSUPPORT 96/* Protocol family not supported */ #define LUSTRE_EAFNOSUPPORT 97/* Address family not supported by -protocol */ +* protocol +*/ #define LUSTRE_EADDRINUSE 98/* Address already in use */ #define LUSTRE_EADDRNOTAVAIL 99/* Cannot assign requested address */ #define LUSTRE_ENETDOWN 100/* Network is down */ #define LUSTRE_ENETUNREACH 101/* Network is unreachable */ #define LUSTRE_ENETRESET 102/* Network dropped connection because of -reset */ +* reset +*/ #define LUSTRE_ECONNABORTED 103/* Software caused connection abort */ #define LUSTRE_ECONNRESET 104/* Connection reset by peer */ #define LUSTRE_ENOBUFS 105/* No buffer space available */ #define LUSTRE_EISCONN 106/* Transport endpoint is already -connected */ +* connected +*/ #define LUSTRE_ENOTCONN 107/* Transport endpoint is not -connected */ +* connected +*/ #define LUSTRE_ESHUTDOWN 108/* Cannot send after transport endpoint -shutdown */ +* shutdown +*/ #define LUSTRE_ETOOMANYREFS 109/* Too many references: cannot splice */ #define LUSTRE_ETIMEDOUT 110/* Connection timed out */ #define LUSTRE_ECONNREFUSED 111/* Connection refused */
@@ -186,7 +200,8 @@#define LUSTRE_ERESTARTNOHAND 514/* restart if no handler.. */ #define LUSTRE_ENOIOCTLCMD 515/* No ioctl command */ #define LUSTRE_ERESTART_RESTARTBLOCK 516/* restart by calling -sys_restart_syscall */ +* sys_restart_syscall +*/ #define LUSTRE_EBADHANDLE 521/* Illegal NFS file handle */ #define LUSTRE_ENOTSYNC 522/* Update synchronization mismatch */ #define LUSTRE_EBADCOOKIE 523/* Cookie is stale */
@@ -195,9 +210,11 @@#define LUSTRE_ESERVERFAULT 526/* An untranslatable error occurred */ #define LUSTRE_EBADTYPE 527/* Type not supported by server */ #define LUSTRE_EJUKEBOX 528/* Request initiated, but will not -complete before timeout */ +* complete before timeout +*/ #define LUSTRE_EIOCBQUEUED 529/* iocb queued, will get completion -event */ +* event +*/ #define LUSTRE_EIOCBRETRY 530/* iocb queued, will trigger a retry */ /*
Signature · 1 line
2.7.4
Re: [PATCH 01/11] staging: lustre: fix incorrect multi-line comment style
Quoted 15 lines · Aastha Gupta
This patch fixes the checkpatch.pl warning:
WARNING: block comments use a trailing */ on a separate line
Signed-off-by Aastha Gupta <[email protected]>---
.../staging/lustre/lustre/include/lustre_errno.h| 51 ++++++++++++++--------1 file changed, 34 insertions(+), 17 deletions(-)drivers/staging/lustre/lustre/include/lustre_errno.h +0
-0
drivers/staging/lustre/lustre/include/lustre_errno.h line 75
Quoted 6 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1@@ -71,7 +71,8 @@#define LUSTRE_EMLINK 31/* Too many links */ #define LUSTRE_EPIPE 32/* Broken pipe */ #define LUSTRE_EDOM 33/* Math argument out of domain of -func */ +* func +*/
In cases like this, I'd rather just shorten the comment to fit onto a single line so that it is easier to read, something like:
#define LUSTRE_EDOM 33 /* Math argument out of func domain */
drivers/staging/lustre/lustre/include/lustre_errno.h line 84
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ERANGE 34/* Math result not representable */ #define LUSTRE_EDEADLK 35/* Resource deadlock would occur */ #define LUSTRE_ENAMETOOLONG 36/* File name too long */ @@ -79,7 +80,8 @@#define LUSTRE_ENOSYS 38/* Function not implemented */ #define LUSTRE_ENOTEMPTY 39/* Directory not empty */ #define LUSTRE_ELOOP 40/* Too many symbolic links -encountered */ +* encountered +*/
Similarly,
#define LUSTRE_ELOOP 40 /* Too many symbolic links found */
drivers/staging/lustre/lustre/include/lustre_errno.h line 119
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ENOMSG 42/* No message of desired type */ #define LUSTRE_EIDRM 43/* Identifier removed */ #define LUSTRE_ECHRNG 44/* Channel number out of range */ @@ -113,22 +115,28 @@#define LUSTRE_EDOTDOT 73/* RFS specific error */ #define LUSTRE_EBADMSG 74/* Not a data message */ #define LUSTRE_EOVERFLOW 75/* Value too large for defined data -type */ +* type +*/
#define LUSTRE_EOVERFLOW 75 /* Value too large for data type */
drivers/staging/lustre/lustre/include/lustre_errno.h line 125
Quoted 7 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ENOTUNIQ 76/* Name not unique on network */ #define LUSTRE_EBADFD 77/* File descriptor in bad state */ #define LUSTRE_EREMCHG 78/* Remote address changed */ #define LUSTRE_ELIBACC 79/* Can not access a needed shared -library */ +* library +*/
#define LUSTRE_ELIBACC 79 /* Can't access needed shared library */
drivers/staging/lustre/lustre/include/lustre_errno.h line 128
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ELIBBAD 80/* Accessing a corrupted shared -library */ +* ibrary +*/
Typo here, "ibrary", and this could be shortened to fit on one line:
#define LUSTRE_ELIBBAD 80 /* Accessing corrupted shared library */
drivers/staging/lustre/lustre/include/lustre_errno.h line 132
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ELIBSCN 81/* .lib section in a.out corrupted */ #define LUSTRE_ELIBMAX 82/* Attempting to link in too many shared -libraries */ +* libraries +*/
#define LUSTRE_ELIBMAX 82 /* Trying to link too many libraries */
drivers/staging/lustre/lustre/include/lustre_errno.h line 135
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ELIBEXEC 83/* Cannot exec a shared library -directly */ +* directly +*/
#define LUSTRE_ELIBEXEC 83 /* Cannot exec shared lib directly */
drivers/staging/lustre/lustre/include/lustre_errno.h line 139
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EILSEQ 84/* Illegal byte sequence */ #define LUSTRE_ERESTART 85/* Interrupted system call should be -restarted */ +* restarted +*/
#define LUSTRE_ERESTART 85 /* Restart interrupted system call */
drivers/staging/lustre/lustre/include/lustre_errno.h line 151
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ESTRPIPE 86/* Streams pipe error */ #define LUSTRE_EUSERS 87/* Too many users */ #define LUSTRE_ENOTSOCK 88/* Socket operation on non-socket */ @@ -139,25 +147,31 @@#define LUSTRE_EPROTONOSUPPORT 93/* Protocol not supported */ #define LUSTRE_ESOCKTNOSUPPORT 94/* Socket type not supported */ #define LUSTRE_EOPNOTSUPP 95/* Operation not supported on transport -endpoint */ +* endpoint +*/
#define LUSTRE_EOPNOTSUPP 95 /* Operation not supported */
drivers/staging/lustre/lustre/include/lustre_errno.h line 155
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EPFNOSUPPORT 96/* Protocol family not supported */ #define LUSTRE_EAFNOSUPPORT 97/* Address family not supported by -protocol */ +* protocol +*/
#define LUSTRE_EAFNOSUPPORT 97 /* Address family not supported */
drivers/staging/lustre/lustre/include/lustre_errno.h line 162
Quoted 8 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EADDRINUSE 98/* Address already in use */ #define LUSTRE_EADDRNOTAVAIL 99/* Cannot assign requested address */ #define LUSTRE_ENETDOWN 100/* Network is down */ #define LUSTRE_ENETUNREACH 101/* Network is unreachable */ #define LUSTRE_ENETRESET 102/* Network dropped connection because of -reset */ +* reset +*/
#define LUSTRE_ENETRESET 102 /* Network connection drop for reset */
drivers/staging/lustre/lustre/include/lustre_errno.h line 168
Quoted 7 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ECONNABORTED 103/* Software caused connection abort */ #define LUSTRE_ECONNRESET 104/* Connection reset by peer */ #define LUSTRE_ENOBUFS 105/* No buffer space available */ #define LUSTRE_EISCONN 106/* Transport endpoint is already -connected */ +* connected +*/
#define LUSTRE_EISCONN 106 /* Transport endpoint is connected */
drivers/staging/lustre/lustre/include/lustre_errno.h line 171
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ENOTCONN 107/* Transport endpoint is not -connected */ +* connected +*/
#define LUSTRE_ENOTCONN 107 /* Transport endpoint not connected */
drivers/staging/lustre/lustre/include/lustre_errno.h line 174
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ESHUTDOWN 108/* Cannot send after transport endpoint -shutdown */ +* shutdown +*/
#define LUSTRE_ESHUTDOWN 108 /* Cannot send after shutdown */
drivers/staging/lustre/lustre/include/lustre_errno.h line 204
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ETOOMANYREFS 109/* Too many references: cannot splice */ #define LUSTRE_ETIMEDOUT 110/* Connection timed out */ #define LUSTRE_ECONNREFUSED 111/* Connection refused */ @@ -186,7 +200,8 @@#define LUSTRE_ERESTARTNOHAND 514/* restart if no handler.. */ #define LUSTRE_ENOIOCTLCMD 515/* No ioctl command */ #define LUSTRE_ERESTART_RESTARTBLOCK 516/* restart by calling -sys_restart_syscall */ +* sys_restart_syscall +*/
#define LUSTRE_ERESTART_RESTARTBLOCK 516 /* restart via sys_restart_syscall() */
drivers/staging/lustre/lustre/include/lustre_errno.h line 214
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EBADHANDLE 521/* Illegal NFS file handle */ #define LUSTRE_ENOTSYNC 522/* Update synchronization mismatch */ #define LUSTRE_EBADCOOKIE 523/* Cookie is stale */ @@ -195,9 +210,11 @@#define LUSTRE_ESERVERFAULT 526/* An untranslatable error occurred */ #define LUSTRE_EBADTYPE 527/* Type not supported by server */ #define LUSTRE_EJUKEBOX 528/* Request initiated, but will not -complete before timeout */ +* complete before timeout +*/
#define LUSTRE_EJUKEBOX 528 /* Request won't finish before timeout */
drivers/staging/lustre/lustre/include/lustre_errno.h line 217
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EIOCBQUEUED 529/* iocb queued, will get completion -event */ +* event +*/
#define LUSTRE_EIOCBQUEUED 529 /* iocb queued await completion event */
Quoted 6 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +0
-0#define LUSTRE_EIOCBRETRY 530/* iocb queued, will trigger a retry */ /* Signature · 1 line
2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
Re: [PATCH 01/11] staging: lustre: fix incorrect multi-line comment style
Thank you for this suggestion. I will send you the corrected patch soon.
Quoted 207 lines · Andreas
Quoted 15 lines · Aastha Gupta
This patch fixes the checkpatch.pl warning:
WARNING: block comments use a trailing */ on a separate line
Signed-off-by Aastha Gupta <[email protected]>---
.../staging/lustre/lustre/include/lustre_errno.h| 51 ++++++++++++++--------1 file changed, 34 insertions(+), 17 deletions(-)drivers/staging/lustre/lustre/include/lustre_errno.h +0
-0drivers/staging/lustre/lustre/include/lustre_errno.h line 75
Quoted 6 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1@@ -71,7 +71,8 @@#define LUSTRE_EMLINK 31/* Too many links */ #define LUSTRE_EPIPE 32/* Broken pipe */ #define LUSTRE_EDOM 33/* Math argument out of domain of -func */ +* func +*/ In cases like this, I'd rather just shorten the comment to fit onto a single line so that it is easier to read, something like:
#define
LUSTRE_EDOM33 /* Math argument out of func domain */drivers/staging/lustre/lustre/include/lustre_errno.h line 84
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ERANGE 34/* Math result not representable */ #define LUSTRE_EDEADLK 35/* Resource deadlock would occur */ #define LUSTRE_ENAMETOOLONG 36/* File name too long */ @@ -79,7 +80,8 @@#define LUSTRE_ENOSYS 38/* Function not implemented */ #define LUSTRE_ENOTEMPTY 39/* Directory not empty */ #define LUSTRE_ELOOP 40/* Too many symbolic links -encountered */ +* encountered +*/ Similarly,
#define
LUSTRE_ELOOP40 /* Too many symbolic links found */drivers/staging/lustre/lustre/include/lustre_errno.h line 119
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ENOMSG 42/* No message of desired type */ #define LUSTRE_EIDRM 43/* Identifier removed */ #define LUSTRE_ECHRNG 44/* Channel number out of range */ @@ -113,22 +115,28 @@#define LUSTRE_EDOTDOT 73/* RFS specific error */ #define LUSTRE_EBADMSG 74/* Not a data message */ #define LUSTRE_EOVERFLOW 75/* Value too large for defined data -type */ +* type +*/ #define
LUSTRE_EOVERFLOW75 /* Value too large for data type */drivers/staging/lustre/lustre/include/lustre_errno.h line 125
Quoted 7 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ENOTUNIQ 76/* Name not unique on network */ #define LUSTRE_EBADFD 77/* File descriptor in bad state */ #define LUSTRE_EREMCHG 78/* Remote address changed */ #define LUSTRE_ELIBACC 79/* Can not access a needed shared -library */ +* library +*/ #define
LUSTRE_ELIBACC79 /* Can't access needed shared library */drivers/staging/lustre/lustre/include/lustre_errno.h line 128
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ELIBBAD 80/* Accessing a corrupted shared -library */ +* ibrary +*/ Typo here, "ibrary", and this could be shortened to fit on one line:
#define
LUSTRE_ELIBBAD80 /* Accessing corrupted shared library */drivers/staging/lustre/lustre/include/lustre_errno.h line 132
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ELIBSCN 81/* .lib section in a.out corrupted */ #define LUSTRE_ELIBMAX 82/* Attempting to link in too many shared -libraries */ +* libraries +*/ #define
LUSTRE_ELIBMAX82 /* Trying to link too many libraries */drivers/staging/lustre/lustre/include/lustre_errno.h line 135
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ELIBEXEC 83/* Cannot exec a shared library -directly */ +* directly +*/ #define
LUSTRE_ELIBEXEC83 /* Cannot exec shared lib directly */drivers/staging/lustre/lustre/include/lustre_errno.h line 139
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EILSEQ 84/* Illegal byte sequence */ #define LUSTRE_ERESTART 85/* Interrupted system call should be -restarted */ +* restarted +*/ #define
LUSTRE_ERESTART85 /* Restart interrupted system call */drivers/staging/lustre/lustre/include/lustre_errno.h line 151
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ESTRPIPE 86/* Streams pipe error */ #define LUSTRE_EUSERS 87/* Too many users */ #define LUSTRE_ENOTSOCK 88/* Socket operation on non-socket */ @@ -139,25 +147,31 @@#define LUSTRE_EPROTONOSUPPORT 93/* Protocol not supported */ #define LUSTRE_ESOCKTNOSUPPORT 94/* Socket type not supported */ #define LUSTRE_EOPNOTSUPP 95/* Operation not supported on transport -endpoint */ +* endpoint +*/ #define
LUSTRE_EOPNOTSUPP95 /* Operation not supported */drivers/staging/lustre/lustre/include/lustre_errno.h line 155
Quoted 5 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EPFNOSUPPORT 96/* Protocol family not supported */ #define LUSTRE_EAFNOSUPPORT 97/* Address family not supported by -protocol */ +* protocol +*/ #define
LUSTRE_EAFNOSUPPORT97 /* Address family not supported */drivers/staging/lustre/lustre/include/lustre_errno.h line 162
Quoted 8 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EADDRINUSE 98/* Address already in use */ #define LUSTRE_EADDRNOTAVAIL 99/* Cannot assign requested address */ #define LUSTRE_ENETDOWN 100/* Network is down */ #define LUSTRE_ENETUNREACH 101/* Network is unreachable */ #define LUSTRE_ENETRESET 102/* Network dropped connection because of -reset */ +* reset +*/ #define
LUSTRE_ENETRESET102 /* Network connection drop for reset */drivers/staging/lustre/lustre/include/lustre_errno.h line 168
Quoted 7 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ECONNABORTED 103/* Software caused connection abort */ #define LUSTRE_ECONNRESET 104/* Connection reset by peer */ #define LUSTRE_ENOBUFS 105/* No buffer space available */ #define LUSTRE_EISCONN 106/* Transport endpoint is already -connected */ +* connected +*/ #define
LUSTRE_EISCONN106 /* Transport endpoint is connected */drivers/staging/lustre/lustre/include/lustre_errno.h line 171
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ENOTCONN 107/* Transport endpoint is not -connected */ +* connected +*/ #define
LUSTRE_ENOTCONN107 /* Transport endpoint not connected */drivers/staging/lustre/lustre/include/lustre_errno.h line 174
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ESHUTDOWN 108/* Cannot send after transport endpoint -shutdown */ +* shutdown +*/ #define
LUSTRE_ESHUTDOWN108 /* Cannot send after shutdown */drivers/staging/lustre/lustre/include/lustre_errno.h line 204
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_ETOOMANYREFS 109/* Too many references: cannot splice */ #define LUSTRE_ETIMEDOUT 110/* Connection timed out */ #define LUSTRE_ECONNREFUSED 111/* Connection refused */ @@ -186,7 +200,8 @@#define LUSTRE_ERESTARTNOHAND 514/* restart if no handler.. */ #define LUSTRE_ENOIOCTLCMD 515/* No ioctl command */ #define LUSTRE_ERESTART_RESTARTBLOCK 516/* restart by calling -sys_restart_syscall */ +* sys_restart_syscall +*/ #define
LUSTRE_ERESTART_RESTARTBLOCK516 /* restart viasys_restart_syscall()*/drivers/staging/lustre/lustre/include/lustre_errno.h line 214
Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EBADHANDLE 521/* Illegal NFS file handle */ #define LUSTRE_ENOTSYNC 522/* Update synchronization mismatch */ #define LUSTRE_EBADCOOKIE 523/* Cookie is stale */ @@ -195,9 +210,11 @@#define LUSTRE_ESERVERFAULT 526/* An untranslatable error occurred */ #define LUSTRE_EBADTYPE 527/* Type not supported by server */ #define LUSTRE_EJUKEBOX 528/* Request initiated, but will not -complete before timeout */ +* complete before timeout +*/ #define
LUSTRE_EJUKEBOX528 /* Request won't finish before timeout */drivers/staging/lustre/lustre/include/lustre_errno.h line 217
Quoted 4 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +2
-1#define LUSTRE_EIOCBQUEUED 529/* iocb queued, will get completion -event */ +* event +*/ #define
LUSTRE_EIOCBQUEUED529 /* iocb queued await completion event */Quoted 6 lines
drivers/staging/lustre/lustre/include/lustre_errno.h +0
-1#define LUSTRE_EIOCBRETRY 530/* iocb queued, will trigger a retry */ /* -- 2.7.4
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH 2/11 staging: lustre: fix comparisons should place the constant on the right side
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: Comparisons should place the constant on the right side of the test
--- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/lu_object.h +1 -1
@@ -1130,7 +1130,7 @@ struct lu_context_key { { \type *value; \ \ -BUILD_BUG_ON (PAGE_SIZE <sizeof (*value)); \ +BUILD_BUG_ON (sizeof (*value) >PAGE_SIZE ); \ \ value =kzalloc (sizeof (*value),GFP_NOFS ); \if (!value) \
Signature · 1 line
2.7.4
PATCH 3/11 staging: lustre: fix macro definitions warnings
In reply to Aastha GuptaThis patch fixes the checkpatch.pl warnings related to macro definitions.
1. macros with complex values should be enclosed in parentheses.
2. macros with multiple lines should be enclosed in do-while block.
--- drivers/staging/lustre/lustre/include/lu_object.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/include/lu_object.h +8 -6
@@ -1151,8 +1151,10 @@ struct lu_context_key { struct __##mod##__dummy_fini {; } /* semicolon catcher */#define LU_KEY_INIT_FINI (mod, type) \ +do { \ LU_KEY_INIT(mod, type); \ - LU_KEY_FINI(mod, type) + LU_KEY_FINI(mod, type); \ +} while (0)#define LU_CONTEXT_KEY_DEFINE (mod, tags) \ struct lu_context_key mod##_thread_key = { \
@@ -1161,10 +1163,8 @@ struct lu_context_key { .lct_fini = mod##_key_fini \ } -#define LU_CONTEXT_KEY_INIT (key) \ -do { \ - (key)->lct_owner = THIS_MODULE; \ -} while (0) +#define LU_CONTEXT_KEY_INIT (key) ((key)->lct_owner = THIS_MODULE) +int lu_context_key_register (struct lu_context_key *key);void lu_context_key_degister (struct lu_context_key *key);
@@ -1223,10 +1223,12 @@ void lu_context_key_revive(struct lu_context_key *key); struct __##mod##_dummy_type_stop {; }#define LU_TYPE_INIT_FINI (mod, ...) \ +do { \ LU_TYPE_INIT(mod, __VA_ARGS__); \ LU_TYPE_FINI(mod, __VA_ARGS__); \ LU_TYPE_START(mod, __VA_ARGS__); \ - LU_TYPE_STOP(mod, __VA_ARGS__) + LU_TYPE_STOP(mod, __VA_ARGS__); \ +} while (0)int lu_context_init (struct lu_context *ctx,__u32 tags);void lu_context_fini (struct lu_context *ctx);
Signature · 1 line
2.7.4
PATCH 4/11 staging: lustre: drop macro that has no uses
In reply to Aastha GuptaThis 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
@@ -1305,8 +1305,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 5/11 staging: lustre: put trailing */ on separate line
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning 'put the trailing */ on a separate line'.
--- drivers/staging/lustre/lustre/include/lustre_dlm_flags.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +4 -2
@@ -136,7 +136,8 @@#define ldlm_clear_cancel_on_block (_l) LDLM_CLEAR_FLAG((_l), 1ULL << 23)/** -* measure lock contention and return -EUSERS if locking contention is high */ +* measure lock contention and return -EUSERS if locking contention is high +*/ #define LDLM_FL_DENY_ON_CONTENTION 0x0000000040000000ULL/* bit 30 */ #define ldlm_is_deny_on_contention (_l) LDLM_TEST_FLAG((_l), 1ULL << 30)#define ldlm_set_deny_on_contention (_l) LDLM_SET_FLAG((_l), 1ULL << 30)
@@ -144,7 +145,8 @@/** * These are flags that are mapped into the flags and ASTs of blocking -* locks Add FL_DISCARD to blocking ASTs */ +* locks Add FL_DISCARD to blocking ASTs +*/ #define LDLM_FL_AST_DISCARD_DATA 0x0000000080000000ULL/* bit 31 */ #define ldlm_is_ast_discard_data (_l) LDLM_TEST_FLAG((_l), 1ULL << 31)#define ldlm_set_ast_discard_data (_l) LDLM_SET_FLAG((_l), 1ULL << 31)
Signature · 1 line
2.7.4
PATCH 6/11 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
PATCH 7/11 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
PATCH 8/11 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 | 4 ++- 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 | 41 ++++++++++++++-------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +- 8 files changed, 67 insertions(+), 35 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 +3 -1
@@ -88,7 +88,9 @@ 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 aged locks (non +* lru resize). +*/ 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 -15
109 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
PATCH 9/11 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 | 24 +++++++----- drivers/staging/lustre/lustre/llite/file.c | 12 ++++-- .../staging/lustre/lustre/llite/llite_internal.h | 20 +++++++--- drivers/staging/lustre/lustre/llite/llite_lib.c | 45 ++++++++++++++-------- 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 | 24 ++++++++---- drivers/staging/lustre/lustre/llite/rw.c | 12 ++++-- drivers/staging/lustre/lustre/llite/rw26.c | 3 +- drivers/staging/lustre/lustre/llite/statahead.c | 18 +++++---- drivers/staging/lustre/lustre/llite/super25.c | 3 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 +- 13 files changed, 117 insertions(+), 62 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 +15 -9
@@ -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);
@@ -419,7 +420,8 @@ static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump,if (unlikely (lump->lum_magic !=LMV_USER_MAGIC ))return -EINVAL ; -CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p) name %s stripe_offset %d, stripe_count: %u\n" , +CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID +"(%p) name %s stripe_offset %d, stripe_count: %u\n" ,PFID (ll_inode2fid (parent)), parent, dirname, (int )lump->lum_stripe_offset, lump->lum_stripe_count);
@@ -502,7 +504,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 ;
@@ -732,10 +735,11 @@ 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;
@@ -816,7 +820,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;
@@ -832,7 +837,8 @@ 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. " +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);
drivers/staging/lustre/lustre/llite/file.c +8 -4
@@ -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);
@@ -2507,7 +2509,8 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)if (IS_ERR (op_data))return PTR_ERR (op_data); -CDEBUG (D_DLMTRACE ,"inode=" DFID ", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n" , +CDEBUG (D_DLMTRACE ,"inode=" DFID +", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n" ,PFID (ll_inode2fid (inode)), flock.l_flock.pid, flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
@@ -3455,7 +3458,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 +14 -6
@@ -84,7 +84,9 @@ 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 a buffer with +* NAME_MAX+1 size +*/ struct lu_fid lgd_fid;/* target fid we are looking for */ int lgd_found;/* inode matched? */ };
@@ -637,7 +639,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 +1068,9 @@ 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 is 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 */
@@ -1253,7 +1258,8 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,*/ if (it->it_remote_lock_mode) { handle.cookie = it->it_remote_lock_handle; -CDEBUG (D_DLMTRACE ,"setting l_data to inode " DFID "%p for remote lock %#llx\n" , +CDEBUG (D_DLMTRACE ,"setting l_data to inode " +DFID "%p for remote lock %#llx\n" ,PFID (ll_inode2fid (inode)), inode, handle.cookie);md_set_lock_data (exp, &handle, inode,NULL );
@@ -1261,7 +1267,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 +1291,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 +29 -16
129 lines not on this page · raw message
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 +16 -8
@@ -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 (); }
@@ -273,7 +274,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,if ((bits &MDS_INODELOCK_UPDATE ) &&S_ISDIR (inode->i_mode)) {struct ll_inode_info *lli =ll_i2info (inode); -CDEBUG (D_INODE ,"invalidating inode " DFID " lli = %p, pfid = " DFID "\n" , +CDEBUG (D_INODE ,"invalidating inode " DFID +" lli = %p, pfid = " DFID "\n" ,PFID (ll_inode2fid (inode)), lli,PFID (&lli->lli_pfid));
@@ -289,7 +291,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));
@@ -683,7 +686,8 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,struct dentry *de;int rc =0 ; -CDEBUG (D_VFSTRACE ,"VFS Op:name=%pd, dir=" DFID "(%p),file %p,open_flags %x,mode %x opened %d\n" , +CDEBUG (D_VFSTRACE ,"VFS Op:name=%pd, dir=" DFID +"(%p),file %p,open_flags %x,mode %x opened %d\n" , dentry,PFID (ll_inode2fid (dir)), dir, file, open_flags, mode, *opened);
@@ -736,7 +740,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
@@ -980,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 );
@@ -1101,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);
@@ -1136,7 +1143,8 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild,return -EINVAL ;CDEBUG (D_VFSTRACE , -"VFS Op:oldname=%pd, src_dir=" DFID "(%p), newname=%pd, tgt_dir=" DFID "(%p)\n" , +"VFS Op:oldname=%pd, src_dir=" DFID +"(%p), newname=%pd, tgt_dir=" DFID "(%p)\n" , src_dchild,PFID (ll_inode2fid (src)), src, tgt_dchild,PFID (ll_inode2fid (tgt)), tgt);
drivers/staging/lustre/lustre/llite/rw.c +8 -4
@@ -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);
@@ -670,7 +672,8 @@ static void ras_stride_increase_window(struct ll_readahead_state *ras,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" , + >= 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/rw26.c +2 -1
@@ -327,7 +327,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter)if ((file_offset & ~PAGE_MASK ) || (count & ~PAGE_MASK ))return -EINVAL ; -CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n" , +CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID +"(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n" ,PFID (ll_inode2fid (inode)), inode, count,MAX_DIO_SIZE , file_offset, file_offset, count >>PAGE_SHIFT ,MAX_DIO_SIZE >>PAGE_SHIFT );
drivers/staging/lustre/lustre/llite/statahead.c +11 -7
@@ -1008,7 +1008,8 @@ static int ll_statahead_thread(void *arg) sai->sai_in_readpage =0 ;if (IS_ERR (page)) { rc =PTR_ERR (page); -CDEBUG (D_READA ,"error reading dir " DFID " at %llu/%llu: opendir_pid = %u: rc = %d\n" , +CDEBUG (D_READA ,"error reading dir " DFID +" at %llu/%llu: opendir_pid = %u: rc = %d\n" ,PFID (ll_inode2fid (dir)), pos, sai->sai_index, lli->lli_opendir_pid, rc);break ;
@@ -1082,7 +1083,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);
@@ -1105,7 +1107,8 @@ static int ll_statahead_thread(void *arg)if (sa_low_hit (sai)) { rc = -EFAULT ;atomic_inc (&sbi->ll_sa_wrong); -CDEBUG (D_READA ,"Statahead for dir " DFID " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n" , +CDEBUG (D_READA ,"Statahead for dir " DFID +" hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n" ,PFID (&lli->lli_fid), sai->sai_hit, sai->sai_miss, sai->sai_sent, sai->sai_replied,current_pid ());
@@ -1274,7 +1277,8 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)struct ll_inode_info *lli =ll_i2info (dir); rc =PTR_ERR (page); -CERROR ("%s: error reading dir " DFID " at %llu: opendir_pid = %u : rc = %d\n" , +CERROR ("%s: error reading dir " DFID +" at %llu: opendir_pid = %u : rc = %d\n" ,ll_get_fsname (dir->i_sb,NULL ,0 ),PFID (ll_inode2fid (dir)), pos, lli->lli_opendir_pid, rc);
@@ -1447,7 +1451,7 @@ static int revalidate_statahead_dentry(struct inode *dir,if (entry->se_state ==SA_ENTRY_SUCC && entry->se_inode) {struct inode *inode = entry->se_inode;struct lookup_intent it = { .it_op =IT_GETATTR , - .it_lock_handle = entry->se_handle }; + .it_lock_handle = entry->se_handle};__u64 bits; rc = md_revalidate_lock(ll_i2mdexp(dir), &it,
@@ -1470,8 +1474,8 @@ static int revalidate_statahead_dentry(struct inode *dir, entry->se_inode =NULL ; }else if ((*dentryp)->d_inode != inode) {/* revalidate, but inode is recreated */ - CDEBUG(D_READA, - "%s: stale dentry %pd inode " DFID ", statahead inode " DFID "\n", + CDEBUG(D_READA, "%s: stale dentry %pd inode " + DFID ", statahead inode " DFID "\n", ll_get_fsname((*dentryp)->d_inode->i_sb, NULL, 0), *dentryp,
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 09/11] staging: lustre: llite: fix lines over 80 characters in llite files
Quoted 11 lines · Aastha Gupta
This fixes checkpatch.pl warning:
WARNING: line over 80 charactersSigned-off-by Aastha Gupta <[email protected]>drivers/staging/lustre/lustre/llite/dir.c +0
-0
drivers/staging/lustre/lustre/llite/dir.c static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump, · line 426
Quoted 8 lines
drivers/staging/lustre/lustre/llite/dir.c +2
-1@@ -419,7 +420,8 @@ static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump,if (unlikely (lump->lum_magic !=LMV_USER_MAGIC ))return -EINVAL ; -CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p) name %s stripe_offset %d, stripe_count: %u\n" , +CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID +"(%p) name %s stripe_offset %d, stripe_count: %u\n" ,PFID (ll_inode2fid (parent)), parent, dirname, (int )lump->lum_stripe_offset, lump->lum_stripe_count);
I believe that new kernel style is to allow error strings to be longer than 80 columns, so that they can be found more easily?
drivers/staging/lustre/lustre/llite/dir.c static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy) · line 844
Quoted 10 lines
drivers/staging/lustre/lustre/llite/dir.c +2
-1@@ -832,7 +837,8 @@ 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. " +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);
I don't think these are really an improvement over the current code, since they still exceed 80 columns, unless it actually quiets the warning? In that case, the "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/file.c int ll_file_open(struct inode *inode, struct file *file) · line 609
Quoted 11 lines
drivers/staging/lustre/lustre/llite/file.c +2
-1@@ -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);
Align continued lines after '(' on the previous line.
drivers/staging/lustre/lustre/llite/file.c ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) · line 2515
Quoted 12 lines
drivers/staging/lustre/lustre/llite/file.c +2
-1if (rc) goto out_openerr;@@ -2507,7 +2509,8 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)if (IS_ERR (op_data))return PTR_ERR (op_data); -CDEBUG (D_DLMTRACE ,"inode=" DFID ", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n" , +CDEBUG (D_DLMTRACE ,"inode=" DFID +", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n" ,PFID (ll_inode2fid (inode)), flock.l_flock.pid, flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
Similarly, this should be kept as a single line.
drivers/staging/lustre/lustre/llite/llite_internal.h struct ll_dentry_data { · line 89
Quoted 12 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +3
-1@@ -84,7 +84,9 @@ 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 a buffer with +* NAME_MAX+1 size +*/
Just drop "a " from the comment to keep it under 80 characters.
drivers/staging/lustre/lustre/llite/llite_internal.h static inline int ll_need_32bit_api(struct ll_sb_info *sbi) · line 643
Quoted 10 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +2
-1struct lu_fid lgd_fid;/* target fid we are looking for */ int lgd_found;/* inode matched? */ };@@ -637,7 +639,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 ));
Align continued lines after '(' on previous line.
drivers/staging/lustre/lustre/llite/llite_internal.h struct ll_statahead_info { · line 1073
Quoted 11 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +3
-1#else return unlikely (sbi->ll_flags &LL_SBI_32BIT_API );#endif @@ -1065,7 +1068,9 @@ 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 is in +* readdir() +*/
Just drop "is " to keep it under 80 columns.
drivers/staging/lustre/lustre/llite/llite_internal.h static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, · line 1262
Quoted 10 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +2
-1wait_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 */ @@ -1253,7 +1258,8 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,*/ if (it->it_remote_lock_mode) { handle.cookie = it->it_remote_lock_handle; - CDEBUG(D_DLMTRACE, "setting l_data to inode " DFID "%p for remote lock %#llx\n", + CDEBUG(D_DLMTRACE, "setting l_data to inode " + DFID "%p for remote lock %#llx\n",
Should not be split.
Quoted 9 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +0
-0PFID (ll_inode2fid (inode)), inode, handle.cookie);md_set_lock_data (exp, &handle, inode,NULL );drivers/staging/lustre/lustre/llite/llite_lib.c +0
-0
drivers/staging/lustre/lustre/llite/llite_lib.c static int client_common_fill_super(struct super_block *sb, char *md, char *dt, · line 548
Quoted 6 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -540,7 +544,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err =ldebugfs_register_mountpoint (llite_root, sb, dt, md);if (err <0 ) {CERROR ("%s: could not register mount in debugfs: " -"rc = %d\n" ,ll_get_fsname (sb,NULL ,0 ), err); +"rc = %d\n" ,ll_get_fsname (sb,NULL ,0 ), + err);
It isn't clear why this was changed, since the original was still within 80 columns?
drivers/staging/lustre/lustre/llite/llite_lib.c int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) · line 1430
Quoted 11 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1err =0 ; } }@@ -1419,7 +1426,8 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)struct md_op_data *op_data =NULL ;int rc =0 ; - CDEBUG(D_VFSTRACE, "%s: setattr inode " DFID "(%p) from %llu to %llu, valid %x, hsm_import %d\n", + CDEBUG(D_VFSTRACE, "%s: setattr inode " DFID + "(%p) from %llu to %llu, valid %x, hsm_import %d\n",
The error message should be kept on a single line.
Quoted 14 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1ll_get_fsname (inode->i_sb,NULL ,0 ),PFID (&lli->lli_fid), inode, i_size_read(inode), attr->ia_size, attr->ia_valid, hsm_import);@@ -1744,7 +1752,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;
drivers/staging/lustre/lustre/llite/llite_lib.c int ll_update_inode(struct inode *inode, struct lustre_md *md) · line 1796
Quoted 6 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -1783,7 +1792,8 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)/* FID shouldn't be changed! */ if (fid_is_sane (&lli->lli_fid)) { LASSERTF(lu_fid_eq(&lli->lli_fid, &body->mbo_fid1), - "Trying to change FID " DFID " to the " DFID ", inode " DFID "(%p)\n", + "Trying to change FID " DFID " to the " DFID + ", inode " DFID "(%p)\n",
Error message should be kept on a single line.
Quoted 11 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-2PFID (&lli->lli_fid),PFID (&body->mbo_fid1), PFID(ll_inode2fid(inode)), inode); }else {@@ -1870,8 +1880,8 @@ void ll_delete_inode(struct inode *inode)truncate_inode_pages_final (&inode->i_data); - LASSERTF(!inode->i_data.nrpages, - "inode=" DFID "(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n", + LASSERTF(!inode->i_data.nrpages, "inode=" DFID + "(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n",
...
Quoted 10 lines
PFID(ll_inode2fid(inode)), inode, inode->i_data.nrpages); ll_clear_inode(inode);drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -2441,7 +2452,8 @@ void ll_dirty_page_discard_warn(struct page *page, int ioret) } CDEBUG(D_WARNING, - "%s: dirty page discard: %s/fid: " DFID "/%s may get corrupted (rc %d)\n", + "%s: dirty page discard: %s/fid: " DFID + "/%s may get corrupted (rc %d)\n",
...
Quoted 8 lines
ll_get_fsname(page->mapping->host->i_sb, NULL, 0), s2lsi(page->mapping->host->i_sb)->lsi_lmd->lmd_dev, PFID(&obj->vob_header.coh_lu.loh_fid),drivers/staging/lustre/lustre/llite/namei.c +0
-0
drivers/staging/lustre/lustre/llite/namei.c int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, · line 278
Quoted 6 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1@@ -273,7 +274,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,if ((bits &MDS_INODELOCK_UPDATE ) &&S_ISDIR (inode->i_mode)) {struct ll_inode_info *lli =ll_i2info (inode); - CDEBUG(D_INODE, "invalidating inode " DFID " lli = %p, pfid = " DFID "\n", + CDEBUG(D_INODE, "invalidating inode " DFID + " lli = %p, pfid = " DFID "\n",
Should be kept on a single line, like:
CDEBUG(D_INODE,
"invalidating inode "DFID" lli = %p, pfid = "DFID"\n",
drivers/staging/lustre/lustre/llite/namei.c static int ll_atomic_open(struct inode *dir, struct dentry *dentry, · line 690
Quoted 10 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1PFID (ll_inode2fid (inode)), lli, PFID(&lli->lli_pfid));@@ -683,7 +686,8 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,struct dentry *de;int rc =0 ; - CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir=" DFID "(%p),file %p,open_flags %x,mode %x opened %d\n", + CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir=" DFID + "(%p),file %p,open_flags %x,mode %x opened %d\n",
Should be kept on a single line.
drivers/staging/lustre/lustre/llite/namei.c static int ll_atomic_open(struct inode *dir, struct dentry *dentry, · line 744
Quoted 10 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1dentry,PFID (ll_inode2fid (dir)), dir, file, open_flags, mode, *opened);@@ -736,7 +740,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 )) {
Align continued line after first '(' on previous line.
drivers/staging/lustre/lustre/llite/namei.c static int ll_rename(struct inode *src, struct dentry *src_dchild, · line 1147
Quoted 10 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1/* Open dentry. */ if (S_ISFIFO (d_inode (dentry)->i_mode)) {/* We cannot call open here as it might @@ -1136,7 +1143,8 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild,return -EINVAL ; CDEBUG(D_VFSTRACE, - "VFS Op:oldname=%pd, src_dir=" DFID "(%p), newname=%pd, tgt_dir=" DFID "(%p)\n", + "VFS Op:oldname=%pd, src_dir=" DFID + "(%p), newname=%pd, tgt_dir=" DFID "(%p)\n",
Should be kept on a single line.
Quoted 8 lines
drivers/staging/lustre/lustre/llite/namei.c +0
-0src_dchild,PFID (ll_inode2fid (src)), src, tgt_dchild, PFID(ll_inode2fid(tgt)), tgt);drivers/staging/lustre/lustre/llite/rw26.c +0
-0
drivers/staging/lustre/lustre/llite/rw26.c static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter) · line 331
Quoted 6 lines
drivers/staging/lustre/lustre/llite/rw26.c +2
-1@@ -327,7 +327,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter)if ((file_offset & ~PAGE_MASK ) || (count & ~PAGE_MASK ))return -EINVAL ; - CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID "(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n", + CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID + "(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n",
Should be kept on a single line.
Quoted 14 lines
drivers/staging/lustre/lustre/llite/rw26.c +0
-0PFID (ll_inode2fid (inode)), inode, count,MAX_DIO_SIZE , file_offset, file_offset, count >>PAGE_SHIFT , MAX_DIO_SIZE >> PAGE_SHIFT);drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1008,7 +1008,8 @@ static int ll_statahead_thread(void *arg) sai->sai_in_readpage =0 ;if (IS_ERR (page)) { rc =PTR_ERR (page); - CDEBUG(D_READA, "error reading dir " DFID " at %llu/%llu: opendir_pid = %u: rc = %d\n", + CDEBUG(D_READA, "error reading dir " DFID + " at %llu/%llu: opendir_pid = %u: rc = %d\n",
...
Quoted 10 lines
PFID(ll_inode2fid(dir)), pos, sai->sai_index, lli->lli_opendir_pid, rc); break;drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1105,7 +1107,8 @@ static int ll_statahead_thread(void *arg)if (sa_low_hit (sai)) { rc = -EFAULT ;atomic_inc (&sbi->ll_sa_wrong); - CDEBUG(D_READA, "Statahead for dir " DFID " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n", + CDEBUG(D_READA, "Statahead for dir " DFID + " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n",
...
Quoted 10 lines
PFID(&lli->lli_fid), sai->sai_hit, sai->sai_miss, sai->sai_sent, sai->sai_replied, current_pid());drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1274,7 +1277,8 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)struct ll_inode_info *lli =ll_i2info (dir); rc =PTR_ERR (page); - CERROR("%s: error reading dir " DFID " at %llu: opendir_pid = %u : rc = %d\n", + CERROR("%s: error reading dir " DFID + " at %llu: opendir_pid = %u : rc = %d\n",
...
drivers/staging/lustre/lustre/llite/statahead.c static int revalidate_statahead_dentry(struct inode *dir, · line 1479
Quoted 12 lines
ll_get_fsname(dir->i_sb, NULL, 0), PFID(ll_inode2fid(dir)), pos, lli->lli_opendir_pid, rc);drivers/staging/lustre/lustre/llite/statahead.c +2
-2@@ -1470,8 +1474,8 @@ static int revalidate_statahead_dentry(struct inode *dir, entry->se_inode =NULL ; }else if ((*dentryp)->d_inode != inode) {/* revalidate, but inode is recreated */ - CDEBUG(D_READA, - "%s: stale dentry %pd inode " DFID ", statahead inode " DFID "\n", + CDEBUG(D_READA, "%s: stale dentry %pd inode " + DFID ", statahead inode " DFID "\n",
I think the original was correct.
Quoted 8 lines
drivers/staging/lustre/lustre/llite/statahead.c +0
-0ll_get_fsname ((*dentryp)->d_inode->i_sb, NULL, 0),*dentryp,
drivers/staging/lustre/lustre/llite/super25.c +0
-0
drivers/staging/lustre/lustre/llite/super25.c static int __init lustre_init(void) · line 92
Quoted 6 lines
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 );
Align after first '(' on previous line.
drivers/staging/lustre/lustre/llite/super25.c static int __init lustre_init(void) · line 95
Quoted 3 lines
drivers/staging/lustre/lustre/llite/super25.c +0
-0/* print an address of _any_ initialized kernel symbol from this * module, to allow debugging with gdb that doesn't support data
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
Re: [PATCH 09/11] staging: lustre: llite: fix lines over 80 characters in llite files
Thank you for the suggestions. I will make these changes and send you the patch again.
Quoted 374 lines · Andreas
Quoted 11 lines · Aastha Gupta
This fixes checkpatch.pl warning:
WARNING: line over 80 charactersSigned-off-by Aastha Gupta <[email protected]>drivers/staging/lustre/lustre/llite/dir.c +0
-0drivers/staging/lustre/lustre/llite/dir.c static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump, · line 426
Quoted 8 lines
drivers/staging/lustre/lustre/llite/dir.c +2
-1@@ -419,7 +420,8 @@ static int ll_dir_setdirstripe(struct inode *parent, struct lmv_user_md *lump,if (unlikely (lump->lum_magic !=LMV_USER_MAGIC ))return -EINVAL ; -CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID "(%p) name %s stripe_offset %d, stripe_count: %u\n" , +CDEBUG (D_VFSTRACE ,"VFS Op:inode=" DFID +"(%p) name %s stripe_offset %d, stripe_count: %u\n" ,PFID (ll_inode2fid (parent)), parent, dirname, (int )lump->lum_stripe_offset, lump->lum_stripe_count);I believe that new kernel style is to allow error strings to be longer than 80 columns, so that they can be found more easily?
drivers/staging/lustre/lustre/llite/dir.c static int ll_ioc_copy_end(struct super_block *sb, struct hsm_copy *copy) · line 844
Quoted 10 lines
drivers/staging/lustre/lustre/llite/dir.c +2
-1@@ -832,7 +837,8 @@ 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. " +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);I don't think these are really an improvement over the current code, since they still exceed 80 columns, unless it actually quiets the warning? In that case, the "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/file.c int ll_file_open(struct inode *inode, struct file *file) · line 609
Quoted 11 lines
drivers/staging/lustre/lustre/llite/file.c +2
-1@@ -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);Align continued lines after '(' on the previous line.
drivers/staging/lustre/lustre/llite/file.c ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) · line 2515
Quoted 12 lines
drivers/staging/lustre/lustre/llite/file.c +2
-1if (rc) goto out_openerr;@@ -2507,7 +2509,8 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)if (IS_ERR (op_data))return PTR_ERR (op_data); -CDEBUG (D_DLMTRACE ,"inode=" DFID ", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n" , +CDEBUG (D_DLMTRACE ,"inode=" DFID +", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n" ,PFID (ll_inode2fid (inode)), flock.l_flock.pid, flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);Similarly, this should be kept as a single line.
drivers/staging/lustre/lustre/llite/llite_internal.h struct ll_dentry_data { · line 89
Quoted 12 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +3
-1@@ -84,7 +84,9 @@ 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 a buffer with +* NAME_MAX+1 size +*/ Just drop "a " from the comment to keep it under 80 characters.
drivers/staging/lustre/lustre/llite/llite_internal.h static inline int ll_need_32bit_api(struct ll_sb_info *sbi) · line 643
Quoted 10 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +2
-1struct lu_fid lgd_fid;/* target fid we are looking for */ int lgd_found;/* inode matched? */ };@@ -637,7 +639,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 ));Align continued lines after '(' on previous line.
drivers/staging/lustre/lustre/llite/llite_internal.h struct ll_statahead_info { · line 1073
Quoted 11 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +3
-1#else return unlikely (sbi->ll_flags &LL_SBI_32BIT_API );#endif @@ -1065,7 +1068,9 @@ 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 is in +* readdir() +*/ Just drop "is " to keep it under 80 columns.
drivers/staging/lustre/lustre/llite/llite_internal.h static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, · line 1262
Quoted 10 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +2
-1wait_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 */ @@ -1253,7 +1258,8 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,*/ if (it->it_remote_lock_mode) { handle.cookie = it->it_remote_lock_handle; - CDEBUG(D_DLMTRACE, "setting l_data to inode " DFID "%p for remote lock %#llx\n", + CDEBUG(D_DLMTRACE, "setting l_data to inode " + DFID "%p for remote lock %#llx\n",Should not be split.
Quoted 9 lines
drivers/staging/lustre/lustre/llite/llite_internal.h +0
-0PFID (ll_inode2fid (inode)), inode, handle.cookie);md_set_lock_data (exp, &handle, inode,NULL );drivers/staging/lustre/lustre/llite/llite_lib.c +0
-0drivers/staging/lustre/lustre/llite/llite_lib.c static int client_common_fill_super(struct super_block *sb, char *md, char *dt, · line 548
Quoted 6 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -540,7 +544,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, err =ldebugfs_register_mountpoint (llite_root, sb, dt, md);if (err <0 ) {CERROR ("%s: could not register mount in debugfs: " -"rc = %d\n" ,ll_get_fsname (sb,NULL ,0 ), err); +"rc = %d\n" ,ll_get_fsname (sb,NULL ,0 ), + err);It isn't clear why this was changed, since the original was still within 80 columns?
drivers/staging/lustre/lustre/llite/llite_lib.c int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) · line 1430
Quoted 11 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1err =0 ; } }@@ -1419,7 +1426,8 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)struct md_op_data *op_data =NULL ;int rc =0 ; - CDEBUG(D_VFSTRACE, "%s: setattr inode " DFID "(%p) from %llu to %llu, valid %x, hsm_import %d\n", + CDEBUG(D_VFSTRACE, "%s: setattr inode " DFID + "(%p) from %llu to %llu, valid %x, hsm_import %d\n",The error message should be kept on a single line.
Quoted 14 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1ll_get_fsname (inode->i_sb,NULL ,0 ),PFID (&lli->lli_fid), inode, i_size_read(inode), attr->ia_size, attr->ia_valid, hsm_import);@@ -1744,7 +1752,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;drivers/staging/lustre/lustre/llite/llite_lib.c int ll_update_inode(struct inode *inode, struct lustre_md *md) · line 1796
Quoted 6 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -1783,7 +1792,8 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md)/* FID shouldn't be changed! */ if (fid_is_sane (&lli->lli_fid)) { LASSERTF(lu_fid_eq(&lli->lli_fid, &body->mbo_fid1), - "Trying to change FID " DFID " to the " DFID ", inode " DFID "(%p)\n", + "Trying to change FID " DFID " to the " DFID + ", inode " DFID "(%p)\n",Error message should be kept on a single line.
Quoted 11 lines
drivers/staging/lustre/lustre/llite/llite_lib.c +2
-2PFID (&lli->lli_fid),PFID (&body->mbo_fid1), PFID(ll_inode2fid(inode)), inode); }else {@@ -1870,8 +1880,8 @@ void ll_delete_inode(struct inode *inode)truncate_inode_pages_final (&inode->i_data); - LASSERTF(!inode->i_data.nrpages, - "inode=" DFID "(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n", + LASSERTF(!inode->i_data.nrpages, "inode=" DFID + "(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n",...
Quoted 10 lines
PFID(ll_inode2fid(inode)), inode, inode->i_data.nrpages); ll_clear_inode(inode);drivers/staging/lustre/lustre/llite/llite_lib.c +2
-1@@ -2441,7 +2452,8 @@ void ll_dirty_page_discard_warn(struct page *page, int ioret) } CDEBUG(D_WARNING, - "%s: dirty page discard: %s/fid: " DFID "/%s may get corrupted (rc %d)\n", + "%s: dirty page discard: %s/fid: " DFID + "/%s may get corrupted (rc %d)\n",...
Quoted 8 lines
ll_get_fsname(page->mapping->host->i_sb, NULL, 0), s2lsi(page->mapping->host->i_sb)->lsi_lmd->lmd_dev, PFID(&obj->vob_header.coh_lu.loh_fid),drivers/staging/lustre/lustre/llite/namei.c +0
-0drivers/staging/lustre/lustre/llite/namei.c int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, · line 278
Quoted 6 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1@@ -273,7 +274,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,if ((bits &MDS_INODELOCK_UPDATE ) &&S_ISDIR (inode->i_mode)) {struct ll_inode_info *lli =ll_i2info (inode); - CDEBUG(D_INODE, "invalidating inode " DFID " lli = %p, pfid = " DFID "\n", + CDEBUG(D_INODE, "invalidating inode " DFID + " lli = %p, pfid = " DFID "\n",Should be kept on a single line, like:
CDEBUG(D_INODE,
"invalidating inode "DFID" lli = %p, pfid = "DFID"\n",drivers/staging/lustre/lustre/llite/namei.c static int ll_atomic_open(struct inode *dir, struct dentry *dentry, · line 690
Quoted 10 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1PFID (ll_inode2fid (inode)), lli, PFID(&lli->lli_pfid));@@ -683,7 +686,8 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,struct dentry *de;int rc =0 ; - CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir=" DFID "(%p),file %p,open_flags %x,mode %x opened %d\n", + CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir=" DFID + "(%p),file %p,open_flags %x,mode %x opened %d\n",Should be kept on a single line.
drivers/staging/lustre/lustre/llite/namei.c static int ll_atomic_open(struct inode *dir, struct dentry *dentry, · line 744
Quoted 10 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1dentry,PFID (ll_inode2fid (dir)), dir, file, open_flags, mode, *opened);@@ -736,7 +740,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 )) {Align continued line after first '(' on previous line.
drivers/staging/lustre/lustre/llite/namei.c static int ll_rename(struct inode *src, struct dentry *src_dchild, · line 1147
Quoted 10 lines
drivers/staging/lustre/lustre/llite/namei.c +2
-1/* Open dentry. */ if (S_ISFIFO (d_inode (dentry)->i_mode)) {/* We cannot call open here as it might @@ -1136,7 +1143,8 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild,return -EINVAL ; CDEBUG(D_VFSTRACE, - "VFS Op:oldname=%pd, src_dir=" DFID "(%p), newname=%pd, tgt_dir=" DFID "(%p)\n", + "VFS Op:oldname=%pd, src_dir=" DFID + "(%p), newname=%pd, tgt_dir=" DFID "(%p)\n",Should be kept on a single line.
Quoted 8 lines
drivers/staging/lustre/lustre/llite/namei.c +0
-0src_dchild,PFID (ll_inode2fid (src)), src, tgt_dchild, PFID(ll_inode2fid(tgt)), tgt);drivers/staging/lustre/lustre/llite/rw26.c +0
-0drivers/staging/lustre/lustre/llite/rw26.c static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter) · line 331
Quoted 6 lines
drivers/staging/lustre/lustre/llite/rw26.c +2
-1@@ -327,7 +327,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter)if ((file_offset & ~PAGE_MASK ) || (count & ~PAGE_MASK ))return -EINVAL ; - CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID "(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n", + CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID + "(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n",Should be kept on a single line.
Quoted 14 lines
drivers/staging/lustre/lustre/llite/rw26.c +0
-0PFID (ll_inode2fid (inode)), inode, count,MAX_DIO_SIZE , file_offset, file_offset, count >>PAGE_SHIFT , MAX_DIO_SIZE >> PAGE_SHIFT);drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1008,7 +1008,8 @@ static int ll_statahead_thread(void *arg) sai->sai_in_readpage =0 ;if (IS_ERR (page)) { rc =PTR_ERR (page); - CDEBUG(D_READA, "error reading dir " DFID " at %llu/%llu: opendir_pid = %u: rc = %d\n", + CDEBUG(D_READA, "error reading dir " DFID + " at %llu/%llu: opendir_pid = %u: rc = %d\n",...
Quoted 10 lines
PFID(ll_inode2fid(dir)), pos, sai->sai_index, lli->lli_opendir_pid, rc); break;drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1105,7 +1107,8 @@ static int ll_statahead_thread(void *arg)if (sa_low_hit (sai)) { rc = -EFAULT ;atomic_inc (&sbi->ll_sa_wrong); - CDEBUG(D_READA, "Statahead for dir " DFID " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n", + CDEBUG(D_READA, "Statahead for dir " DFID + " hit ratio too low: hit/miss %llu/%llu, sent/replied %llu/%llu, stopping statahead thread: pid %d\n",...
Quoted 10 lines
PFID(&lli->lli_fid), sai->sai_hit, sai->sai_miss, sai->sai_sent, sai->sai_replied, current_pid());drivers/staging/lustre/lustre/llite/statahead.c +2
-1@@ -1274,7 +1277,8 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)struct ll_inode_info *lli =ll_i2info (dir); rc =PTR_ERR (page); - CERROR("%s: error reading dir " DFID " at %llu: opendir_pid = %u : rc = %d\n", + CERROR("%s: error reading dir " DFID + " at %llu: opendir_pid = %u : rc = %d\n",...
drivers/staging/lustre/lustre/llite/statahead.c static int revalidate_statahead_dentry(struct inode *dir, · line 1479
Quoted 12 lines
ll_get_fsname(dir->i_sb, NULL, 0), PFID(ll_inode2fid(dir)), pos, lli->lli_opendir_pid, rc);drivers/staging/lustre/lustre/llite/statahead.c +2
-2@@ -1470,8 +1474,8 @@ static int revalidate_statahead_dentry(struct inode *dir, entry->se_inode =NULL ; }else if ((*dentryp)->d_inode != inode) {/* revalidate, but inode is recreated */ - CDEBUG(D_READA, - "%s: stale dentry %pd inode " DFID ", statahead inode " DFID "\n", + CDEBUG(D_READA, "%s: stale dentry %pd inode " + DFID ", statahead inode " DFID "\n",I think the original was correct.
Quoted 8 lines
drivers/staging/lustre/lustre/llite/statahead.c +0
-0ll_get_fsname ((*dentryp)->d_inode->i_sb, NULL, 0),*dentryp,
drivers/staging/lustre/lustre/llite/super25.c +0
-0drivers/staging/lustre/lustre/llite/super25.c static int __init lustre_init(void) · line 92
Quoted 6 lines
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 );Align after first '(' on previous line.
drivers/staging/lustre/lustre/llite/super25.c static int __init lustre_init(void) · line 95
Quoted 3 lines
drivers/staging/lustre/lustre/llite/super25.c +0
-0/* print an address of _any_ initialized kernel symbol from this * module, to allow debugging with gdb that doesn't support data Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH 10/11 staging: lustre: lllite: fix multi line comments alignment in file
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: Block comments should align the * on each line
--- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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;
Signature · 1 line
2.7.4
PATCH 11/11 staging: lustre: llite: fix multi line comments style
In reply to Aastha GuptaThis patch fixes checkpatch.pl warning:
WARNING: Block comments use a trailing */ on a separate line
--- drivers/staging/lustre/lustre/llite/llite_internal.h | 5 +++-- drivers/staging/lustre/lustre/llite/rw.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/llite/llite_internal.h +3 -2
@@ -394,7 +394,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", \
@@ -1203,7 +1204,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