Displaying 10 results from an estimated 10 matches for "btrfs_magic".
2010 Apr 03
1
[PATCH] btrfs support
...---
diff --git a/usr/kinit/fstype/btrfs_fs.h 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...
2014 Nov 15
0
[PATCH] BTRFS_MAGIC_N is a 64bit value
gcc complains about the size of the constant of BTRFS_MAGIC_N.
It is a 64bit value, so it needs the ULL suffix.
Signed-off-by: MartinS <ams at ludd.ltu.se>
---
diff --git a/core/fs/btrfs/btrfs.h b/core/fs/btrfs/btrfs.h
index 1568e4d..8f519a9 100644
--- a/core/fs/btrfs/btrfs.h
+++ b/core/fs/btrfs/btrfs.h
@@ -32,7 +32,7 @@ typedef u64 __le64;
#defin...
2014 Nov 15
0
core/fs/btrfs/btrfs.h correction
gcc complains about the size of the constant of BTRFS_MAGIC_N. It is a
64bit value, so it needs the ULL suffix.
diff --git a/core/fs/btrfs/btrfs.h b/core/fs/btrfs/btrfs.h
index 1568e4d..8f519a9 100644
--- a/core/fs/btrfs/btrfs.h
+++ b/core/fs/btrfs/btrfs.h
@@ -32,7 +32,7 @@ typedef u64 __le64;
#define BTRFS_MAGIC "_BHRfS_M"
#define BTRFS_MAGI...
2013 Oct 09
2
[PATCH] Btrfs: add tests for find_lock_delalloc_range
...ctree.h
+++ b/fs/btrfs/ctree.h
@@ -47,6 +47,12 @@ extern struct kmem_cache *btrfs_path_cachep;
extern struct kmem_cache *btrfs_free_space_cachep;
struct btrfs_ordered_sum;
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+#define STATIC noinline
+#else
+#define STATIC static noinline
+#endif
+
#define BTRFS_MAGIC 0x4D5F53665248425FULL /* ascii _BHRfS_M, no null */
#define BTRFS_MAX_MIRRORS 3
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 2bf6f46..c10291cc 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1598,11 +1598,10 @@ done:
*
* 1 is returned if we find something,...
2010 Apr 25
2
[git pull] small fixes, sh4, getruage() README's
...fstype/fstype.c b/usr/kinit/fstype/fstype.c
index d57b937..451d60c 100644
--- a/usr/kinit/fstype/fstype.c
+++ b/usr/kinit/fstype/fstype.c
@@ -460,7 +460,7 @@ static int btrfs_image(const void *buf, unsigned long long *bytes)
(const struct btrfs_super_block *)buf;
if (!memcmp(sb->magic, BTRFS_MAGIC, BTRFS_MAGIC_L)) {
- *bytes = sb->total_bytes;
+ *bytes = (unsigned long long)__le64_to_cpu(sb->total_bytes);
return 1;
}
return 0;
commit 30c21662ec3c036aa551dd75375a4d8d7e008ad6
Author: Aurelien Jarno <aurel32 at debian.org>
Date: Fri Apr 16 18:17:58 2010 +0200
[klibc...
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
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
...fstype/fstype.c b/usr/kinit/fstype/fstype.c
index d57b937..451d60c 100644
--- a/usr/kinit/fstype/fstype.c
+++ b/usr/kinit/fstype/fstype.c
@@ -460,7 +460,7 @@ static int btrfs_image(const void *buf, unsigned long long *bytes)
(const struct btrfs_super_block *)buf;
if (!memcmp(sb->magic, BTRFS_MAGIC, BTRFS_MAGIC_L)) {
- *bytes = sb->total_bytes;
+ *bytes = (unsigned long long)__le64_to_cpu(sb->total_bytes);
return 1;
}
return 0;
commit 529d9d2653e0a7ea8073b4c9c7a15504c44800be
Author: Aurelien Jarno <aurel32 at debian.org>
Date: Fri Apr 16 18:17:58 2010 +0200
[klibc...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...+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(disk_super);
diff -r 12138d4beeb0 utils.c
--- a/utils.c Fri Jan 04 11:29:55 2008 -0500
+++ b/utils.c Mon Jan 07...
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...ntf(stderr, "checking fs roots\n");
ret = check_fs_roots(root, &root_cache);
if (ret)
diff --git a/ctree.h b/ctree.h
index 702de2c..67fa650 100644
--- a/ctree.h
+++ b/ctree.h
@@ -28,6 +28,7 @@
struct btrfs_root;
struct btrfs_trans_handle;
+struct btrfs_free_space_ctl;
#define BTRFS_MAGIC 0x4D5F53665248425F /* ascii _BHRfS_M, no null */
#define BTRFS_MAX_LEVEL 8
@@ -268,6 +269,15 @@ struct btrfs_chunk {
/* additional stripes go here */
} __attribute__ ((__packed__));
+#define BTRFS_FREE_SPACE_EXTENT 1
+#define BTRFS_FREE_SPACE_BITMAP 2
+
+struct btrfs_free_space_entry {
+ __...
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