lustre: initialize libcfs_debug_file_path
PATCH 1/1 lustre: initialize libcfs_debug_file_path
This variable is assumed by the code to either
be "NONE" or a file name - it shouldn't be NULL.
So initialise to the compiled default.
---
I'm going though failed tests, looking for things to fix. This fixes 77c.
drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/libcfs/debug.c +1 -1
@@ -224,7 +224,7 @@ char libcfs_debug_file_path_arr[PATH_MAX] = LIBCFS_DEBUG_FILE_PATH_DEFAULT;EXPORT_SYMBOL (libcfs_debug_file_path_arr);/* We need to pass a pointer here, but elsewhere this must be a const */ -static char *libcfs_debug_file_path; +static char *libcfs_debug_file_path =LIBCFS_DEBUG_FILE_PATH_DEFAULT ;module_param (libcfs_debug_file_path, charp,0644 );MODULE_PARM_DESC (libcfs_debug_file_path,"Path for dumping debug logs, set 'NONE' to prevent log dumping" );
Signature · 9 lines
2.14.0.rc0.dirty -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20181026/457e3ef3/attachment.sig>
PATCH 1/1 lustre: accept suffix when parsing max_pages_per_rpc
upstream lustre allows size suffixes (K, M, G, etc) for max_pages_per_rpc. We should too.
---
This fixes test 101g.
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +4 -3
@@ -1868,11 +1868,12 @@ ssize_t max_pages_per_rpc_store(struct kobject *kobj, struct attribute *attr,struct obd_connect_data *ocd;unsigned long long val;int chunk_mask; +char *endp;int rc; - rc =kstrtoull (buffer,10 , &val); -if (rc) -return rc; + val =memparse (buffer, &endp); +if (*endp) +return -EINVAL ;/* if the max_pages is specified in bytes, convert to pages */ if (val >=ONE_MB_BRW_SIZE )
Signature · 9 lines
2.14.0.rc0.dirty -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20181026/9c53a85c/attachment.sig>
PATCH 1/1 lustre: accept suffix when parsing max_pages_per_rpc
Quoted 8 lines
upstream lustre allows size suffixes (K, M, G, etc) for
max_pages_per_rpc. We should too.Signed-off-by NeilBrown <[email protected]>---
This fixes test 101g.
Quoted 27 lines
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +4
-3@@ -1868,11 +1868,12 @@ ssize_t max_pages_per_rpc_store(struct kobject *kobj, struct attribute *attr,struct obd_connect_data *ocd;unsigned long long val;int chunk_mask; +char *endp;int rc; - rc =kstrtoull (buffer,10 , &val); -if (rc) -return rc; + val =memparse (buffer, &endp); +if (*endp) +return -EINVAL ;/* if the max_pages is specified in bytes, convert to pages */ if (val >=ONE_MB_BRW_SIZE )Signature · 1 line
2.14.0.rc0.dirty
PATCH 1/1 lustre: initialize libcfs_debug_file_path
In reply to NeilBrownQuoted 11 lines
This variable is assumed by the code to either
be "NONE" or a file name - it shouldn't be NULL.So initialise to the compiled default.
Signed-off-by NeilBrown <[email protected]>---
I'm going though failed tests, looking for things to fix. This fixes 77c.
Quoted 20 lines
drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lnet/libcfs/debug.c +1
-1@@ -224,7 +224,7 @@ char libcfs_debug_file_path_arr[PATH_MAX] = LIBCFS_DEBUG_FILE_PATH_DEFAULT;EXPORT_SYMBOL (libcfs_debug_file_path_arr);/* We need to pass a pointer here, but elsewhere this must be a const */ -static char *libcfs_debug_file_path; +static char *libcfs_debug_file_path =LIBCFS_DEBUG_FILE_PATH_DEFAULT ;module_param (libcfs_debug_file_path, charp,0644 );MODULE_PARM_DESC (libcfs_debug_file_path,"Path for dumping debug logs, set 'NONE' to prevent log dumping" );Signature · 1 line
2.14.0.rc0.dirty
PATCH 1/1 lustre: initialize libcfs_debug_file_path
Quoted 5 lines · James Simmons
Quoted 5 lines
This variable is assumed by the code to either
be "NONE" or a file name - it shouldn't be NULL.So initialise to the compiled default.
Quoted 7 lines
Quoted 5 lines
Signed-off-by NeilBrown <[email protected]>---
I'm going though failed tests, looking for things to fix. This fixes 77c.
Reviewed-by James Simmons <[email protected]>
Thanks for these two reviews.
NeilBrown
Quoted 11 lines
Quoted 11 lines
drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lnet/libcfs/debug.c +0
-0@@ -224,7 +224,7 @@ char libcfs_debug_file_path_arr[PATH_MAX] = LIBCFS_DEBUG_FILE_PATH_DEFAULT;EXPORT_SYMBOL (libcfs_debug_file_path_arr);
Quoted 10 lines
Quoted 10 lines
drivers/staging/lustre/lnet/libcfs/debug.c +1
-1/* We need to pass a pointer here, but elsewhere this must be a const */ -static char *libcfs_debug_file_path; +static char *libcfs_debug_file_path =LIBCFS_DEBUG_FILE_PATH_DEFAULT ;module_param (libcfs_debug_file_path, charp,0644 );MODULE_PARM_DESC (libcfs_debug_file_path,"Path for dumping debug logs, set 'NONE' to prevent log dumping" );Signature · 1 line
2.14.0.rc0.dirty
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20181029/65b8ff0c/attachment.sig>