Displaying 13 results from an estimated 13 matches for "btrfs_csum_size".
2010 Aug 13
1
[PATCH] btrfs: avoid duplications by moving the static int array from header to c file
...int array defined in ctree.h,
and a static inline function (btrfs_super_csum_size) using this array,
the obvious problem is every c file using that function would have a
local copy of that int array, multiple c files calling would result
multiple copies of that array:
$ nm fs/btrfs/btrfs.ko | grep btrfs_csum_sizes
0000010c r btrfs_csum_sizes
00000114 r btrfs_csum_sizes
000001c0 r btrfs_csum_sizes
000005a0 r btrfs_csum_sizes
the original commit has 4 c files called this static inline function,
till now there are still those 4 c files calling it, so there are 4 copies
of btrfs_csum_sizes; but future code may...
2010 Apr 03
1
[PATCH] btrfs support
...b/usr/kinit/fstype/btrfs_fs.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[...
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
2011 Jul 12
0
[PATCH]: Use a general way to get the default subvolume for btrfs
...ux/btrfs.h
+++ b/extlinux/btrfs.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 fo...
2009 Oct 05
1
btrfs-progs trivial: Double definition of BTRFS_CSUM_TYPE_CRC32 in ctree.h
Hello,
I noticed a double definition of BTRFS_CSUM_TYPE_CRC32 in ctree.h
and attach a patch that removes it.
Best regards,
Dirk
2012 May 16
0
[RESEND PATCH] Btrfs: set ioprio of scrub readahead to idle
...an Behrens <sbehrens@giantdisaster.de>
---
fs/btrfs/ctree.h | 3 +++
fs/btrfs/reada.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ec42a24..e6f772d 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -173,6 +173,9 @@ static int btrfs_csum_sizes[] = { 4, 0 };
#define BTRFS_FT_XATTR 8
#define BTRFS_FT_MAX 9
+/* ioprio of readahead is set to idle */
+#define BTRFS_IOPRIO_READA (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0))
+
/*
* The key defines the order in the tree, and so it also defines (optimal)
* block layout.
diff --git a/fs/bt...
2013 Feb 07
8
[RFC] Btrfs: Allow the compressed extent size limit to be modified v2
...++----
fs/btrfs/relocation.c | 7 ++++---
fs/btrfs/super.c | 20 +++++++++++++++++++-
5 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 547b7b0..a62f20c 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -191,6 +191,9 @@ static int btrfs_csum_sizes[] = { 4, 0 };
/* ioprio of readahead is set to idle */
#define BTRFS_IOPRIO_READA (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0))
+/* Default value for maximum compressed extent size (kb) */
+#define BTRFS_DEFAULT_MAX_COMPR_EXTENTS 128
+
/*
* The key defines the order in the tree, and so it also...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...eafsize,
- 0, 0, 0, 0, 1);
- if (ret)
- goto fail;
- ret = btrfs_commit_transaction(trans, root);
- free_extent_buffer(old_eb);
- BUG_ON(ret);
+static int migrate_super_block(int fd, u64 old_bytenr, u32 sectorsize)
+{
+ int ret;
+ char *buf;
+ u64 bytenr;
+ u32 crc = ~(u32)0;
+ u32 len = 512 - BTRFS_CSUM_SIZE;
+ struct btrfs_super_block *super;
+
+ ret = fsync(fd);
+ if (ret)
+ goto fail;
+
+ BUG_ON(sectorsize < sizeof(super));
+ buf = malloc(sectorsize);
+ if (!buf)
+ return -ENOMEM;
+ ret = pread(fd, buf, sectorsize, old_bytenr);
+ if (ret != sectorsize)
+ goto fail;
+
+ super = (struct btrfs_su...
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 Dec 09
10
[PATCH 0/3] Btrfs: add IO error device stats
The goal is to detect when drives start to get an increased error rate,
when drives should be replaced soon. Therefore statistic counters are
added that count IO errors (read, write and flush). Additionally, the
software detected errors like checksum errors and corrupted blocks are
counted.
An ioctl interface is added to get the device statistic counters.
A second ioctl is added to atomically get
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
2013 Aug 14
23
[RFC] btrfs-progs: fix sparse checking and warnings
Hi gang,
I was a little surprised to see that patch go by recently
which fixed an endian bug. I went to see how sparse
checking looked and it was.. broken. I got it going
again in my Fedora environment.
Most of the patches are just cleanups, but there *were*
three real bugs lurking in all that sparse warning spam.
So I maintain that it''s worth our time to keep it going
and fix
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found
the very last bug in my current scrub patch series:
Changelog v4->v5:
- fixed a deadlock when fixup is taking longer while scrub is about to end
Original message follows:
------------------------
This patch set introduces two new features for scrub. They share the backref
iteration code which is the