On Sun, 7 Jan 2007 23:13:07 -0500
"Josef 'Jeff' Sipek" <[email protected]> wrote:
> From: Josef "Jeff" Sipek <[email protected]>
>
> Workqueue & helper functions used to perform privileged operations on
> behalf of the user process.
>
> Signed-off-by: Josef "Jeff" Sipek <[email protected]>
> Signed-off-by: David Quigley <[email protected]>
> Signed-off-by: Erez Zadok <[email protected]>
> +
>
> ...
>
> +#include "union.h"
> +
> +/* Super-user IO work Queue - sometimes we need to perform actions which
> + * would fail due to the unix permissions on the parent directory (e.g.,
> + * rmdir a directory which appears empty, but in reality contains
> + * whiteouts).
> + */
> +
> +struct workqueue_struct *sioq;
Rather a terse identifier for a global symbol.
> +int __init init_sioq(void)
> +{
> + int err;
> +
> + sioq = create_workqueue("unionfs_siod");
> + if (!IS_ERR(sioq))
> + return 0;
> +
> + err = PTR_ERR(sioq);
> + printk(KERN_ERR "create_workqueue failed %d\n", err);
> + sioq = NULL;
> + return err;
> +}
> +
> +void __exit stop_sioq(void)
> +{
> + if (sioq)
> + destroy_workqueue(sioq);
> +}
> +
> +void run_sioq(work_func_t func, struct sioq_args *args)
> +{
> + INIT_WORK(&args->work, func);
> +
> + init_completion(&args->comp);
> + while (!queue_work(sioq, &args->work)) {
> + /* TODO: do accounting if needed */
> + schedule();
> + }
That's a busywait.
> + wait_for_completion(&args->comp);
> +}
> +
>
> ...
>
> +void __delete_whiteouts(struct work_struct *work) {
Misplaced brace.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]