Commit Graph
3 Commits
Author SHA1 Message Date
Zach BrownandZach Brown cfa563a4a4 scoutfs: expand the per_task API
This adds some minor functionality to the per_task API for use by the
upcoming offline waiting work.

Add scoutfs_per_task_add_excl() so that a caller can tell if their task
was already put on a per-task list by their caller.

Make scoutfs_per_task_del() return a bool to indicate if the entry was
found on a list and was in fact deleted, or not.

Add scoutfs_per_task_init_entry() for initializing entries that aren't
declared on the stack.

Signed-off-by: Zach Brown <zab@versity.com>
2019-05-21 11:33:26 -07:00
Zach BrownandMark Fasheh 4263a22c15 scoutfs: actually initialize per_task entry head
We had callers using the initialization macro, it just didn't do
anything.  The uninitialized entries triggered a bug on trying to delete
an uninitialized entry.  fsx-mpi tripped over this on shutdown after
seeing a consistency error.

Signed-off-by: Zach Brown <zab@versity.com>
2017-10-26 14:47:59 -07:00
Zach BrownandMark Fasheh c3e690a1ac scoutfs: add per_task storage helper
Add some functions for storing and using per-task storage in a list.
Callers can use this to pass pointers to children in a given scope when
interfaces don't allow for passing individual arguments amongst
concurrent callers in the scope.

Signed-off-by: Zach Brown <zab@versity.com>
2017-10-09 15:31:29 -07:00