Displaying 11 results from an estimated 11 matches for "recow".
Did you mean:
reco
2013 May 14
1
[PATCH] Btrfs-progs: fix missing recow roots when making btrfs filesystem
When making btrfs filesystem. we firstly write root leaf to
specified filed, and then we recow the root. If we don''t recow,
some trees are not in the correct block group.
Steps to reproduce:
dd if=/dev/zero of=test.img bs=1M count=100
mkfs.btrfs -f test.img
btrfs-debug-tree test.img
extent tree key (EXTENT_TREE ROOT_ITEM 0)
leaf 4210688 items 10 free space 3349 generation 4 ow...
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...- int slot;
- int bookend;
- int found_type = 0;
- int found_extent;
- int found_inline;
+ struct btrfs_key new_key;
+ u64 search_start = start;
+ u64 disk_bytenr = 0;
+ u64 num_bytes = 0;
+ u64 extent_offset = 0;
+ u64 extent_end = 0;
+ int del_nr = 0;
+ int del_slot = 0;
+ int extent_type;
int recow;
int ret;
- inline_limit = 0;
if (drop_cache)
btrfs_drop_extent_cache(inode, start, end - 1, 0);
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
+
while (1) {
recow = 0;
- btrfs_release_path(root, path);
ret = btrfs_lookup_file_extent(trans, root, path, inode->i_...
2009 Jan 21
0
[PATCH] Progs: update convert for uninitialized block groups
...es_count) {
+ ext2_ino_t foo;
+ ext2fs_new_inode(ext2_fs, ino, 0, NULL, &foo);
+ ino += EXT2_INODES_PER_GROUP(ext2_fs->super);
+ }
+
*ret_fs = ext2_fs;
return 0;
fail:
@@ -1929,6 +1941,7 @@ static int relocate_one_reference(struct
key.offset = 0;
}
btrfs_init_path(&path);
+recow:
ret = btrfs_search_slot(trans, root, &key, &path, -1, 1);
if (ret < 0)
goto fail;
@@ -1936,8 +1949,17 @@ static int relocate_one_reference(struct
leaf = path.nodes[0];
nritems = btrfs_header_nritems(leaf);
while (1) {
- if (path.slots[0] >= nritems)
- break;
+ if (pa...
2011 Jan 06
3
Offline Deduplication for Btrfs V2
Just a quick update, I''ve dropped the hashing stuff in favor of doing a memcmp
in the kernel to make sure the data is still the same. The thing that takes a
while is reading the data up from disk, so doing a memcmp of the entire buffer
isn''t that big of a deal, not to mention there''s a possiblity for malicious
users if there is a problem with the hashing algorithms we
2016 Oct 26
2
CVE-2016-5195 DirtyCOW : Critical Linux Kernel Flaw
...afely do subsequent
- * page lookups as if they were reads. But only
- * do so when looping for pte_write is futile:
- * in some cases userspace may also be wanting
- * to write to the gotten user page, which a
- * read fault here might prevent (a readonly
- * page might get reCOWed by userspace write).
+ * pte_write. We cannot simply drop FOLL_WRITE
+ * here because the COWed page might be gone by
+ * the time we do the subsequent page lookups.
*/
if ((ret & VM_FAULT_WRITE) &&
!(vma->vm_flags & VM_WRITE))
- foll_flags &...
2016 Oct 25
5
CVE-2016-5195 DirtyCOW : Critical Linux Kernel Flaw
On Tue, 25 Oct 2016 10:06:12 +0200
Christian Anthon <anthon at rth.dk> wrote:
> What is the best approach on centos 6 to mitigate the problem is
> officially patched? As far as I can tell Centos 6 is vulnerable to
> attacks using ptrace.
I can confirm that c6 is vulnerable, we're running a patched kernel
(local build) using a rhel6 adaptation of the upstream fix.
Ask
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...struct btrfs_path *path,
+ u64 bytenr, u64 parent,
+ u64 root_objectid,
+ u64 owner, u64 offset)
{
struct btrfs_key key;
- struct btrfs_extent_ref *ref;
+ struct btrfs_extent_data_ref *ref;
struct extent_buffer *leaf;
- u64 ref_objectid;
+ u32 nritems;
int ret;
+ int recow;
+ int err = -ENOENT;
key.objectid = bytenr;
- key.type = BTRFS_EXTENT_REF_KEY;
- key.offset = parent;
+ if (parent) {
+ key.type = BTRFS_SHARED_DATA_REF_KEY;
+ key.offset = parent;
+ } else {
+ key.type = BTRFS_EXTENT_DATA_REF_KEY;
+ key.offset = hash_extent_data_ref(root_objectid,
+...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...amp;file_key, path,
+ ins_len, cow);
return ret;
}
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index fc0f485..c98a3cb 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -611,7 +611,7 @@ int btrfs_drop_extents(struct btrfs_trans_handle *trans, struct inode *inode,
while (1) {
recow = 0;
- ret = btrfs_lookup_file_extent(trans, root, path, ino,
+ ret = btrfs_lookup_file_extent(trans, root, path, inode,
search_start, modify_tree);
if (ret < 0)
break;
@@ -905,7 +905,8 @@ again:
key.type = BTRFS_EXTENT_DATA_KEY;
key.offset = split;
- ret = btrfs_sear...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...;
trans = btrfs_join_transaction(root, 1);
- if (!trans) {
- err = -ENOMEM;
+ if (IS_ERR(trans)) {
+ err = PTR_ERR(trans);
goto out_unlock;
}
btrfs_set_trans_block_group(trans, inode);
@@ -323,6 +323,10 @@ noinline int btrfs_drop_extents(struct btrfs_trans_handle *trans,
while (1) {
recow = 0;
btrfs_release_path(root, path);
+ ret = btrfs_extend_transaction(trans, root, 1);
+ if (ret)
+ goto out;
+
ret = btrfs_lookup_file_extent(trans, root, path, inode->i_ino,
search_start, -1);
if (ret < 0)
@@ -1080,6 +1084,10 @@ out_nolock:
if ((file->f_fla...
2011 Jan 05
52
Offline Deduplication for Btrfs
Here are patches to do offline deduplication for Btrfs. It works well for the
cases it''s expected to, I''m looking for feedback on the ioctl interface and
such, I''m well aware there are missing features for the userspace app (like
being able to set a different blocksize). If this interface is acceptable I
will flesh out the userspace app a little more, but I believe the
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance,
and I found that the bottleneck addresses in the checksum items,
especially when we want to make a random write on a large file, e.g a 4G file.
Then a idea for this suggested by Chris is to use sub transaction ids and just
to log the part of inode that had changed since either the last log commit or
the last