Lines Matching full:ent

209 ocfs2_filecheck_erase_entries(struct ocfs2_filecheck_sysfs_entry *ent,
212 ocfs2_filecheck_adjust_max(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_adjust_max() argument
220 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_adjust_max()
221 if (len < (ent->fs_fcheck->fc_size - ent->fs_fcheck->fc_done)) { in ocfs2_filecheck_adjust_max()
225 len, ent->fs_fcheck->fc_size - ent->fs_fcheck->fc_done); in ocfs2_filecheck_adjust_max()
228 if (len < ent->fs_fcheck->fc_size) in ocfs2_filecheck_adjust_max()
229 BUG_ON(!ocfs2_filecheck_erase_entries(ent, in ocfs2_filecheck_adjust_max()
230 ent->fs_fcheck->fc_size - len)); in ocfs2_filecheck_adjust_max()
232 ent->fs_fcheck->fc_max = len; in ocfs2_filecheck_adjust_max()
235 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_adjust_max()
307 struct ocfs2_filecheck_sysfs_entry *ent = container_of(kobj, in ocfs2_filecheck_attr_show() local
314 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
315 total = snprintf(buf, remain, "%u\n", ent->fs_fcheck->fc_max); in ocfs2_filecheck_attr_show()
316 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
323 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
324 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_attr_show()
343 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
350 ocfs2_filecheck_is_dup_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_is_dup_entry() argument
355 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_is_dup_entry()
366 ocfs2_filecheck_erase_entry(struct ocfs2_filecheck_sysfs_entry *ent) in ocfs2_filecheck_erase_entry() argument
370 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_erase_entry()
374 ent->fs_fcheck->fc_size--; in ocfs2_filecheck_erase_entry()
375 ent->fs_fcheck->fc_done--; in ocfs2_filecheck_erase_entry()
384 ocfs2_filecheck_erase_entries(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_erase_entries() argument
391 if (ocfs2_filecheck_erase_entry(ent)) in ocfs2_filecheck_erase_entries()
401 ocfs2_filecheck_done_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_done_entry() argument
404 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_done_entry()
406 ent->fs_fcheck->fc_done++; in ocfs2_filecheck_done_entry()
407 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_done_entry()
433 ocfs2_filecheck_handle_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_handle_entry() argument
436 struct ocfs2_super *osb = container_of(ent, struct ocfs2_super, in ocfs2_filecheck_handle_entry()
448 ocfs2_filecheck_done_entry(ent, entry); in ocfs2_filecheck_handle_entry()
458 struct ocfs2_filecheck_sysfs_entry *ent = container_of(kobj, in ocfs2_filecheck_attr_store() local
468 ret = ocfs2_filecheck_adjust_max(ent, args.fa_len); in ocfs2_filecheck_attr_store()
478 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_store()
479 if (ocfs2_filecheck_is_dup_entry(ent, args.fa_ino)) { in ocfs2_filecheck_attr_store()
482 } else if ((ent->fs_fcheck->fc_size >= ent->fs_fcheck->fc_max) && in ocfs2_filecheck_attr_store()
483 (ent->fs_fcheck->fc_done == 0)) { in ocfs2_filecheck_attr_store()
487 ent->fs_fcheck->fc_max); in ocfs2_filecheck_attr_store()
491 if ((ent->fs_fcheck->fc_size >= ent->fs_fcheck->fc_max) && in ocfs2_filecheck_attr_store()
492 (ent->fs_fcheck->fc_done > 0)) { in ocfs2_filecheck_attr_store()
497 BUG_ON(!ocfs2_filecheck_erase_entry(ent)); in ocfs2_filecheck_attr_store()
504 list_add_tail(&entry->fe_list, &ent->fs_fcheck->fc_head); in ocfs2_filecheck_attr_store()
505 ent->fs_fcheck->fc_size++; in ocfs2_filecheck_attr_store()
507 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_store()
510 ocfs2_filecheck_handle_entry(ent, entry); in ocfs2_filecheck_attr_store()