Commit 040d15c86747cf44fcf6b8ee19d805d4ef20caf3
1 parent
8d1bca328b
Exists in
master
and in
4 other branches
[CIFS] trivial cleanup fscache cFYI and cERROR messages
... for uniformity and cleaner debug logs. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Showing 2 changed files with 27 additions and 30 deletions Side-by-side Diff
fs/cifs/cache.c
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 | break; |
93 | 93 | |
94 | 94 | default: |
95 | - cERROR(1, "CIFS: Unknown network family '%d'", sa->sa_family); | |
95 | + cERROR(1, "Unknown network family '%d'", sa->sa_family); | |
96 | 96 | key_len = 0; |
97 | 97 | break; |
98 | 98 | } |
... | ... | @@ -152,7 +152,7 @@ |
152 | 152 | |
153 | 153 | sharename = extract_sharename(tcon->treeName); |
154 | 154 | if (IS_ERR(sharename)) { |
155 | - cFYI(1, "CIFS: couldn't extract sharename\n"); | |
155 | + cFYI(1, "%s: couldn't extract sharename\n", __func__); | |
156 | 156 | sharename = NULL; |
157 | 157 | return 0; |
158 | 158 | } |
... | ... | @@ -302,7 +302,7 @@ |
302 | 302 | pagevec_init(&pvec, 0); |
303 | 303 | first = 0; |
304 | 304 | |
305 | - cFYI(1, "cifs inode 0x%p now uncached", cifsi); | |
305 | + cFYI(1, "%s: cifs inode 0x%p now uncached", __func__, cifsi); | |
306 | 306 | |
307 | 307 | for (;;) { |
308 | 308 | nr_pages = pagevec_lookup(&pvec, |
fs/cifs/fscache.c
... | ... | @@ -28,14 +28,14 @@ |
28 | 28 | server->fscache = |
29 | 29 | fscache_acquire_cookie(cifs_fscache_netfs.primary_index, |
30 | 30 | &cifs_fscache_server_index_def, server); |
31 | - cFYI(1, "CIFS: get client cookie (0x%p/0x%p)", server, | |
32 | - server->fscache); | |
31 | + cFYI(1, "%s: (0x%p/0x%p)", __func__, server, | |
32 | + server->fscache); | |
33 | 33 | } |
34 | 34 | |
35 | 35 | void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server) |
36 | 36 | { |
37 | - cFYI(1, "CIFS: release client cookie (0x%p/0x%p)", server, | |
38 | - server->fscache); | |
37 | + cFYI(1, "%s: (0x%p/0x%p)", __func__, server, | |
38 | + server->fscache); | |
39 | 39 | fscache_relinquish_cookie(server->fscache, 0); |
40 | 40 | server->fscache = NULL; |
41 | 41 | } |
42 | 42 | |
... | ... | @@ -47,13 +47,13 @@ |
47 | 47 | tcon->fscache = |
48 | 48 | fscache_acquire_cookie(server->fscache, |
49 | 49 | &cifs_fscache_super_index_def, tcon); |
50 | - cFYI(1, "CIFS: get superblock cookie (0x%p/0x%p)", | |
51 | - server->fscache, tcon->fscache); | |
50 | + cFYI(1, "%s: (0x%p/0x%p)", __func__, server->fscache, | |
51 | + tcon->fscache); | |
52 | 52 | } |
53 | 53 | |
54 | 54 | void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) |
55 | 55 | { |
56 | - cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache); | |
56 | + cFYI(1, "%s: (0x%p)", __func__, tcon->fscache); | |
57 | 57 | fscache_relinquish_cookie(tcon->fscache, 0); |
58 | 58 | tcon->fscache = NULL; |
59 | 59 | } |
... | ... | @@ -70,8 +70,8 @@ |
70 | 70 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE) { |
71 | 71 | cifsi->fscache = fscache_acquire_cookie(tcon->fscache, |
72 | 72 | &cifs_fscache_inode_object_def, cifsi); |
73 | - cFYI(1, "CIFS: got FH cookie (0x%p/0x%p)", tcon->fscache, | |
74 | - cifsi->fscache); | |
73 | + cFYI(1, "%s: got FH cookie (0x%p/0x%p)", __func__, | |
74 | + tcon->fscache, cifsi->fscache); | |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
... | ... | @@ -80,8 +80,7 @@ |
80 | 80 | struct cifsInodeInfo *cifsi = CIFS_I(inode); |
81 | 81 | |
82 | 82 | if (cifsi->fscache) { |
83 | - cFYI(1, "CIFS releasing inode cookie (0x%p)", | |
84 | - cifsi->fscache); | |
83 | + cFYI(1, "%s: (0x%p)", __func__, cifsi->fscache); | |
85 | 84 | fscache_relinquish_cookie(cifsi->fscache, 0); |
86 | 85 | cifsi->fscache = NULL; |
87 | 86 | } |
... | ... | @@ -92,8 +91,7 @@ |
92 | 91 | struct cifsInodeInfo *cifsi = CIFS_I(inode); |
93 | 92 | |
94 | 93 | if (cifsi->fscache) { |
95 | - cFYI(1, "CIFS disabling inode cookie (0x%p)", | |
96 | - cifsi->fscache); | |
94 | + cFYI(1, "%s: (0x%p)", __func__, cifsi->fscache); | |
97 | 95 | fscache_relinquish_cookie(cifsi->fscache, 1); |
98 | 96 | cifsi->fscache = NULL; |
99 | 97 | } |
... | ... | @@ -121,8 +119,8 @@ |
121 | 119 | cifs_sb_master_tcon(cifs_sb)->fscache, |
122 | 120 | &cifs_fscache_inode_object_def, |
123 | 121 | cifsi); |
124 | - cFYI(1, "CIFS: new cookie 0x%p oldcookie 0x%p", | |
125 | - cifsi->fscache, old); | |
122 | + cFYI(1, "%s: new cookie 0x%p oldcookie 0x%p", | |
123 | + __func__, cifsi->fscache, old); | |
126 | 124 | } |
127 | 125 | } |
128 | 126 | |
... | ... | @@ -132,8 +130,8 @@ |
132 | 130 | struct inode *inode = page->mapping->host; |
133 | 131 | struct cifsInodeInfo *cifsi = CIFS_I(inode); |
134 | 132 | |
135 | - cFYI(1, "CIFS: fscache release page (0x%p/0x%p)", | |
136 | - page, cifsi->fscache); | |
133 | + cFYI(1, "%s: (0x%p/0x%p)", __func__, page, | |
134 | + cifsi->fscache); | |
137 | 135 | if (!fscache_maybe_release_page(cifsi->fscache, page, gfp)) |
138 | 136 | return 0; |
139 | 137 | } |
... | ... | @@ -144,8 +142,7 @@ |
144 | 142 | static void cifs_readpage_from_fscache_complete(struct page *page, void *ctx, |
145 | 143 | int error) |
146 | 144 | { |
147 | - cFYI(1, "CFS: readpage_from_fscache_complete (0x%p/%d)", | |
148 | - page, error); | |
145 | + cFYI(1, "%s: (0x%p/%d)", __func__, page, error); | |
149 | 146 | if (!error) |
150 | 147 | SetPageUptodate(page); |
151 | 148 | unlock_page(page); |
... | ... | @@ -158,7 +155,7 @@ |
158 | 155 | { |
159 | 156 | int ret; |
160 | 157 | |
161 | - cFYI(1, "CIFS: readpage_from_fscache(fsc:%p, p:%p, i:0x%p", | |
158 | + cFYI(1, "%s: (fsc:%p, p:%p, i:0x%p", __func__, | |
162 | 159 | CIFS_I(inode)->fscache, page, inode); |
163 | 160 | ret = fscache_read_or_alloc_page(CIFS_I(inode)->fscache, page, |
164 | 161 | cifs_readpage_from_fscache_complete, |
165 | 162 | |
... | ... | @@ -167,11 +164,11 @@ |
167 | 164 | switch (ret) { |
168 | 165 | |
169 | 166 | case 0: /* page found in fscache, read submitted */ |
170 | - cFYI(1, "CIFS: readpage_from_fscache: submitted"); | |
167 | + cFYI(1, "%s: submitted", __func__); | |
171 | 168 | return ret; |
172 | 169 | case -ENOBUFS: /* page won't be cached */ |
173 | 170 | case -ENODATA: /* page not in cache */ |
174 | - cFYI(1, "CIFS: readpage_from_fscache %d", ret); | |
171 | + cFYI(1, "%s: %d", __func__, ret); | |
175 | 172 | return 1; |
176 | 173 | |
177 | 174 | default: |
... | ... | @@ -190,7 +187,7 @@ |
190 | 187 | { |
191 | 188 | int ret; |
192 | 189 | |
193 | - cFYI(1, "CIFS: __cifs_readpages_from_fscache (0x%p/%u/0x%p)", | |
190 | + cFYI(1, "%s: (0x%p/%u/0x%p)", __func__, | |
194 | 191 | CIFS_I(inode)->fscache, *nr_pages, inode); |
195 | 192 | ret = fscache_read_or_alloc_pages(CIFS_I(inode)->fscache, mapping, |
196 | 193 | pages, nr_pages, |
197 | 194 | |
... | ... | @@ -199,12 +196,12 @@ |
199 | 196 | mapping_gfp_mask(mapping)); |
200 | 197 | switch (ret) { |
201 | 198 | case 0: /* read submitted to the cache for all pages */ |
202 | - cFYI(1, "CIFS: readpages_from_fscache: submitted"); | |
199 | + cFYI(1, "%s: submitted", __func__); | |
203 | 200 | return ret; |
204 | 201 | |
205 | 202 | case -ENOBUFS: /* some pages are not cached and can't be */ |
206 | 203 | case -ENODATA: /* some pages are not cached */ |
207 | - cFYI(1, "CIFS: readpages_from_fscache: no page"); | |
204 | + cFYI(1, "%s: no page", __func__); | |
208 | 205 | return 1; |
209 | 206 | |
210 | 207 | default: |
... | ... | @@ -218,7 +215,7 @@ |
218 | 215 | { |
219 | 216 | int ret; |
220 | 217 | |
221 | - cFYI(1, "CIFS: readpage_to_fscache(fsc: %p, p: %p, i: %p", | |
218 | + cFYI(1, "%s: (fsc: %p, p: %p, i: %p)", __func__, | |
222 | 219 | CIFS_I(inode)->fscache, page, inode); |
223 | 220 | ret = fscache_write_page(CIFS_I(inode)->fscache, page, GFP_KERNEL); |
224 | 221 | if (ret != 0) |
... | ... | @@ -230,7 +227,7 @@ |
230 | 227 | struct cifsInodeInfo *cifsi = CIFS_I(inode); |
231 | 228 | struct fscache_cookie *cookie = cifsi->fscache; |
232 | 229 | |
233 | - cFYI(1, "CIFS: fscache invalidatepage (0x%p/0x%p)", page, cookie); | |
230 | + cFYI(1, "%s: (0x%p/0x%p)", __func__, page, cookie); | |
234 | 231 | fscache_wait_on_page_write(cookie, page); |
235 | 232 | fscache_uncache_page(cookie, page); |
236 | 233 | } |