Lines Matching full:ent
217 ocfs2_filecheck_erase_entries(struct ocfs2_filecheck_sysfs_entry *ent,
220 ocfs2_filecheck_adjust_max(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_adjust_max() argument
228 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_adjust_max()
229 if (len < (ent->fs_fcheck->fc_size - ent->fs_fcheck->fc_done)) { in ocfs2_filecheck_adjust_max()
233 len, ent->fs_fcheck->fc_size - ent->fs_fcheck->fc_done); in ocfs2_filecheck_adjust_max()
236 if (len < ent->fs_fcheck->fc_size) in ocfs2_filecheck_adjust_max()
237 BUG_ON(!ocfs2_filecheck_erase_entries(ent, in ocfs2_filecheck_adjust_max()
238 ent->fs_fcheck->fc_size - len)); in ocfs2_filecheck_adjust_max()
240 ent->fs_fcheck->fc_max = len; in ocfs2_filecheck_adjust_max()
243 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_adjust_max()
315 struct ocfs2_filecheck_sysfs_entry *ent = container_of(kobj, in ocfs2_filecheck_attr_show() local
322 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
323 total = snprintf(buf, remain, "%u\n", ent->fs_fcheck->fc_max); in ocfs2_filecheck_attr_show()
324 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
331 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
332 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_attr_show()
351 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
358 ocfs2_filecheck_is_dup_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_is_dup_entry() argument
363 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_is_dup_entry()
374 ocfs2_filecheck_erase_entry(struct ocfs2_filecheck_sysfs_entry *ent) in ocfs2_filecheck_erase_entry() argument
378 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_erase_entry()
382 ent->fs_fcheck->fc_size--; in ocfs2_filecheck_erase_entry()
383 ent->fs_fcheck->fc_done--; in ocfs2_filecheck_erase_entry()
392 ocfs2_filecheck_erase_entries(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_erase_entries() argument
399 if (ocfs2_filecheck_erase_entry(ent)) in ocfs2_filecheck_erase_entries()
409 ocfs2_filecheck_done_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_done_entry() argument
412 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_done_entry()
414 ent->fs_fcheck->fc_done++; in ocfs2_filecheck_done_entry()
415 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_done_entry()
441 ocfs2_filecheck_handle_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_handle_entry() argument
444 struct ocfs2_super *osb = container_of(ent, struct ocfs2_super, in ocfs2_filecheck_handle_entry()
456 ocfs2_filecheck_done_entry(ent, entry); in ocfs2_filecheck_handle_entry()
466 struct ocfs2_filecheck_sysfs_entry *ent = container_of(kobj, in ocfs2_filecheck_attr_store() local
476 ret = ocfs2_filecheck_adjust_max(ent, args.fa_len); in ocfs2_filecheck_attr_store()
486 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_store()
487 if (ocfs2_filecheck_is_dup_entry(ent, args.fa_ino)) { in ocfs2_filecheck_attr_store()
490 } else if ((ent->fs_fcheck->fc_size >= ent->fs_fcheck->fc_max) && in ocfs2_filecheck_attr_store()
491 (ent->fs_fcheck->fc_done == 0)) { in ocfs2_filecheck_attr_store()
495 ent->fs_fcheck->fc_max); in ocfs2_filecheck_attr_store()
499 if ((ent->fs_fcheck->fc_size >= ent->fs_fcheck->fc_max) && in ocfs2_filecheck_attr_store()
500 (ent->fs_fcheck->fc_done > 0)) { in ocfs2_filecheck_attr_store()
505 BUG_ON(!ocfs2_filecheck_erase_entry(ent)); in ocfs2_filecheck_attr_store()
512 list_add_tail(&entry->fe_list, &ent->fs_fcheck->fc_head); in ocfs2_filecheck_attr_store()
513 ent->fs_fcheck->fc_size++; in ocfs2_filecheck_attr_store()
515 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_store()
518 ocfs2_filecheck_handle_entry(ent, entry); in ocfs2_filecheck_attr_store()