Displaying 10 results from an estimated 10 matches for "btrfs_header".
2011 Aug 06
0
help recover from unmountable btrfs
...t;fd,
+ (unsigned long long)buf->dev_bytenr);
+ }
free(result);
return 1;
}
@@ -165,6 +181,31 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
(unsigned long long)eb->start,
(unsigned long long)parent_transid,
(unsigned long long)btrfs_header_generation(eb));
+ fprintf(stderr, "dd if=(fd %i) bs=1c skip=%llu count=8 | od -t x1:\n%02x %02x %02x %02x %02x %02x %02x %02x\n",
+ eb->fd,
+ (unsigned long long)eb->dev_bytenr
+ + offsetof (struct btrfs_header, generation),
+ (__u8)eb->data[offsetof (struct btrfs_header, ge...
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...eby decrease the chances of fragment.
Cons:
1 Acquire more space for metadata and not suit for user data, obviously.
2 Conflict with SSD wearing leveling optimizing, obviously.
Implementation Notes:
struct btrfs_fs_info has a field cater_factor to store the multiples from
mount option, and struct btrfs_header has a u8 member, it''s left-hand 4 bits
to record this block''s location index and right-hand 4 bits for multiples,
such a combination indicates how many continuous blocks form a caterpillar
and which slot this tree block resides in the caterpillar.
When cow a block that is already...
2010 Apr 03
1
[PATCH] btrfs support
..._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 specific uuid */
+ __le64 bytenr; /* this block number */
+ __le64 flags;
+
+ /* allowed to be different from the btrfs_header from here own down */
+ __le64 magic;
+ __le64 generation;
+ __le64 root;
+...
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
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...ct btrfs_dir_item {
+ struct btrfs_disk_key location;
+ __le64 transid;
+ __le16 data_len;
+ __le16 name_len;
+ u8 type;
+} __attribute__ ((__packed__));
+
struct btrfs_super_block {
unsigned char csum[BTRFS_CSUM_SIZE];
/* the first 3 fields must match struct btrfs_header */
@@ -19,4 +56,72 @@ struct btrfs_super_block {
u64 magic;
} __attribute__ ((__packed__));
+
+#define BTRFS_IOCTL_MAGIC 0x94
+#define BTRFS_VOL_NAME_MAX 255
+#define BTRFS_PATH_NAME_MAX 4087
+
+struct btrfs_ioctl_vol_args {
+ __s64 fd;
+ char name[BTRFS_PATH_NAME_MAX + 1];
+};
+
+struct btrfs...
2012 Nov 01
41
[Request for review] [RFC] Add label support for snapshots and subvols
From: Anand Jain <anand.jain@oracle.com>
(This patch is for the review/test not yet for the integration).
Here is an implementation of the feature to add label to the
subvolume and snapshots. Which would help sysadmin to better manager
the subvol and snapshots.
This can be done in two ways, one - using attr which is user land
only changes but drawback is able to change the label
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite
straightforward. The usermode issues an ioctl for each device in the
fs. For each device, it enumerates the allocated device chunks. For
each chunk, the contained extents are enumerated and the data checksums
fetched. The extents are read sequentially and the checksums verified.
If an error occurs (checksum or EIO), a good copy
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...int level;
struct btrfs_root *new_root;
+ struct btrfs_disk_key disk_key;
new_root = kmalloc(sizeof(*new_root), GFP_NOFS);
if (!new_root)
@@ -98,8 +99,12 @@ int btrfs_copy_root(struct btrfs_trans_h
WARN_ON(root->ref_cows && trans->transid != root->last_trans);
level = btrfs_header_level(buf);
- cow = btrfs_alloc_free_block(trans, new_root, buf->len, 0,
- new_root_objectid, trans->transid,
+ if (level == 0)
+ btrfs_item_key(buf, &disk_key, 0);
+ else
+ btrfs_node_key(buf, &disk_key, 0);
+ cow = btrfs_alloc_free_block(trans, new_root, buf->len,
+...
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
Changes v1-v2:
- Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged
operation
- Cast u64 to unsigned long long for printf()
Changes v2-v3:
- Rebased on Chris'' current master
Changes v3-v4:
- Add padding at end of ioctl structure
Changes v4-v5:
- The statistic members in the ioctl are now organized as an array of
64 bit values. Symbolic names for the array indexes
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