mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-18 13:05:20 +00:00
btrfs-progs: libbtrfs: move extent_io.h to ctree.h
Move the remaining structure definitions and prototypes to ctree.h that is now the only user. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
ec59b70065
commit
6b539bbbc4
3
Makefile
3
Makefile
@ -214,8 +214,7 @@ libbtrfs_objects = \
|
|||||||
|
|
||||||
libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h kernel-lib/rbtree.h \
|
libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h kernel-lib/rbtree.h \
|
||||||
kernel-lib/list.h kernel-lib/rbtree_types.h kerncompat.h \
|
kernel-lib/list.h kernel-lib/rbtree_types.h kerncompat.h \
|
||||||
libbtrfs/extent-cache.h libbtrfs/extent_io.h ioctl.h \
|
libbtrfs/extent-cache.h ioctl.h libbtrfs/ctree.h version.h
|
||||||
libbtrfs/ctree.h version.h
|
|
||||||
libbtrfsutil_major := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MAJOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
libbtrfsutil_major := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MAJOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
||||||
libbtrfsutil_minor := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MINOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
libbtrfsutil_minor := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MINOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
||||||
libbtrfsutil_patch := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_PATCH ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
libbtrfsutil_patch := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_PATCH ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
||||||
|
@ -25,13 +25,11 @@
|
|||||||
#include "kernel-lib/list.h"
|
#include "kernel-lib/list.h"
|
||||||
#include "kerncompat.h"
|
#include "kerncompat.h"
|
||||||
#include "libbtrfs/extent-cache.h"
|
#include "libbtrfs/extent-cache.h"
|
||||||
#include "libbtrfs/extent_io.h"
|
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
#else
|
#else
|
||||||
#include <btrfs/list.h>
|
#include <btrfs/list.h>
|
||||||
#include <btrfs/kerncompat.h>
|
#include <btrfs/kerncompat.h>
|
||||||
#include <btrfs/extent-cache.h>
|
#include <btrfs/extent-cache.h>
|
||||||
#include <btrfs/extent_io.h>
|
|
||||||
#include <btrfs/ioctl.h>
|
#include <btrfs/ioctl.h>
|
||||||
#endif /* BTRFS_FLAT_INCLUDES */
|
#endif /* BTRFS_FLAT_INCLUDES */
|
||||||
|
|
||||||
@ -212,6 +210,35 @@ struct btrfs_key {
|
|||||||
u64 offset;
|
u64 offset;
|
||||||
} __attribute__ ((__packed__));
|
} __attribute__ ((__packed__));
|
||||||
|
|
||||||
|
struct extent_io_tree {
|
||||||
|
struct cache_tree state;
|
||||||
|
struct cache_tree cache;
|
||||||
|
struct list_head lru;
|
||||||
|
u64 cache_size;
|
||||||
|
u64 max_cache_size;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct extent_state {
|
||||||
|
struct cache_extent cache_node;
|
||||||
|
u64 start;
|
||||||
|
u64 end;
|
||||||
|
int refs;
|
||||||
|
unsigned long state;
|
||||||
|
u64 xprivate;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct extent_buffer {
|
||||||
|
struct cache_extent cache_node;
|
||||||
|
u64 start;
|
||||||
|
struct list_head lru;
|
||||||
|
struct list_head recow;
|
||||||
|
u32 len;
|
||||||
|
int refs;
|
||||||
|
u32 flags;
|
||||||
|
struct btrfs_fs_info *fs_info;
|
||||||
|
char data[] __attribute__((aligned(8)));
|
||||||
|
};
|
||||||
|
|
||||||
struct btrfs_mapping_tree {
|
struct btrfs_mapping_tree {
|
||||||
struct cache_tree cache_tree;
|
struct cache_tree cache_tree;
|
||||||
};
|
};
|
||||||
@ -1552,6 +1579,11 @@ static inline u32 BTRFS_MAX_XATTR_SIZE(const struct btrfs_fs_info *info)
|
|||||||
#define BTRFS_INODE_DIRSYNC (1 << 10)
|
#define BTRFS_INODE_DIRSYNC (1 << 10)
|
||||||
#define BTRFS_INODE_COMPRESS (1 << 11)
|
#define BTRFS_INODE_COMPRESS (1 << 11)
|
||||||
|
|
||||||
|
void read_extent_buffer(const struct extent_buffer *eb, void *dst,
|
||||||
|
unsigned long start, unsigned long len);
|
||||||
|
void write_extent_buffer(struct extent_buffer *eb, const void *src,
|
||||||
|
unsigned long start, unsigned long len);
|
||||||
|
|
||||||
#define read_eb_member(eb, ptr, type, member, result) ( \
|
#define read_eb_member(eb, ptr, type, member, result) ( \
|
||||||
read_extent_buffer(eb, (char *)(result), \
|
read_extent_buffer(eb, (char *)(result), \
|
||||||
((unsigned long)(ptr)) + \
|
((unsigned long)(ptr)) + \
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2007 Oracle. All rights reserved.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License v2 as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
||||||
* Boston, MA 021110-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __BTRFS_EXTENT_IO_H__
|
|
||||||
#define __BTRFS_EXTENT_IO_H__
|
|
||||||
|
|
||||||
#if BTRFS_FLAT_INCLUDES
|
|
||||||
#include "kerncompat.h"
|
|
||||||
#include "libbtrfs/extent-cache.h"
|
|
||||||
#include "kernel-lib/list.h"
|
|
||||||
#else
|
|
||||||
#include <btrfs/kerncompat.h>
|
|
||||||
#include <btrfs/extent-cache.h>
|
|
||||||
#include <btrfs/list.h>
|
|
||||||
#endif /* BTRFS_FLAT_INCLUDES */
|
|
||||||
|
|
||||||
struct btrfs_fs_info;
|
|
||||||
|
|
||||||
struct extent_io_tree {
|
|
||||||
struct cache_tree state;
|
|
||||||
struct cache_tree cache;
|
|
||||||
struct list_head lru;
|
|
||||||
u64 cache_size;
|
|
||||||
u64 max_cache_size;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct extent_state {
|
|
||||||
struct cache_extent cache_node;
|
|
||||||
u64 start;
|
|
||||||
u64 end;
|
|
||||||
int refs;
|
|
||||||
unsigned long state;
|
|
||||||
u64 xprivate;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct extent_buffer {
|
|
||||||
struct cache_extent cache_node;
|
|
||||||
u64 start;
|
|
||||||
struct list_head lru;
|
|
||||||
struct list_head recow;
|
|
||||||
u32 len;
|
|
||||||
int refs;
|
|
||||||
u32 flags;
|
|
||||||
struct btrfs_fs_info *fs_info;
|
|
||||||
char data[] __attribute__((aligned(8)));
|
|
||||||
};
|
|
||||||
|
|
||||||
void read_extent_buffer(const struct extent_buffer *eb, void *dst,
|
|
||||||
unsigned long start, unsigned long len);
|
|
||||||
void write_extent_buffer(struct extent_buffer *eb, const void *src,
|
|
||||||
unsigned long start, unsigned long len);
|
|
||||||
#endif
|
|
@ -22,7 +22,6 @@
|
|||||||
#include "kernel-lib/rbtree.h"
|
#include "kernel-lib/rbtree.h"
|
||||||
#include "kernel-lib/list.h"
|
#include "kernel-lib/list.h"
|
||||||
#include "kernel-shared/ctree.h"
|
#include "kernel-shared/ctree.h"
|
||||||
#include "kernel-shared/extent_io.h"
|
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
#include "common/extent-cache.h"
|
#include "common/extent-cache.h"
|
||||||
#include "kernel-shared/send.h"
|
#include "kernel-shared/send.h"
|
||||||
@ -38,7 +37,6 @@
|
|||||||
#include "btrfs/rbtree.h"
|
#include "btrfs/rbtree.h"
|
||||||
#include "btrfs/list.h"
|
#include "btrfs/list.h"
|
||||||
#include "btrfs/ctree.h"
|
#include "btrfs/ctree.h"
|
||||||
#include "btrfs/extent_io.h"
|
|
||||||
#include "btrfs/ioctl.h"
|
#include "btrfs/ioctl.h"
|
||||||
#include "btrfs/extent-cache.h"
|
#include "btrfs/extent-cache.h"
|
||||||
#include "btrfs/send.h"
|
#include "btrfs/send.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user