Whamcloud - gitweb
b=20595
[fs/lustre-release.git] / lustre / llite / llite_capa.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * GPL HEADER START
5  *
6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 only,
10  * as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License version 2 for more details (a copy is included
16  * in the LICENSE file that accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License
19  * version 2 along with this program; If not, see
20  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
21  *
22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23  * CA 95054 USA or visit www.sun.com if you need additional information or
24  * have any questions.
25  *
26  * GPL HEADER END
27  */
28 /*
29  * Copyright  2008 Sun Microsystems, Inc. All rights reserved
30  * Use is subject to license terms.
31  */
32 /*
33  * This file is part of Lustre, http://www.lustre.org/
34  * Lustre is a trademark of Sun Microsystems, Inc.
35  *
36  * lustre/llite/llite_capa.c
37  *
38  * Author: Lai Siyao <lsy@clusterfs.com>
39  */
40
41 #define DEBUG_SUBSYSTEM S_LLITE
42
43 #include <linux/fs.h>
44 #include <linux/version.h>
45 #include <asm/uaccess.h>
46 #include <linux/file.h>
47 #include <linux/kmod.h>
48
49 #include <lustre_lite.h>
50 #include "llite_internal.h"
51
52 /* for obd_capa.c_list, client capa might stay in three places:
53  * 1. ll_capa_list.
54  * 2. ll_idle_capas.
55  * 3. stand alone: just allocated.
56  */
57
58 /* capas for oss writeback and those failed to renew */
59 static LIST_HEAD(ll_idle_capas);
60 static struct ptlrpc_thread ll_capa_thread;
61 static struct list_head *ll_capa_list = &capa_list[CAPA_SITE_CLIENT];
62
63 /* llite capa renewal timer */
64 struct timer_list ll_capa_timer;
65 /* for debug: indicate whether capa on llite is enabled or not */
66 static atomic_t ll_capa_debug = ATOMIC_INIT(0);
67 static unsigned long long ll_capa_renewed = 0;
68 static unsigned long long ll_capa_renewal_noent = 0;
69 static unsigned long long ll_capa_renewal_failed = 0;
70 static unsigned long long ll_capa_renewal_retries = 0;
71
72 static inline void update_capa_timer(struct obd_capa *ocapa, cfs_time_t expiry)
73 {
74         if (time_before(expiry, ll_capa_timer.expires) ||
75             !timer_pending(&ll_capa_timer)) {
76                 mod_timer(&ll_capa_timer, expiry);
77                 DEBUG_CAPA(D_SEC, &ocapa->c_capa,
78                            "ll_capa_timer update: %lu/%lu by", expiry, jiffies);
79         }
80 }
81
82 static inline cfs_time_t capa_renewal_time(struct obd_capa *ocapa)
83 {
84         return cfs_time_sub(ocapa->c_expiry,
85                             cfs_time_seconds(ocapa->c_capa.lc_timeout) / 2);
86 }
87
88 static inline int capa_is_to_expire(struct obd_capa *ocapa)
89 {
90         return cfs_time_beforeq(capa_renewal_time(ocapa), cfs_time_current());
91 }
92
93 static inline int have_expired_capa(void)
94 {
95         struct obd_capa *ocapa = NULL;
96         int expired = 0;
97
98         /* if ll_capa_list has client capa to expire or ll_idle_capas has
99          * expired capa, return 1.
100          */
101         spin_lock(&capa_lock);
102         if (!list_empty(ll_capa_list)) {
103                 ocapa = list_entry(ll_capa_list->next, struct obd_capa, c_list);
104                 expired = capa_is_to_expire(ocapa);
105                 if (!expired)
106                         update_capa_timer(ocapa, capa_renewal_time(ocapa));
107         } else if (!list_empty(&ll_idle_capas)) {
108                 ocapa = list_entry(ll_idle_capas.next, struct obd_capa, c_list);
109                 expired = capa_is_expired(ocapa);
110                 if (!expired)
111                         update_capa_timer(ocapa, ocapa->c_expiry);
112         }
113         spin_unlock(&capa_lock);
114
115         if (expired)
116                 DEBUG_CAPA(D_SEC, &ocapa->c_capa, "expired");
117         return expired;
118 }
119
120 static inline int ll_capa_check_stop(void)
121 {
122         return (ll_capa_thread.t_flags & SVC_STOPPING) ? 1: 0;
123 }
124
125 static void sort_add_capa(struct obd_capa *ocapa, struct list_head *head)
126 {
127         struct obd_capa *tmp;
128         struct list_head *before = NULL;
129
130         /* TODO: client capa is sorted by expiry, this could be optimized */
131         list_for_each_entry_reverse(tmp, head, c_list) {
132                 if (cfs_time_aftereq(ocapa->c_expiry, tmp->c_expiry)) {
133                         before = &tmp->c_list;
134                         break;
135                 }
136         }
137
138         LASSERT(&ocapa->c_list != before);
139         list_add(&ocapa->c_list, before ?: head);
140 }
141
142 static inline int obd_capa_open_count(struct obd_capa *oc)
143 {
144         struct ll_inode_info *lli = ll_i2info(oc->u.cli.inode);
145         return atomic_read(&lli->lli_open_count);
146 }
147
148 static void ll_delete_capa(struct obd_capa *ocapa)
149 {
150         struct ll_inode_info *lli = ll_i2info(ocapa->u.cli.inode);
151
152         if (capa_for_mds(&ocapa->c_capa)) {
153                 LASSERT(lli->lli_mds_capa == ocapa);
154                 lli->lli_mds_capa = NULL;
155         } else if (capa_for_oss(&ocapa->c_capa)) {
156                 list_del_init(&ocapa->u.cli.lli_list);
157         }
158
159         DEBUG_CAPA(D_SEC, &ocapa->c_capa, "free client");
160         list_del_init(&ocapa->c_list);
161         capa_count[CAPA_SITE_CLIENT]--;
162         /* release the ref when alloc */
163         capa_put(ocapa);
164 }
165
166 /* three places where client capa is deleted:
167  * 1. capa_thread_main(), main place to delete expired capa.
168  * 2. ll_clear_inode_capas() in ll_clear_inode().
169  * 3. ll_truncate_free_capa() delete truncate capa explicitly in ll_truncate().
170  */
171 static int capa_thread_main(void *unused)
172 {
173         struct obd_capa *ocapa, *tmp, *next;
174         struct inode *inode = NULL;
175         struct l_wait_info lwi = { 0 };
176         int rc;
177         ENTRY;
178
179         cfs_daemonize("ll_capa");
180
181         ll_capa_thread.t_flags = SVC_RUNNING;
182         wake_up(&ll_capa_thread.t_ctl_waitq);
183
184         while (1) {
185                 l_wait_event(ll_capa_thread.t_ctl_waitq,
186                              (ll_capa_check_stop() || have_expired_capa()),
187                              &lwi);
188
189                 if (ll_capa_check_stop())
190                         break;
191
192                 next = NULL;
193
194                 spin_lock(&capa_lock);
195                 list_for_each_entry_safe(ocapa, tmp, ll_capa_list, c_list) {
196                         LASSERT(ocapa->c_capa.lc_opc != CAPA_OPC_OSS_TRUNC);
197
198                         if (!capa_is_to_expire(ocapa)) {
199                                 next = ocapa;
200                                 break;
201                         }
202
203                         list_del_init(&ocapa->c_list);
204
205                         /* for MDS capability, only renew those which belong to
206                          * dir, or its inode is opened, or client holds LOOKUP
207                          * lock.
208                          */
209                         if (capa_for_mds(&ocapa->c_capa) &&
210                             !S_ISDIR(ocapa->u.cli.inode->i_mode) &&
211                             obd_capa_open_count(ocapa) == 0 &&
212                             !ll_have_md_lock(ocapa->u.cli.inode,
213                                              MDS_INODELOCK_LOOKUP)) {
214                                 DEBUG_CAPA(D_SEC, &ocapa->c_capa,
215                                            "skip renewal for");
216                                 sort_add_capa(ocapa, &ll_idle_capas);
217                                 continue;
218                         }
219
220                         /* for OSS capability, only renew those whose inode is
221                          * opened.
222                          */
223                         if (capa_for_oss(&ocapa->c_capa) &&
224                             obd_capa_open_count(ocapa) == 0) {
225                                 /* oss capa with open count == 0 won't renew,
226                                  * move to idle list */
227                                 sort_add_capa(ocapa, &ll_idle_capas);
228                                 continue;
229                         }
230
231                         /* NB iput() is in ll_update_capa() */
232                         inode = igrab(ocapa->u.cli.inode);
233                         if (inode == NULL) {
234                                 DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
235                                            "igrab failed for");
236                                 continue;
237                         }
238
239                         capa_get(ocapa);
240                         ll_capa_renewed++;
241                         spin_unlock(&capa_lock);
242                         rc = md_renew_capa(ll_i2mdexp(inode), ocapa,
243                                            ll_update_capa);
244                         spin_lock(&capa_lock);
245                         if (rc) {
246                                 DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
247                                            "renew failed: %d", rc);
248                                 ll_capa_renewal_failed++;
249                         }
250                 }
251
252                 if (next)
253                         update_capa_timer(next, capa_renewal_time(next));
254
255                 list_for_each_entry_safe(ocapa, tmp, &ll_idle_capas, c_list) {
256                         if (!capa_is_expired(ocapa)) {
257                                 if (!next)
258                                         update_capa_timer(ocapa, ocapa->c_expiry);
259                                 break;
260                         }
261
262                         if (atomic_read(&ocapa->c_refc) > 1) {
263                                 DEBUG_CAPA(D_SEC, &ocapa->c_capa,
264                                            "expired(c_refc %d), don't release",
265                                            atomic_read(&ocapa->c_refc));
266                                 /* don't try to renew any more */
267                                 list_del_init(&ocapa->c_list);
268                                 continue;
269                         }
270
271                         /* expired capa is released. */
272                         DEBUG_CAPA(D_SEC, &ocapa->c_capa, "release expired");
273                         ll_delete_capa(ocapa);
274                 }
275
276                 spin_unlock(&capa_lock);
277         }
278
279         ll_capa_thread.t_flags = SVC_STOPPED;
280         wake_up(&ll_capa_thread.t_ctl_waitq);
281         RETURN(0);
282 }
283
284 void ll_capa_timer_callback(unsigned long unused)
285 {
286         wake_up(&ll_capa_thread.t_ctl_waitq);
287 }
288
289 int ll_capa_thread_start(void)
290 {
291         int rc;
292         ENTRY;
293
294         init_waitqueue_head(&ll_capa_thread.t_ctl_waitq);
295
296         rc = kernel_thread(capa_thread_main, NULL, 0);
297         if (rc < 0) {
298                 CERROR("cannot start expired capa thread: rc %d\n", rc);
299                 RETURN(rc);
300         }
301         wait_event(ll_capa_thread.t_ctl_waitq,
302                    ll_capa_thread.t_flags & SVC_RUNNING);
303
304         RETURN(0);
305 }
306
307 void ll_capa_thread_stop(void)
308 {
309         ll_capa_thread.t_flags = SVC_STOPPING;
310         wake_up(&ll_capa_thread.t_ctl_waitq);
311         wait_event(ll_capa_thread.t_ctl_waitq,
312                    ll_capa_thread.t_flags & SVC_STOPPED);
313 }
314
315 struct obd_capa *ll_osscapa_get(struct inode *inode, __u64 opc)
316 {
317         struct ll_inode_info *lli = ll_i2info(inode);
318         struct obd_capa *ocapa;
319         int found = 0;
320
321         ENTRY;
322
323         if ((ll_i2sbi(inode)->ll_flags & LL_SBI_OSS_CAPA) == 0)
324                 RETURN(NULL);
325
326         LASSERT(opc == CAPA_OPC_OSS_WRITE || opc == CAPA_OPC_OSS_RW ||
327                 opc == CAPA_OPC_OSS_TRUNC);
328
329         spin_lock(&capa_lock);
330         list_for_each_entry(ocapa, &lli->lli_oss_capas, u.cli.lli_list) {
331                 if (capa_is_expired(ocapa))
332                         continue;
333                 if ((opc & CAPA_OPC_OSS_WRITE) &&
334                     capa_opc_supported(&ocapa->c_capa, CAPA_OPC_OSS_WRITE)) {
335                         found = 1;
336                         break;
337                 } else if ((opc & CAPA_OPC_OSS_READ) &&
338                            capa_opc_supported(&ocapa->c_capa,
339                                               CAPA_OPC_OSS_READ)) {
340                         found = 1;
341                         break;
342                 } else if ((opc & CAPA_OPC_OSS_TRUNC) &&
343                            capa_opc_supported(&ocapa->c_capa, opc)) {
344                         found = 1;
345                         break;
346                 }
347         }
348
349         if (found) {
350                 LASSERT(lu_fid_eq(capa_fid(&ocapa->c_capa),
351                                   ll_inode2fid(inode)));
352                 LASSERT(ocapa->c_site == CAPA_SITE_CLIENT);
353
354                 capa_get(ocapa);
355
356                 DEBUG_CAPA(D_SEC, &ocapa->c_capa, "found client");
357         } else {
358                 ocapa = NULL;
359
360                 if (atomic_read(&ll_capa_debug)) {
361                         CERROR("no capability for "DFID" opc "LPX64"\n",
362                                PFID(&lli->lli_fid), opc);
363                         atomic_set(&ll_capa_debug, 0);
364                 }
365         }
366         spin_unlock(&capa_lock);
367
368         RETURN(ocapa);
369 }
370 EXPORT_SYMBOL(ll_osscapa_get);
371
372 struct obd_capa *ll_mdscapa_get(struct inode *inode)
373 {
374         struct ll_inode_info *lli = ll_i2info(inode);
375         struct obd_capa *ocapa;
376         ENTRY;
377
378         LASSERT(inode != NULL);
379
380         if ((ll_i2sbi(inode)->ll_flags & LL_SBI_MDS_CAPA) == 0)
381                 RETURN(NULL);
382
383         spin_lock(&capa_lock);
384         ocapa = capa_get(lli->lli_mds_capa);
385         spin_unlock(&capa_lock);
386         if (!ocapa && atomic_read(&ll_capa_debug)) {
387                 CERROR("no mds capability for "DFID"\n", PFID(&lli->lli_fid));
388                 atomic_set(&ll_capa_debug, 0);
389         }
390
391         RETURN(ocapa);
392 }
393
394 static struct obd_capa *do_add_mds_capa(struct inode *inode,
395                                         struct obd_capa *ocapa)
396 {
397         struct ll_inode_info *lli = ll_i2info(inode);
398         struct obd_capa *old = lli->lli_mds_capa;
399         struct lustre_capa *capa = &ocapa->c_capa;
400
401         if (!old) {
402                 ocapa->u.cli.inode = inode;
403                 lli->lli_mds_capa = ocapa;
404                 capa_count[CAPA_SITE_CLIENT]++;
405
406                 DEBUG_CAPA(D_SEC, capa, "add MDS");
407         } else {
408                 spin_lock(&old->c_lock);
409                 old->c_capa = *capa;
410                 spin_unlock(&old->c_lock);
411
412                 DEBUG_CAPA(D_SEC, capa, "update MDS");
413
414                 capa_put(ocapa);
415                 ocapa = old;
416         }
417         return ocapa;
418 }
419
420 static struct obd_capa *do_lookup_oss_capa(struct inode *inode, int opc)
421 {
422         struct ll_inode_info *lli = ll_i2info(inode);
423         struct obd_capa *ocapa;
424
425         /* inside capa_lock */
426         list_for_each_entry(ocapa, &lli->lli_oss_capas, u.cli.lli_list) {
427                 if ((capa_opc(&ocapa->c_capa) & opc) != opc)
428                         continue;
429
430                 LASSERT(lu_fid_eq(capa_fid(&ocapa->c_capa),
431                                   ll_inode2fid(inode)));
432                 LASSERT(ocapa->c_site == CAPA_SITE_CLIENT);
433
434                 DEBUG_CAPA(D_SEC, &ocapa->c_capa, "found client");
435                 return ocapa;
436         }
437
438         return NULL;
439 }
440
441 static inline void inode_add_oss_capa(struct inode *inode,
442                                       struct obd_capa *ocapa)
443 {
444         struct ll_inode_info *lli = ll_i2info(inode);
445         struct obd_capa *tmp;
446         struct list_head *next = NULL;
447
448         /* capa is sorted in lli_oss_capas so lookup can always find the
449          * latest one */
450         list_for_each_entry(tmp, &lli->lli_oss_capas, u.cli.lli_list) {
451                 if (cfs_time_after(ocapa->c_expiry, tmp->c_expiry)) {
452                         next = &tmp->u.cli.lli_list;
453                         break;
454                 }
455         }
456         LASSERT(&ocapa->u.cli.lli_list != next);
457         list_move_tail(&ocapa->u.cli.lli_list, next ?: &lli->lli_oss_capas);
458 }
459
460 static struct obd_capa *do_add_oss_capa(struct inode *inode,
461                                         struct obd_capa *ocapa)
462 {
463         struct obd_capa *old;
464         struct lustre_capa *capa = &ocapa->c_capa;
465
466         LASSERTF(S_ISREG(inode->i_mode),
467                  "inode has oss capa, but not regular file, mode: %d\n",
468                  inode->i_mode);
469
470         /* FIXME: can't replace it so easily with fine-grained opc */
471         old = do_lookup_oss_capa(inode, capa_opc(capa) & CAPA_OPC_OSS_ONLY);
472         if (!old) {
473                 ocapa->u.cli.inode = inode;
474                 INIT_LIST_HEAD(&ocapa->u.cli.lli_list);
475                 capa_count[CAPA_SITE_CLIENT]++;
476
477                 DEBUG_CAPA(D_SEC, capa, "add OSS");
478         } else {
479                 spin_lock(&old->c_lock);
480                 old->c_capa = *capa;
481                 spin_unlock(&old->c_lock);
482
483                 DEBUG_CAPA(D_SEC, capa, "update OSS");
484
485                 capa_put(ocapa);
486                 ocapa = old;
487         }
488
489         inode_add_oss_capa(inode, ocapa);
490         return ocapa;
491 }
492
493 struct obd_capa *ll_add_capa(struct inode *inode, struct obd_capa *ocapa)
494 {
495         spin_lock(&capa_lock);
496         ocapa = capa_for_mds(&ocapa->c_capa) ? do_add_mds_capa(inode, ocapa) :
497                                                do_add_oss_capa(inode, ocapa);
498
499         /* truncate capa won't renew */
500         if (ocapa->c_capa.lc_opc != CAPA_OPC_OSS_TRUNC) {
501                 set_capa_expiry(ocapa);
502                 list_del_init(&ocapa->c_list);
503                 sort_add_capa(ocapa, ll_capa_list);
504
505                 update_capa_timer(ocapa, capa_renewal_time(ocapa));
506         }
507
508         spin_unlock(&capa_lock);
509
510         atomic_set(&ll_capa_debug, 1);
511         return ocapa;
512 }
513
514 static inline void delay_capa_renew(struct obd_capa *oc, cfs_time_t delay)
515 {
516         /* NB: set a fake expiry for this capa to prevent it renew too soon */
517         oc->c_expiry = cfs_time_add(oc->c_expiry, cfs_time_seconds(delay));
518 }
519
520 int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa)
521 {
522         struct inode *inode = ocapa->u.cli.inode;
523         int rc = 0;
524         ENTRY;
525
526         LASSERT(ocapa);
527
528         if (IS_ERR(capa)) {
529                 /* set error code */
530                 rc = PTR_ERR(capa);
531                 spin_lock(&capa_lock);
532                 if (rc == -ENOENT) {
533                         DEBUG_CAPA(D_SEC, &ocapa->c_capa,
534                                    "renewal canceled because object removed");
535                         ll_capa_renewal_noent++;
536                 } else {
537                         ll_capa_renewal_failed++;
538
539                         /* failed capa won't be renewed any longer, but if -EIO,
540                          * client might be doing recovery, retry in 2 min. */
541                         if (rc == -EIO && !capa_is_expired(ocapa)) {
542                                 delay_capa_renew(ocapa, 120);
543                                 DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
544                                            "renewal failed: -EIO, retry in 2 mins");
545                                 ll_capa_renewal_retries++;
546                                 GOTO(retry, rc);
547                         } else {
548                                 DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
549                                            "renewal failed(rc: %d) for", rc);
550                         }
551                 }
552
553                 list_del_init(&ocapa->c_list);
554                 sort_add_capa(ocapa, &ll_idle_capas);
555                 spin_unlock(&capa_lock);
556
557                 capa_put(ocapa);
558                 iput(inode);
559                 RETURN(rc);
560         }
561
562         spin_lock(&ocapa->c_lock);
563         LASSERT(!memcmp(&ocapa->c_capa, capa,
564                         offsetof(struct lustre_capa, lc_opc)));
565         ocapa->c_capa = *capa;
566         set_capa_expiry(ocapa);
567         spin_unlock(&ocapa->c_lock);
568
569         spin_lock(&capa_lock);
570         if (capa_for_oss(capa))
571                 inode_add_oss_capa(inode, ocapa);
572         DEBUG_CAPA(D_SEC, capa, "renew");
573         EXIT;
574 retry:
575         list_del_init(&ocapa->c_list);
576         sort_add_capa(ocapa, ll_capa_list);
577         update_capa_timer(ocapa, capa_renewal_time(ocapa));
578         spin_unlock(&capa_lock);
579
580         capa_put(ocapa);
581         iput(inode);
582         return rc;
583 }
584
585 void ll_capa_open(struct inode *inode)
586 {
587         struct ll_inode_info *lli = ll_i2info(inode);
588
589         if ((ll_i2sbi(inode)->ll_flags & (LL_SBI_MDS_CAPA | LL_SBI_OSS_CAPA))
590             == 0)
591                 return;
592
593         if (!S_ISREG(inode->i_mode))
594                 return;
595
596         atomic_inc(&lli->lli_open_count);
597 }
598
599 void ll_capa_close(struct inode *inode)
600 {
601         struct ll_inode_info *lli = ll_i2info(inode);
602
603         if ((ll_i2sbi(inode)->ll_flags & (LL_SBI_MDS_CAPA | LL_SBI_OSS_CAPA))
604             == 0)
605                 return;
606
607         if (!S_ISREG(inode->i_mode))
608                 return;
609
610         atomic_dec(&lli->lli_open_count);
611 }
612
613 /* delete CAPA_OPC_OSS_TRUNC only */
614 void ll_truncate_free_capa(struct obd_capa *ocapa)
615 {
616         if (!ocapa)
617                 return;
618
619         LASSERT(ocapa->c_capa.lc_opc & CAPA_OPC_OSS_TRUNC);
620         DEBUG_CAPA(D_SEC, &ocapa->c_capa, "free truncate");
621
622         /* release ref when find */
623         capa_put(ocapa);
624         if (likely(ocapa->c_capa.lc_opc == CAPA_OPC_OSS_TRUNC)) {
625                 spin_lock(&capa_lock);
626                 ll_delete_capa(ocapa);
627                 spin_unlock(&capa_lock);
628         }
629 }
630
631 void ll_clear_inode_capas(struct inode *inode)
632 {
633         struct ll_inode_info *lli = ll_i2info(inode);
634         struct obd_capa *ocapa, *tmp;
635
636         spin_lock(&capa_lock);
637         ocapa = lli->lli_mds_capa;
638         if (ocapa)
639                 ll_delete_capa(ocapa);
640
641         list_for_each_entry_safe(ocapa, tmp, &lli->lli_oss_capas,
642                                  u.cli.lli_list)
643                 ll_delete_capa(ocapa);
644         spin_unlock(&capa_lock);
645 }
646
647 void ll_print_capa_stat(struct ll_sb_info *sbi)
648 {
649         if (sbi->ll_flags & (LL_SBI_MDS_CAPA | LL_SBI_OSS_CAPA))
650                 LCONSOLE_INFO("Fid capabilities renewed: %llu\n"
651                               "Fid capabilities renewal ENOENT: %llu\n"
652                               "Fid capabilities failed to renew: %llu\n"
653                               "Fid capabilities renewal retries: %llu\n",
654                               ll_capa_renewed, ll_capa_renewal_noent,
655                               ll_capa_renewal_failed, ll_capa_renewal_retries);
656 }