Lines Matching refs:ent

207 ocfs2_filecheck_erase_entries(struct ocfs2_filecheck_sysfs_entry *ent,
210 ocfs2_filecheck_adjust_max(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_adjust_max() argument
218 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_adjust_max()
219 if (len < (ent->fs_fcheck->fc_size - ent->fs_fcheck->fc_done)) { in ocfs2_filecheck_adjust_max()
223 len, ent->fs_fcheck->fc_size - ent->fs_fcheck->fc_done); in ocfs2_filecheck_adjust_max()
226 if (len < ent->fs_fcheck->fc_size) in ocfs2_filecheck_adjust_max()
227 BUG_ON(!ocfs2_filecheck_erase_entries(ent, in ocfs2_filecheck_adjust_max()
228 ent->fs_fcheck->fc_size - len)); in ocfs2_filecheck_adjust_max()
230 ent->fs_fcheck->fc_max = len; in ocfs2_filecheck_adjust_max()
233 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_adjust_max()
305 struct ocfs2_filecheck_sysfs_entry *ent = container_of(kobj, in ocfs2_filecheck_attr_show() local
312 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
313 total = snprintf(buf, remain, "%u\n", ent->fs_fcheck->fc_max); in ocfs2_filecheck_attr_show()
314 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
321 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
322 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_attr_show()
337 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_show()
344 ocfs2_filecheck_is_dup_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_is_dup_entry() argument
349 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_is_dup_entry()
360 ocfs2_filecheck_erase_entry(struct ocfs2_filecheck_sysfs_entry *ent) in ocfs2_filecheck_erase_entry() argument
364 list_for_each_entry(p, &ent->fs_fcheck->fc_head, fe_list) { in ocfs2_filecheck_erase_entry()
368 ent->fs_fcheck->fc_size--; in ocfs2_filecheck_erase_entry()
369 ent->fs_fcheck->fc_done--; in ocfs2_filecheck_erase_entry()
378 ocfs2_filecheck_erase_entries(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_erase_entries() argument
385 if (ocfs2_filecheck_erase_entry(ent)) in ocfs2_filecheck_erase_entries()
395 ocfs2_filecheck_done_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_done_entry() argument
398 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_done_entry()
400 ent->fs_fcheck->fc_done++; in ocfs2_filecheck_done_entry()
401 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_done_entry()
427 ocfs2_filecheck_handle_entry(struct ocfs2_filecheck_sysfs_entry *ent, in ocfs2_filecheck_handle_entry() argument
430 struct ocfs2_super *osb = container_of(ent, struct ocfs2_super, in ocfs2_filecheck_handle_entry()
442 ocfs2_filecheck_done_entry(ent, entry); in ocfs2_filecheck_handle_entry()
452 struct ocfs2_filecheck_sysfs_entry *ent = container_of(kobj, in ocfs2_filecheck_attr_store() local
462 ret = ocfs2_filecheck_adjust_max(ent, args.fa_len); in ocfs2_filecheck_attr_store()
472 spin_lock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_store()
473 if (ocfs2_filecheck_is_dup_entry(ent, args.fa_ino)) { in ocfs2_filecheck_attr_store()
476 } else if ((ent->fs_fcheck->fc_size >= ent->fs_fcheck->fc_max) && in ocfs2_filecheck_attr_store()
477 (ent->fs_fcheck->fc_done == 0)) { in ocfs2_filecheck_attr_store()
481 ent->fs_fcheck->fc_max); in ocfs2_filecheck_attr_store()
485 if ((ent->fs_fcheck->fc_size >= ent->fs_fcheck->fc_max) && in ocfs2_filecheck_attr_store()
486 (ent->fs_fcheck->fc_done > 0)) { in ocfs2_filecheck_attr_store()
491 BUG_ON(!ocfs2_filecheck_erase_entry(ent)); in ocfs2_filecheck_attr_store()
498 list_add_tail(&entry->fe_list, &ent->fs_fcheck->fc_head); in ocfs2_filecheck_attr_store()
499 ent->fs_fcheck->fc_size++; in ocfs2_filecheck_attr_store()
501 spin_unlock(&ent->fs_fcheck->fc_lock); in ocfs2_filecheck_attr_store()
504 ocfs2_filecheck_handle_entry(ent, entry); in ocfs2_filecheck_attr_store()