Thomas Gleixner | 2522fe4 | 2019-05-28 09:57:20 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 2 | /****************************************************************************** |
| 3 | ******************************************************************************* |
| 4 | ** |
| 5 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
David Teigland | 7fe2b31 | 2010-02-24 11:08:18 -0600 | [diff] [blame] | 6 | ** Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 7 | ** |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 8 | ** |
| 9 | ******************************************************************************* |
| 10 | ******************************************************************************/ |
| 11 | |
Alexander Aring | f1d3b8f | 2021-11-02 15:17:15 -0400 | [diff] [blame] | 12 | #include <trace/events/dlm.h> |
| 13 | |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 14 | #include "dlm_internal.h" |
| 15 | #include "lock.h" |
David Teigland | 597d0ca | 2006-07-12 16:44:04 -0500 | [diff] [blame] | 16 | #include "user.h" |
Rashika Kheria | 9505857 | 2014-02-09 18:19:17 +0530 | [diff] [blame] | 17 | #include "ast.h" |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 18 | |
David Teigland | 6ad2291 | 2012-08-02 11:00:05 -0500 | [diff] [blame] | 19 | static uint64_t dlm_cb_seq; |
| 20 | static DEFINE_SPINLOCK(dlm_cb_seq_spin); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 21 | |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 22 | static void dlm_dump_lkb_callbacks(struct dlm_lkb *lkb) |
| 23 | { |
| 24 | int i; |
| 25 | |
| 26 | log_print("last_bast %x %llu flags %x mode %d sb %d %x", |
| 27 | lkb->lkb_id, |
| 28 | (unsigned long long)lkb->lkb_last_bast.seq, |
| 29 | lkb->lkb_last_bast.flags, |
| 30 | lkb->lkb_last_bast.mode, |
| 31 | lkb->lkb_last_bast.sb_status, |
| 32 | lkb->lkb_last_bast.sb_flags); |
| 33 | |
| 34 | log_print("last_cast %x %llu flags %x mode %d sb %d %x", |
| 35 | lkb->lkb_id, |
| 36 | (unsigned long long)lkb->lkb_last_cast.seq, |
| 37 | lkb->lkb_last_cast.flags, |
| 38 | lkb->lkb_last_cast.mode, |
| 39 | lkb->lkb_last_cast.sb_status, |
| 40 | lkb->lkb_last_cast.sb_flags); |
| 41 | |
| 42 | for (i = 0; i < DLM_CALLBACKS_SIZE; i++) { |
| 43 | log_print("cb %x %llu flags %x mode %d sb %d %x", |
| 44 | lkb->lkb_id, |
| 45 | (unsigned long long)lkb->lkb_callbacks[i].seq, |
| 46 | lkb->lkb_callbacks[i].flags, |
| 47 | lkb->lkb_callbacks[i].mode, |
| 48 | lkb->lkb_callbacks[i].sb_status, |
| 49 | lkb->lkb_callbacks[i].sb_flags); |
| 50 | } |
| 51 | } |
| 52 | |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 53 | int dlm_add_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode, |
| 54 | int status, uint32_t sbflags, uint64_t seq) |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 55 | { |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 56 | struct dlm_ls *ls = lkb->lkb_resource->res_ls; |
| 57 | uint64_t prev_seq; |
| 58 | int prev_mode; |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 59 | int i, rv; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 60 | |
| 61 | for (i = 0; i < DLM_CALLBACKS_SIZE; i++) { |
| 62 | if (lkb->lkb_callbacks[i].seq) |
| 63 | continue; |
| 64 | |
| 65 | /* |
| 66 | * Suppress some redundant basts here, do more on removal. |
| 67 | * Don't even add a bast if the callback just before it |
| 68 | * is a bast for the same mode or a more restrictive mode. |
| 69 | * (the addional > PR check is needed for PR/CW inversion) |
| 70 | */ |
| 71 | |
| 72 | if ((i > 0) && (flags & DLM_CB_BAST) && |
| 73 | (lkb->lkb_callbacks[i-1].flags & DLM_CB_BAST)) { |
| 74 | |
| 75 | prev_seq = lkb->lkb_callbacks[i-1].seq; |
| 76 | prev_mode = lkb->lkb_callbacks[i-1].mode; |
| 77 | |
| 78 | if ((prev_mode == mode) || |
| 79 | (prev_mode > mode && prev_mode > DLM_LOCK_PR)) { |
| 80 | |
| 81 | log_debug(ls, "skip %x add bast %llu mode %d " |
| 82 | "for bast %llu mode %d", |
| 83 | lkb->lkb_id, |
| 84 | (unsigned long long)seq, |
| 85 | mode, |
| 86 | (unsigned long long)prev_seq, |
| 87 | prev_mode); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 88 | rv = 0; |
| 89 | goto out; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 90 | } |
| 91 | } |
| 92 | |
| 93 | lkb->lkb_callbacks[i].seq = seq; |
| 94 | lkb->lkb_callbacks[i].flags = flags; |
| 95 | lkb->lkb_callbacks[i].mode = mode; |
| 96 | lkb->lkb_callbacks[i].sb_status = status; |
| 97 | lkb->lkb_callbacks[i].sb_flags = (sbflags & 0x000000FF); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 98 | rv = 0; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 99 | break; |
| 100 | } |
| 101 | |
| 102 | if (i == DLM_CALLBACKS_SIZE) { |
| 103 | log_error(ls, "no callbacks %x %llu flags %x mode %d sb %d %x", |
| 104 | lkb->lkb_id, (unsigned long long)seq, |
| 105 | flags, mode, status, sbflags); |
| 106 | dlm_dump_lkb_callbacks(lkb); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 107 | rv = -1; |
| 108 | goto out; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 109 | } |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 110 | out: |
| 111 | return rv; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | int dlm_rem_lkb_callback(struct dlm_ls *ls, struct dlm_lkb *lkb, |
| 115 | struct dlm_callback *cb, int *resid) |
| 116 | { |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 117 | int i, rv; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 118 | |
| 119 | *resid = 0; |
| 120 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 121 | if (!lkb->lkb_callbacks[0].seq) { |
| 122 | rv = -ENOENT; |
| 123 | goto out; |
| 124 | } |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 125 | |
| 126 | /* oldest undelivered cb is callbacks[0] */ |
| 127 | |
| 128 | memcpy(cb, &lkb->lkb_callbacks[0], sizeof(struct dlm_callback)); |
| 129 | memset(&lkb->lkb_callbacks[0], 0, sizeof(struct dlm_callback)); |
| 130 | |
| 131 | /* shift others down */ |
| 132 | |
| 133 | for (i = 1; i < DLM_CALLBACKS_SIZE; i++) { |
| 134 | if (!lkb->lkb_callbacks[i].seq) |
| 135 | break; |
| 136 | memcpy(&lkb->lkb_callbacks[i-1], &lkb->lkb_callbacks[i], |
| 137 | sizeof(struct dlm_callback)); |
| 138 | memset(&lkb->lkb_callbacks[i], 0, sizeof(struct dlm_callback)); |
| 139 | (*resid)++; |
| 140 | } |
| 141 | |
| 142 | /* if cb is a bast, it should be skipped if the blocking mode is |
| 143 | compatible with the last granted mode */ |
| 144 | |
| 145 | if ((cb->flags & DLM_CB_BAST) && lkb->lkb_last_cast.seq) { |
| 146 | if (dlm_modes_compat(cb->mode, lkb->lkb_last_cast.mode)) { |
| 147 | cb->flags |= DLM_CB_SKIP; |
| 148 | |
| 149 | log_debug(ls, "skip %x bast %llu mode %d " |
| 150 | "for cast %llu mode %d", |
| 151 | lkb->lkb_id, |
| 152 | (unsigned long long)cb->seq, |
| 153 | cb->mode, |
| 154 | (unsigned long long)lkb->lkb_last_cast.seq, |
| 155 | lkb->lkb_last_cast.mode); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 156 | rv = 0; |
| 157 | goto out; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 158 | } |
| 159 | } |
| 160 | |
| 161 | if (cb->flags & DLM_CB_CAST) { |
| 162 | memcpy(&lkb->lkb_last_cast, cb, sizeof(struct dlm_callback)); |
| 163 | lkb->lkb_last_cast_time = ktime_get(); |
| 164 | } |
| 165 | |
| 166 | if (cb->flags & DLM_CB_BAST) { |
| 167 | memcpy(&lkb->lkb_last_bast, cb, sizeof(struct dlm_callback)); |
| 168 | lkb->lkb_last_bast_time = ktime_get(); |
| 169 | } |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 170 | rv = 0; |
| 171 | out: |
| 172 | return rv; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 173 | } |
| 174 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 175 | void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status, |
| 176 | uint32_t sbflags) |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 177 | { |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 178 | struct dlm_ls *ls = lkb->lkb_resource->res_ls; |
| 179 | uint64_t new_seq, prev_seq; |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 180 | int rv; |
| 181 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 182 | spin_lock(&dlm_cb_seq_spin); |
| 183 | new_seq = ++dlm_cb_seq; |
tsutomu.owa@toshiba.co.jp | ccbbea0 | 2017-09-12 09:01:46 +0000 | [diff] [blame] | 184 | if (!dlm_cb_seq) |
| 185 | new_seq = ++dlm_cb_seq; |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 186 | spin_unlock(&dlm_cb_seq_spin); |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 187 | |
David Teigland | 597d0ca | 2006-07-12 16:44:04 -0500 | [diff] [blame] | 188 | if (lkb->lkb_flags & DLM_IFL_USER) { |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 189 | dlm_user_add_ast(lkb, flags, mode, status, sbflags, new_seq); |
David Teigland | 597d0ca | 2006-07-12 16:44:04 -0500 | [diff] [blame] | 190 | return; |
| 191 | } |
| 192 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 193 | mutex_lock(&lkb->lkb_cb_mutex); |
| 194 | prev_seq = lkb->lkb_callbacks[0].seq; |
David Teigland | 7fe2b31 | 2010-02-24 11:08:18 -0600 | [diff] [blame] | 195 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 196 | rv = dlm_add_lkb_callback(lkb, flags, mode, status, sbflags, new_seq); |
| 197 | if (rv < 0) |
| 198 | goto out; |
| 199 | |
| 200 | if (!prev_seq) { |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 201 | kref_get(&lkb->lkb_ref); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 202 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 203 | if (test_bit(LSFL_CB_DELAY, &ls->ls_flags)) { |
| 204 | mutex_lock(&ls->ls_cb_mutex); |
| 205 | list_add(&lkb->lkb_cb_list, &ls->ls_cb_delay); |
| 206 | mutex_unlock(&ls->ls_cb_mutex); |
| 207 | } else { |
| 208 | queue_work(ls->ls_callback_wq, &lkb->lkb_cb_work); |
| 209 | } |
| 210 | } |
| 211 | out: |
| 212 | mutex_unlock(&lkb->lkb_cb_mutex); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 213 | } |
| 214 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 215 | void dlm_callback_work(struct work_struct *work) |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 216 | { |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 217 | struct dlm_lkb *lkb = container_of(work, struct dlm_lkb, lkb_cb_work); |
| 218 | struct dlm_ls *ls = lkb->lkb_resource->res_ls; |
David Teigland | 7fe2b31 | 2010-02-24 11:08:18 -0600 | [diff] [blame] | 219 | void (*castfn) (void *astparam); |
| 220 | void (*bastfn) (void *astparam, int mode); |
David Teigland | 8304d6f | 2011-02-21 14:58:21 -0600 | [diff] [blame] | 221 | struct dlm_callback callbacks[DLM_CALLBACKS_SIZE]; |
| 222 | int i, rv, resid; |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 223 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 224 | memset(&callbacks, 0, sizeof(callbacks)); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 225 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 226 | mutex_lock(&lkb->lkb_cb_mutex); |
| 227 | if (!lkb->lkb_callbacks[0].seq) { |
| 228 | /* no callback work exists, shouldn't happen */ |
| 229 | log_error(ls, "dlm_callback_work %x no work", lkb->lkb_id); |
| 230 | dlm_print_lkb(lkb); |
| 231 | dlm_dump_lkb_callbacks(lkb); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 232 | } |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 233 | |
| 234 | for (i = 0; i < DLM_CALLBACKS_SIZE; i++) { |
| 235 | rv = dlm_rem_lkb_callback(ls, lkb, &callbacks[i], &resid); |
| 236 | if (rv < 0) |
| 237 | break; |
| 238 | } |
| 239 | |
| 240 | if (resid) { |
| 241 | /* cbs remain, loop should have removed all, shouldn't happen */ |
| 242 | log_error(ls, "dlm_callback_work %x resid %d", lkb->lkb_id, |
| 243 | resid); |
| 244 | dlm_print_lkb(lkb); |
| 245 | dlm_dump_lkb_callbacks(lkb); |
| 246 | } |
| 247 | mutex_unlock(&lkb->lkb_cb_mutex); |
| 248 | |
| 249 | castfn = lkb->lkb_astfn; |
| 250 | bastfn = lkb->lkb_bastfn; |
| 251 | |
| 252 | for (i = 0; i < DLM_CALLBACKS_SIZE; i++) { |
| 253 | if (!callbacks[i].seq) |
| 254 | break; |
| 255 | if (callbacks[i].flags & DLM_CB_SKIP) { |
| 256 | continue; |
| 257 | } else if (callbacks[i].flags & DLM_CB_BAST) { |
| 258 | bastfn(lkb->lkb_astparam, callbacks[i].mode); |
Alexander Aring | f1d3b8f | 2021-11-02 15:17:15 -0400 | [diff] [blame] | 259 | trace_dlm_bast(ls, lkb, callbacks[i].mode); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 260 | } else if (callbacks[i].flags & DLM_CB_CAST) { |
| 261 | lkb->lkb_lksb->sb_status = callbacks[i].sb_status; |
| 262 | lkb->lkb_lksb->sb_flags = callbacks[i].sb_flags; |
| 263 | castfn(lkb->lkb_astparam); |
Alexander Aring | f1d3b8f | 2021-11-02 15:17:15 -0400 | [diff] [blame] | 264 | trace_dlm_ast(ls, lkb, lkb->lkb_lksb); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 265 | } |
| 266 | } |
| 267 | |
| 268 | /* undo kref_get from dlm_add_callback, may cause lkb to be freed */ |
| 269 | dlm_put_lkb(lkb); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 270 | } |
| 271 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 272 | int dlm_callback_start(struct dlm_ls *ls) |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 273 | { |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 274 | ls->ls_callback_wq = alloc_workqueue("dlm_callback", |
Bob Peterson | aa9f101 | 2016-10-19 11:34:54 -0400 | [diff] [blame] | 275 | WQ_HIGHPRI | WQ_MEM_RECLAIM, 0); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 276 | if (!ls->ls_callback_wq) { |
| 277 | log_print("can't start dlm_callback workqueue"); |
| 278 | return -ENOMEM; |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 279 | } |
| 280 | return 0; |
| 281 | } |
| 282 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 283 | void dlm_callback_stop(struct dlm_ls *ls) |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 284 | { |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 285 | if (ls->ls_callback_wq) |
| 286 | destroy_workqueue(ls->ls_callback_wq); |
| 287 | } |
| 288 | |
| 289 | void dlm_callback_suspend(struct dlm_ls *ls) |
| 290 | { |
| 291 | set_bit(LSFL_CB_DELAY, &ls->ls_flags); |
| 292 | |
| 293 | if (ls->ls_callback_wq) |
| 294 | flush_workqueue(ls->ls_callback_wq); |
| 295 | } |
| 296 | |
Bob Peterson | 216f0ef | 2018-11-08 14:04:50 -0500 | [diff] [blame] | 297 | #define MAX_CB_QUEUE 25 |
| 298 | |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 299 | void dlm_callback_resume(struct dlm_ls *ls) |
| 300 | { |
| 301 | struct dlm_lkb *lkb, *safe; |
Alexander Aring | 2f05ec4 | 2021-11-02 15:17:14 -0400 | [diff] [blame] | 302 | int count = 0, sum = 0; |
Alexander Aring | f70813d | 2021-11-30 14:47:14 -0500 | [diff] [blame] | 303 | bool empty; |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 304 | |
| 305 | clear_bit(LSFL_CB_DELAY, &ls->ls_flags); |
| 306 | |
| 307 | if (!ls->ls_callback_wq) |
| 308 | return; |
| 309 | |
Bob Peterson | 216f0ef | 2018-11-08 14:04:50 -0500 | [diff] [blame] | 310 | more: |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 311 | mutex_lock(&ls->ls_cb_mutex); |
| 312 | list_for_each_entry_safe(lkb, safe, &ls->ls_cb_delay, lkb_cb_list) { |
| 313 | list_del_init(&lkb->lkb_cb_list); |
| 314 | queue_work(ls->ls_callback_wq, &lkb->lkb_cb_work); |
| 315 | count++; |
Bob Peterson | 216f0ef | 2018-11-08 14:04:50 -0500 | [diff] [blame] | 316 | if (count == MAX_CB_QUEUE) |
| 317 | break; |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 318 | } |
Alexander Aring | f70813d | 2021-11-30 14:47:14 -0500 | [diff] [blame] | 319 | empty = list_empty(&ls->ls_cb_delay); |
David Teigland | 23e8e1a | 2011-04-05 13:16:24 -0500 | [diff] [blame] | 320 | mutex_unlock(&ls->ls_cb_mutex); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 321 | |
Alexander Aring | 2f05ec4 | 2021-11-02 15:17:14 -0400 | [diff] [blame] | 322 | sum += count; |
Alexander Aring | f70813d | 2021-11-30 14:47:14 -0500 | [diff] [blame] | 323 | if (!empty) { |
Bob Peterson | 216f0ef | 2018-11-08 14:04:50 -0500 | [diff] [blame] | 324 | count = 0; |
| 325 | cond_resched(); |
| 326 | goto more; |
| 327 | } |
Alexander Aring | 2f05ec4 | 2021-11-02 15:17:14 -0400 | [diff] [blame] | 328 | |
| 329 | if (sum) |
| 330 | log_rinfo(ls, "%s %d", __func__, sum); |
David Teigland | e7fd417 | 2006-01-18 09:30:29 +0000 | [diff] [blame] | 331 | } |
| 332 | |