linux/fs/btrfs/async-thread.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2007 Oracle.  All rights reserved.
 * Copyright (C) 2014 Fujitsu.  All rights reserved.
 */

#include <linux/kthread.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/freezer.h>
#include <trace/events/btrfs.h>
#include "async-thread.h"

enum {};

#define NO_THRESHOLD
#define DFT_THRESHOLD

struct btrfs_workqueue {};

struct btrfs_fs_info * __pure btrfs_workqueue_owner(const struct btrfs_workqueue *wq)
{}

struct btrfs_fs_info * __pure btrfs_work_owner(const struct btrfs_work *work)
{}

bool btrfs_workqueue_normal_congested(const struct btrfs_workqueue *wq)
{}

static void btrfs_init_workqueue(struct btrfs_workqueue *wq,
				 struct btrfs_fs_info *fs_info)
{}

struct btrfs_workqueue *btrfs_alloc_workqueue(struct btrfs_fs_info *fs_info,
					      const char *name, unsigned int flags,
					      int limit_active, int thresh)
{}

struct btrfs_workqueue *btrfs_alloc_ordered_workqueue(
				struct btrfs_fs_info *fs_info, const char *name,
				unsigned int flags)
{}

/*
 * Hook for threshold which will be called in btrfs_queue_work.
 * This hook WILL be called in IRQ handler context,
 * so workqueue_set_max_active MUST NOT be called in this hook
 */
static inline void thresh_queue_hook(struct btrfs_workqueue *wq)
{}

/*
 * Hook for threshold which will be called before executing the work,
 * This hook is called in kthread content.
 * So workqueue_set_max_active is called here.
 */
static inline void thresh_exec_hook(struct btrfs_workqueue *wq)
{}

static void run_ordered_work(struct btrfs_workqueue *wq,
			     struct btrfs_work *self)
{}

static void btrfs_work_helper(struct work_struct *normal_work)
{}

void btrfs_init_work(struct btrfs_work *work, btrfs_func_t func,
		     btrfs_ordered_func_t ordered_func)
{}

void btrfs_queue_work(struct btrfs_workqueue *wq, struct btrfs_work *work)
{}

void btrfs_destroy_workqueue(struct btrfs_workqueue *wq)
{}

void btrfs_workqueue_set_max(struct btrfs_workqueue *wq, int limit_active)
{}

void btrfs_flush_workqueue(struct btrfs_workqueue *wq)
{}