cifs: trivial: cleanup fscache cFYI and cERROR messages
Subsystems (2)
PATCH 1/1 cifs: trivial: cleanup fscache cFYI and cERROR messages
... for uniformity and cleaner debug logs.
--- fs/cifs/cache.c | 6 +++--- fs/cifs/fscache.c | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 28 insertions(+), 31 deletions(-)
fs/cifs/cache.c +3 -3
@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,break ;default : -cERROR (1 ,"CIFS: Unknown network family '%d'" , sa->sa_family); +cERROR (1 ,"Unknown network family '%d'" , sa->sa_family); key_len =0 ;break ; }
@@ -152,7 +152,7 @@ static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer, sharename =extract_sharename (tcon->treeName);if (IS_ERR (sharename)) { -cFYI (1 ,"CIFS: couldn't extract sharename\n" ); +cFYI (1 ,"%s: couldn't extract sharename\n" , __func__); sharename =NULL ;return 0 ; }
@@ -302,7 +302,7 @@ static void cifs_fscache_inode_now_uncached(void *cookie_netfs_data)pagevec_init (&pvec,0 ); first =0 ; -cFYI (1 ,"cifs inode 0x%p now uncached" , cifsi); +cFYI (1 ,"%s: cifs inode 0x%p now uncached" , __func__, cifsi);for (;;) { nr_pages = pagevec_lookup(&pvec,
fs/cifs/fscache.c +25 -28
156 lines not on this page · raw message
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines · On Tue, 14 Jun 2011 21:07:47 +0530 Suresh Jayaraman…
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]>--- fs/cifs/cache.c | 6 +++--- fs/cifs/fscache.c | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0
fs/cifs/cache.c static uint16_t cifs_server_get_key(const void *cookie_netfs_data, · line 95
Quoted 5 lines
fs/cifs/cache.c +1
-1@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,break ;default : -cERROR (1 ,"CIFS: Unknown network family '%d'" , sa->sa_family); +cERROR (1 ,"Unknown network family '%d'" , sa->sa_family);
^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?
Quoted 199 lines
fs/cifs/cache.c +2
-2key_len =0 ;break ; }@@ -152,7 +152,7 @@ static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer, sharename =extract_sharename (tcon->treeName);if (IS_ERR (sharename)) { -cFYI (1 ,"CIFS: couldn't extract sharename\n" ); +cFYI (1 ,"%s: couldn't extract sharename\n" , __func__); sharename =NULL ;return 0 ; }@@ -302,7 +302,7 @@ static void cifs_fscache_inode_now_uncached(void *cookie_netfs_data)pagevec_init (&pvec,0 ); first =0 ; -cFYI (1 ,"cifs inode 0x%p now uncached" , cifsi); +cFYI (1 ,"%s: cifs inode 0x%p now uncached" , __func__, cifsi);for (;;) { nr_pages = pagevec_lookup(&pvec,fs/cifs/fscache.c +25
-29@@ -28,14 +28,14 @@ void cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) server->fscache =fscache_acquire_cookie (cifs_fscache_netfs.primary_index, &cifs_fscache_server_index_def, server); -cFYI (1 ,"CIFS: get client cookie (0x%p/0x%p)" , server, - server->fscache); +cFYI (1 ,"%s: (0x%p/0x%p)" , __func__, server, + server->fscache); }void cifs_fscache_release_client_cookie (struct TCP_Server_Info *server) { -cFYI (1 ,"CIFS: release client cookie (0x%p/0x%p)" , server, - server->fscache); +cFYI (1 ,"%s: (0x%p/0x%p)" , __func__, server, + server->fscache);fscache_relinquish_cookie (server->fscache,0 ); server->fscache =NULL ; }@@ -47,13 +47,13 @@ void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) tcon->fscache =fscache_acquire_cookie (server->fscache, &cifs_fscache_super_index_def, tcon); -cFYI (1 ,"CIFS: get superblock cookie (0x%p/0x%p)" , - server->fscache, tcon->fscache); +cFYI (1 ,"%s: (0x%p/0x%p)" , __func__, server->fscache, + tcon->fscache); }void cifs_fscache_release_super_cookie (struct cifs_tcon *tcon) { -cFYI (1 ,"CIFS: releasing superblock cookie (0x%p)" , tcon->fscache); +cFYI (1 ,"%s: (0x%p)" , __func__, tcon->fscache);fscache_relinquish_cookie (tcon->fscache,0 ); tcon->fscache =NULL ; }@@ -70,8 +70,8 @@ static void cifs_fscache_enable_inode_cookie(struct inode *inode)if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_FSCACHE ) { cifsi->fscache =fscache_acquire_cookie (tcon->fscache, &cifs_fscache_inode_object_def, cifsi); -cFYI (1 ,"CIFS: got FH cookie (0x%p/0x%p)" , tcon->fscache, - cifsi->fscache); +cFYI (1 ,"%s: got FH cookie (0x%p/0x%p)" , __func__, + tcon->fscache, cifsi->fscache); } }@@ -80,8 +80,7 @@ void cifs_fscache_release_inode_cookie(struct inode *inode)struct cifsInodeInfo *cifsi =CIFS_I (inode);if (cifsi->fscache) { -cFYI (1 ,"CIFS releasing inode cookie (0x%p)" , - cifsi->fscache); +cFYI (1 ,"%s: (0x%p)" , __func__, cifsi->fscache);fscache_relinquish_cookie (cifsi->fscache,0 ); cifsi->fscache =NULL ; }@@ -93,13 +92,12 @@ static int cifs_fscache_disable_inode_cookie(struct inode *inode)int ret =0 ;if (cifsi->fscache) { -cFYI (1 ,"CIFS disabling inode cookie (0x%p)" , - cifsi->fscache); +cFYI (1 ,"%s: (0x%p)" , __func__, cifsi->fscache);/* invalidate any mapped pages that were read in before */ if (inode->i_mapping && inode->i_mapping->nrpages) { ret =invalidate_inode_pages2 (inode->i_mapping);if (ret) { -cERROR (1 ,"CIFS couldn't invalidate inode %p" , +cERROR (1 ,"couldn't invalidate inode %p" , inode);return ret; }@@ -136,8 +134,8 @@ void cifs_fscache_reset_inode_cookie(struct inode *inode)cifs_sb_master_tcon (cifs_sb)->fscache, &cifs_fscache_inode_object_def, cifsi); -cFYI (1 ,"CIFS: new cookie 0x%p oldcookie 0x%p" , - cifsi->fscache, old); +cFYI (1 ,"%s: new cookie 0x%p oldcookie 0x%p" , + __func__, cifsi->fscache, old); } }@@ -147,8 +145,8 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp)struct inode *inode = page->mapping->host;struct cifsInodeInfo *cifsi =CIFS_I (inode); -cFYI (1 ,"CIFS: fscache release page (0x%p/0x%p)" , - page, cifsi->fscache); +cFYI (1 ,"%s: (0x%p/0x%p)" , __func__, page, + cifsi->fscache);if (!fscache_maybe_release_page (cifsi->fscache, page, gfp))return 0 ; }@@ -159,8 +157,7 @@ int cifs_fscache_release_page(struct page *page, gfp_t gfp)static void cifs_readpage_from_fscache_complete (struct page *page,void *ctx,int error) { -cFYI (1 ,"CFS: readpage_from_fscache_complete (0x%p/%d)" , - page, error); +cFYI (1 ,"%s: (0x%p/%d)" , __func__, page, error);if (!error)SetPageUptodate (page);unlock_page (page);@@ -173,7 +170,7 @@ int __cifs_readpage_from_fscache(struct inode *inode, struct page *page) {int ret; -cFYI (1 ,"CIFS: readpage_from_fscache(fsc:%p, p:%p, i:0x%p" , +cFYI (1 ,"%s: (fsc:%p, p:%p, i:0x%p" , __func__,CIFS_I (inode)->fscache, page, inode); ret = fscache_read_or_alloc_page(CIFS_I(inode)->fscache, page, cifs_readpage_from_fscache_complete,@@ -182,11 +179,11 @@ int __cifs_readpage_from_fscache(struct inode *inode, struct page *page)switch (ret) {case 0 :/* page found in fscache, read submitted */ -cFYI (1 ,"CIFS: readpage_from_fscache: submitted" ); +cFYI (1 ,"%s: submitted" , __func__);return ret;case -ENOBUFS :/* page won't be cached */ case -ENODATA :/* page not in cache */ -cFYI (1 ,"CIFS: readpage_from_fscache %d" , ret); +cFYI (1 ,"%s: %d" , __func__, ret);return 1 ;default :@@ -205,7 +202,7 @@ int __cifs_readpages_from_fscache(struct inode *inode, {int ret; -cFYI (1 ,"CIFS: __cifs_readpages_from_fscache (0x%p/%u/0x%p)" , +cFYI (1 ,"%s: (0x%p/%u/0x%p)" , __func__,CIFS_I (inode)->fscache, *nr_pages, inode); ret = fscache_read_or_alloc_pages(CIFS_I(inode)->fscache, mapping, pages, nr_pages,@@ -214,12 +211,12 @@ int __cifs_readpages_from_fscache(struct inode *inode, mapping_gfp_mask(mapping));switch (ret) {case 0 :/* read submitted to the cache for all pages */ -cFYI (1 ,"CIFS: readpages_from_fscache: submitted" ); +cFYI (1 ,"%s: submitted" , __func__);return ret;case -ENOBUFS :/* some pages are not cached and can't be */ case -ENODATA :/* some pages are not cached */ -cFYI (1 ,"CIFS: readpages_from_fscache: no page" ); +cFYI (1 ,"%s: no page" , __func__);return 1 ;default :@@ -233,7 +230,7 @@ void __cifs_readpage_to_fscache(struct inode *inode, struct page *page) {int ret; -cFYI (1 ,"CIFS: readpage_to_fscache(fsc: %p, p: %p, i: %p" , +cFYI (1 ,"%s: (fsc: %p, p: %p, i: %p)" , __func__,CIFS_I (inode)->fscache, page, inode); ret =fscache_write_page (CIFS_I (inode)->fscache, page,GFP_KERNEL );if (ret !=0 )@@ -245,7 +242,7 @@ void __cifs_fscache_invalidate_page(struct page *page, struct inode *inode)struct cifsInodeInfo *cifsi =CIFS_I (inode);struct fscache_cookie *cookie = cifsi->fscache; -cFYI (1 ,"CIFS: fscache invalidatepage (0x%p/0x%p)" , page, cookie); +cFYI (1 ,"%s: (0x%p/0x%p)" , __func__, page, cookie);fscache_wait_on_page_write (cookie, page);fscache_uncache_page (cookie, page); } --To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20110614120048.7c04567d-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org
Quoted 18 lines · Jeff Layton
Quoted 15 lines · On Tue, 14 Jun 2011 21:07:47 +0530 Suresh Jayaraman…
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]>--- fs/cifs/cache.c | 6 +++--- fs/cifs/fscache.c | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,break ;
Quoted 7 lines
fs/cifs/cache.c static uint16_t cifs_server_get_key(const void *cookie_netfs_data, · line 95
Quoted 3 lines
fs/cifs/cache.c +1
-1default : -cERROR (1 ,"CIFS: Unknown network family '%d'" , sa->sa_family); +cERROR (1 ,"Unknown network family '%d'" , sa->sa_family);^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?
Sounds like a good idea to flag fsc debug messages separately but flagging errors separately would be useful?
Also, I don't understand the idea behing the "set" currently.
we have
#define cFYI(set, fmt, arg...) \
do { \
if (set) \
cifsfyi(fmt, ##arg); \} while (0)
and we call cFYI with always pass like this:
cFYI(1, "..");
Signature · 1 line
Suresh Jayaraman
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 27 lines · On Wed, 15 Jun 2011 15:10:45 +0530 Suresh Jayaraman…
Quoted 18 lines · Jeff Layton
Quoted 15 lines · On Tue, 14 Jun 2011 21:07:47 +0530 Suresh Jayaraman…
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]>--- fs/cifs/cache.c | 6 +++--- fs/cifs/fscache.c | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,break ;Quoted 7 lines
fs/cifs/cache.c static uint16_t cifs_server_get_key(const void *cookie_netfs_data, · line 95
Quoted 3 lines
fs/cifs/cache.c +1
-1default : -cERROR (1 ,"CIFS: Unknown network family '%d'" , sa->sa_family); +cERROR (1 ,"Unknown network family '%d'" , sa->sa_family);^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?
Quoted 3 lines
Sounds like a good idea to flag fsc debug messages separately but flagging errors separately would be useful?
Good point. Now that you mention it, I'm not sure what purpose the first argument to cERROR serves. Might be a good thing to do a global search and replace -- "s/cERROR(1, /cERROR(/" and fix up the macro.
Quoted 4 lines
Also, I don't understand the idea behing the "set" currently.
we have
Quoted 10 lines
#define cFYI(set, fmt, arg...) \ do { \ if (set) \ cifsfyi(fmt, ##arg); \} while (0)
and we call cFYI with always pass like this:
cFYI(1, "..");
I think for cFYI, the idea was to have a bitmask that would allow you to selectively turn on certain classes of debug messages (similar to how NFS' dfprintk macro works). In practice though, it's rarely set to anything but "1". Maybe we should consider eliminating that argument as well?
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20110615085841.633bb3c3-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org
Quoted 30 lines · Jeff Layton
Quoted 27 lines · On Wed, 15 Jun 2011 15:10:45 +0530 Suresh Jayaraman…
Quoted 25 lines · Jeff Layton
Quoted 13 lines · On Tue, 14 Jun 2011 21:07:47 +0530 Suresh Jayaraman…
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]>--- fs/cifs/cache.c | 6 +++--- fs/cifs/fscache.c | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0fs/cifs/cache.c static uint16_t cifs_server_get_key(const void *cookie_netfs_data, · line 95
Quoted 5 lines
fs/cifs/cache.c +1
-1@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,break ;default : -cERROR (1 ,"CIFS: Unknown network family '%d'" , sa->sa_family); +cERROR (1 ,"Unknown network family '%d'" , sa->sa_family);^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?
Quoted 7 lines
Quoted 3 lines
Sounds like a good idea to flag fsc debug messages separately but flagging errors separately would be useful?
Good point. Now that you mention it, I'm not sure what purpose the first argument to cERROR serves. Might be a good thing to do a global search and replace -- "s/cERROR(1, /cERROR(/" and fix up the macro.
Yes, we need to always print errors. I'll fix it up.
Quoted 10 lines
Quoted 10 lines
Also, I don't understand the idea behing the "set" currently.
we have
#define cFYI(set, fmt, arg...) \ do { \ if (set) \ cifsfyi(fmt, ##arg); \} while (0)
Quoted 7 lines
Quoted 4 lines
and we call cFYI with always pass like this:
cFYI(1, "..");I think for cFYI, the idea was to have a bitmask that would allow you to selectively turn on certain classes of debug messages (similar to
I thought so but the usage confused me.
Quoted 3 lines
how NFS' dfprintk macro works). In practice though, it's rarely set to anything but "1". Maybe we should consider eliminating that argument as well?
I'll see what it takes to fix it up to use bitmask and perhaps add a bitmask for fsc. But, I might be a little slow on this one.
Thanks,
Signature · 1 line
Suresh Jayaraman
A message that is not in the archive (sent off-list or not yet received): [email protected]
The idea of the 1st parameter to cerror was to allow turning off log spam more easily if error turned out to be expected. Gave some flexibility debugging too.
Quoted 74 lines · Suresh Jayaraman
Quoted 30 lines · Jeff Layton
Quoted 27 lines · On Wed, 15 Jun 2011 15:10:45 +0530 Suresh Jayaraman…
Quoted 25 lines · Jeff Layton
Quoted 15 lines · On Tue, 14 Jun 2011 21:07:47 +0530 Suresh Jayaraman…
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]>---
fs/cifs/cache.c | 6 +++---
fs/cifs/fscache.c | 53 +++++++++++++++++++++++++----------------------------2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data, break;Quoted 3 lines
default:
- cERROR(1, "CIFS: Unknown network family '%d'",sa->sa_family);
+ cERROR(1, "Unknown network family '%d'",sa->sa_family);^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?Quoted 7 lines
Quoted 3 lines
Sounds like a good idea to flag fsc debug messages separately but flagging errors separately would be useful?
Good point. Now that you mention it, I'm not sure what purpose the first argument to cERROR serves. Might be a good thing to do a global search and replace -- "s/cERROR(1, /cERROR(/" and fix up the macro.
Yes, we need to always print errors. I'll fix it up.
Quoted 10 lines
Quoted 10 lines
Also, I don't understand the idea behing the "set" currently.
we have
#define
cFYI(set, fmt, arg...)\
do { \
if (set) \
cifsfyi(fmt, ##arg); \
} while (0)Quoted 7 lines
Quoted 4 lines
and we call cFYI with always pass like this:
cFYI(1, "..");I think for cFYI, the idea was to have a bitmask that would allow you to selectively turn on certain classes of debug messages (similar to
I thought so but the usage confused me.
Quoted 3 lines
how NFS' dfprintk macro works). In practice though, it's rarely set to anything but "1". Maybe we should consider eliminating that argument as well?
I'll see what it takes to fix it up to use bitmask and perhaps add a bitmask for fsc. But, I might be a little slow on this one.
Thanks,
--
Suresh Jayaraman
Signature · 3 lines
Thanks, Steve
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): BANLkTim-T4PKGfsX-XQT5mP1EwLLkDMDwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 4 lines · Steve French
The idea of the 1st parameter to cerror was to allow turning off log spam more easily if error turned out to be expected. Gave some flexibility debugging too.
Ok, but still it doesn't allow us to turn off logs in the runtime (have to be recompiled, right?). OTOH, wouldn't be easier to convert a cERROR to cFYI in case if we found if the error is expected or use cifswarn() instead?
Quoted 41 lines
Quoted 7 lines · On Jun 15, 2011 8:08 AM, "Suresh Jayaraman"…
Quoted 6 lines · Jeff Layton
Quoted 3 lines · On Wed, 15 Jun 2011 15:10:45 +0530 Suresh Jayaraman…
Quoted 2 lines · Jeff Layton
On Tue, 14 Jun 2011 21:07:47 +0530
Suresh Jayaraman <[email protected] <mailto:[email protected]>>Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]<mailto:[email protected]>>
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
---
fs/cifs/cache.c| 6 +++---fs/cifs/fscache.c| 53+++++++++++++++++++++++++----------------------------
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
fs/cifs/cache.c static uint16_t cifs_server_get_key(const void
Quoted 7 lines
2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void
*cookie_netfs_data,Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Quoted 9 lines
Quoted 5 lines
fs/cifs/cache.c +0
-0break ;default:
-cERROR(1, "CIFS: Unknown network family '%d'", sa->sa_family);
+cERROR(1, "Unknown network family '%d'", sa->sa_family);^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?Sounds like a good idea to flag fsc debug messages separately but flagging errors separately would be useful?
Signature · 1 line
Suresh Jayaraman
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Suresh Jayaraman
Quoted 4 lines · Steve French
The idea of the 1st parameter to cerror was to allow turning off log spam more easily if error turned out to be expected. Gave some flexibility debugging too.
Ok, but still it doesn't allow us to turn off logs in the runtime (have to be recompiled, right?). OTOH, wouldn't be easier to convert a cERROR to cFYI in case if we found if the error is expected or use
cifswarn()instead?
Presumably could be turned off in a debugger as well.
Originally the idea was that there would be a way to turn off cERROR (as we do with cFYI) at runtime too - not something that we would need unless we found log spamming annoying for errors running cifs mount to a particular buggy server (e.g.) for which we had not created a workaround yet.
Signature · 3 lines
Thanks, Steve
Quoted 53 lines · Jeff Layton
Quoted 27 lines · On Wed, 15 Jun 2011 15:10:45 +0530 Suresh Jayaraman…
Quoted 18 lines · Jeff Layton
Quoted 15 lines · On Tue, 14 Jun 2011 21:07:47 +0530 Suresh Jayaraman…
... for uniformity and cleaner debug logs.
Signed-off-by Suresh Jayaraman <[email protected]>--- fs/cifs/cache.c | 6 +++--- fs/cifs/fscache.c | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 28 insertions(+), 31 deletions(-)fs/cifs/cache.c +0
-0@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,break ;Quoted 7 lines
fs/cifs/cache.c static uint16_t cifs_server_get_key(const void *cookie_netfs_data, · line 95
Quoted 3 lines
fs/cifs/cache.c +1
-1default : -cERROR (1 ,"CIFS: Unknown network family '%d'" , sa->sa_family); +cERROR (1 ,"Unknown network family '%d'" , sa->sa_family);^^^^^^^^^
Maybe this would be a good time to add in a new cFYI/cERROR "flag" for fscache and convert all of these to use it?Quoted 3 lines
Sounds like a good idea to flag fsc debug messages separately but flagging errors separately would be useful?
Good point. Now that you mention it, I'm not sure what purpose the first argument to cERROR serves. Might be a good thing to do a global search and replace -- "s/cERROR(1, /cERROR(/" and fix up the macro.
Quoted 4 lines
Also, I don't understand the idea behing the "set" currently.
we have
Quoted 10 lines
#define cFYI(set, fmt, arg...) \ do { \ if (set) \ cifsfyi(fmt, ##arg); \} while (0)
and we call cFYI with always pass like this:
cFYI(1, "..");
Quoted 6 lines
I think for cFYI, the idea was to have a bitmask that would allow you to selectively turn on certain classes of debug messages (similar to how NFS' dfprintk macro works). In practice though, it's rarely set to anything but "1". Maybe we should consider eliminating that argument as well?
Currently the separate debug flags CIFS_RC and CIFS_TIMER doesn't look justified. It would be a good idea to have different classes of debug messages based on the functionality. The ones that comes to my mind are DFS, Kerberos/Spnego, FS-Cache and Xattr/ACL etc. Of course we need to see how GetXid()/FreeXid() that spans across can be handled. Would it be worth the exercise or we would be better of with a single debug flag that is used always?
Ideas/Thoughts/Comments?
Signature · 1 line
Suresh Jayaraman