3 void commit_add(struct )
5 struct obd_import *import = commit_uuid2import(rec-> uuid);
8 CERROR("unaware of OST UUID %s - dorpping\n", rec-> uuid);
13 spin_lock(&import->llcconf_lock);
14 list_add(&rec-> &import);
15 spin_unlock(&import->llcconf_lock);
20 void commit_confd_conf_import(struct obd_import *import,
21 struct llog_commit_confirm_daemon *lccd)
23 struct list_head *tmp, *save;
26 list_for_each_safe(&import->import_cc_list, tmp, save) {
27 struct llog_canceld_ctxt *cd;
29 if (atomic_read(import->import_cc_count) <=
30 lccd->llcconf_lowwater)
33 cd = list_entry(tmp, struct llog_canceld_ctxt *, llcconf_entry);
34 atomic_dec(&import->import_cc_count);
35 commit_confd_add_and_fire(cd);
42 int commit_confd_main(void *data)
44 struct llog_commit_confirm_daemon *lccd = data;
47 /* something has happened */
50 if (lccd->flags & LCCD_STOP)
54 /* lock llccd imporlist */
55 spin_lock(&lccd->llcconf_lock);
56 list_for_each_safe(&lccd->llcconf_list, ) {
57 struct obd_import *import;
58 import = list_entry(&lccd->llcconf_list,
62 spin_unlock(&lccd->llcconf_lock);
63 if (atomic_read(import->import_cc_count) >
64 lccd->llcconf_highwater)
65 commit_confd_conf_import(import);
67 spin_lock(&lccd->llcconf_lock);
70 spin_unlock(&lccd->llcconf_lock);
74 lccd->flags = LCCD_STOPPED;