cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

discard.h (1412B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2
      3#ifndef BTRFS_DISCARD_H
      4#define BTRFS_DISCARD_H
      5
      6#include <linux/sizes.h>
      7
      8struct btrfs_fs_info;
      9struct btrfs_discard_ctl;
     10struct btrfs_block_group;
     11
     12/* Discard size limits */
     13#define BTRFS_ASYNC_DISCARD_DEFAULT_MAX_SIZE		(SZ_64M)
     14#define BTRFS_ASYNC_DISCARD_MAX_FILTER			(SZ_1M)
     15#define BTRFS_ASYNC_DISCARD_MIN_FILTER			(SZ_32K)
     16
     17/* List operations */
     18void btrfs_discard_check_filter(struct btrfs_block_group *block_group, u64 bytes);
     19
     20/* Work operations */
     21void btrfs_discard_cancel_work(struct btrfs_discard_ctl *discard_ctl,
     22			       struct btrfs_block_group *block_group);
     23void btrfs_discard_queue_work(struct btrfs_discard_ctl *discard_ctl,
     24			      struct btrfs_block_group *block_group);
     25void btrfs_discard_schedule_work(struct btrfs_discard_ctl *discard_ctl,
     26				 bool override);
     27bool btrfs_run_discard_work(struct btrfs_discard_ctl *discard_ctl);
     28
     29/* Update operations */
     30void btrfs_discard_calc_delay(struct btrfs_discard_ctl *discard_ctl);
     31void btrfs_discard_update_discardable(struct btrfs_block_group *block_group);
     32
     33/* Setup/cleanup operations */
     34void btrfs_discard_punt_unused_bgs_list(struct btrfs_fs_info *fs_info);
     35void btrfs_discard_resume(struct btrfs_fs_info *fs_info);
     36void btrfs_discard_stop(struct btrfs_fs_info *fs_info);
     37void btrfs_discard_init(struct btrfs_fs_info *fs_info);
     38void btrfs_discard_cleanup(struct btrfs_fs_info *fs_info);
     39
     40#endif