search for: btrfs_fsid_siz

Displaying 12 results from an estimated 12 matches for "btrfs_fsid_siz".

Did you mean: btrfs_fsid_size
2012 Feb 29
15
[RFC] [PATCH] Add btrfs autosnap feature
From: anand jain <anand.jain@oracle.com> Anand Jain (1): [RFC] Add btrfs autosnap feature Makefile | 6 +- autosnap.c | 1553 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ autosnap.h | 81 +++ btrfs-list.c | 140 +++++- btrfs.c | 46 ++- btrfs_cmds.c | 186 +++++++- btrfs_cmds.h | 3 +- scrub.c | 1 + 8 files changed, 1982 insertions(+), 34
2010 Apr 03
1
[PATCH] btrfs support
....h new file mode 100644 index 0000000..e1f933e --- /dev/null +++ b/usr/kinit/fstype/btrfs_fs.h @@ -0,0 +1,51 @@ +#ifndef __BTRFS_FS_H +#define __BTRFS_FS_H + +/* Extracted from fs/btrfs/ctree.h and shortened a bit */ + +#define BTRFS_MAGIC "_BHRfS_M" + +#define BTRFS_CSUM_SIZE 32 +#define BTRFS_FSID_SIZE 16 + +/* + * the super block basically lists the main trees of the FS + * it currently lacks any block count etc etc + */ +struct btrfs_super_block { + __u8 csum[BTRFS_CSUM_SIZE]; + /* the first 4 fields must match struct btrfs_header */ + __u8 fsid[BTRFS_FSID_SIZE]; /* FS...
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
...l_fslist_args *fslist_arg, + struct btrfs_ioctl_fslist *fslist) +{ + u64 cnt = 0, ucnt; + struct btrfs_fs_devices *fs_devices; + + ucnt = fslist_arg->count; + + list_for_each_entry(fs_devices, &fs_uuids, list) { + if (cnt < ucnt) { + memcpy(fslist->fsid, fs_devices->fsid, + BTRFS_FSID_SIZE); + fslist->num_devices = fs_devices->num_devices; + fslist->missing_devices = fs_devices->missing_devices; + fslist->total_devices = fs_devices->total_devices; + + if (fs_devices->opened) + fslist->flags = BTRFS_FS_MOUNTED; + + fslist = (struct btrfs_ioctl_fsl...
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
This is the next patch series for scrub userland tools. Change log v1->v2: - commands now reachable as "btrfs scrub ..." instead of "btrfs filesystem scrub ..." - ability to scrub a single device instead of a whole file system - superfluous command line options removed - resume is now a separate command ("scrub resume") instead of "scrub start -r" -
2009 Jan 16
4
[PATCH] Btrfs: simplify iteration codes
...s_devices *find_fsid(u8 *fsid) { - struct list_head *cur; struct btrfs_fs_devices *fs_devices; - list_for_each(cur, &fs_uuids) { - fs_devices = list_entry(cur, struct btrfs_fs_devices, list); + list_for_each_entry(fs_devices, &fs_uuids, list) { if (memcmp(fsid, fs_devices->fsid, BTRFS_FSID_SIZE) == 0) return fs_devices; } -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...+ else + btrfs_node_key(buf, &disk_key, 0); + cow = btrfs_alloc_free_block(trans, new_root, buf->len, + new_root_objectid, &disk_key, level, buf->start, 0); if (IS_ERR(cow)) { kfree(new_root); @@ -117,7 +122,7 @@ int btrfs_copy_root(struct btrfs_trans_h BTRFS_FSID_SIZE); WARN_ON(btrfs_header_generation(buf) > trans->transid); - ret = btrfs_inc_ref(trans, new_root, buf, cow, NULL); + ret = btrfs_inc_ref(trans, new_root, cow, 0); kfree(new_root); if (ret) @@ -128,6 +133,74 @@ int btrfs_copy_root(struct btrfs_trans_h return 0; } +static noinlin...
2013 Apr 09
19
[PATCH 00/17] Btrfs-progs: some receive related patches
...eive: different levels (amount) of debug output Btrfs-progs: small parent_subvol cleanup for cmds-receive.c Btrfs-progs: fix bug in find_root_gen Btrfs-progs: btrfs-receive optionally honors the end-cmd Btrfs-progs: don''t allocate one byte too much each time Btrfs-progs: Fix that BTRFS_FSID_SIZE is used instead of BTRFS_UUID_SIZE Btrfs-progs: remove some unused code Btrfs-progs: allow to receive to relative directories btrfs-list.c | 14 ++--- cmds-receive.c | 164 ++++++++++++++++++++++++++++++++++++++++++--------------- cmds-send.c | 12 ++++- send-stream.c | 9 ++--...
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...rfs.h @@ -1,6 +1,9 @@ #ifndef _BTRFS_H_ #define _BTRFS_H_ +#include <asm/types.h> +#include <linux/ioctl.h> + #define BTRFS_SUPER_MAGIC 0x9123683E #define BTRFS_SUPER_INFO_OFFSET (64 * 1024) #define BTRFS_SUPER_INFO_SIZE 4096 @@ -8,6 +11,40 @@ #define BTRFS_CSUM_SIZE 32 #define BTRFS_FSID_SIZE 16 +typedef __u64 u64; +typedef __u32 u32; +typedef __u16 u16; +typedef __u8 u8; +typedef u64 __le64; +typedef u16 __le16; + +#define BTRFS_ROOT_BACKREF_KEY 144 +#define BTRFS_ROOT_TREE_DIR_OBJECTID 6ULL +#define BTRFS_DIR_ITEM_KEY 84 + +/* + * * this is used for both forward and backward...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...0 disk-io.c --- a/disk-io.c Fri Jan 04 11:29:55 2008 -0500 +++ b/disk-io.c Mon Jan 07 23:35:25 2008 +0800 @@ -417,7 +417,13 @@ struct btrfs_root *open_ctree_fd(int fp, read_extent_buffer(fs_info->sb_buffer, fs_info->fsid, (unsigned long)btrfs_super_fsid(fs_info->sb_buffer), BTRFS_FSID_SIZE); + disk_super = &fs_info->super_copy; + if (strncmp((char *)(&disk_super->magic), BTRFS_MAGIC, + sizeof(disk_super->magic))) { + printk("No valid btrfs found\n"); + BUG_ON(1); + } nodesize = btrfs_super_nodesize(disk_super); leafsize = btrfs_super_leafsize...
2012 Jun 29
12
[PATCH 1/3] Btrfs-progs: add support to set subvolume/snapshot readonly
...{ 0, 0, 0, 0, 0 } } diff --git a/ioctl.h b/ioctl.h index f2e5d8d..9c066eb 100644 --- a/ioctl.h +++ b/ioctl.h @@ -42,6 +42,11 @@ struct btrfs_ioctl_vol_args_v2 { char name[BTRFS_SUBVOL_NAME_MAX + 1]; }; +struct btrfs_ioctl_get_set_flags_args { + __u64 objectid; + __u64 flags; +}; + #define BTRFS_FSID_SIZE 16 #define BTRFS_UUID_SIZE 16 @@ -312,6 +317,8 @@ struct btrfs_ioctl_logical_ino_args { struct btrfs_ioctl_space_args) #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \ struct btrfs_ioctl_vol_args_v2) +#define BTRFS_IOC_SUBVOL_GETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 25,...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into