Displaying 7 results from an estimated 7 matches for "btrfs_delete_one_dir_name".
2011 May 27
0
[PATCH] Btrfs: try to only do one btrfs_search_slot in do_setxattr
...& XATTR_CREATE) {
- ret = -EEXIST;
+ if (flags & XATTR_REPLACE) {
+ di = btrfs_lookup_xattr(trans, root, path, inode->i_ino, name,
+ strlen(name), -1);
+ if (IS_ERR(di)) {
+ ret = PTR_ERR(di);
+ goto out;
+ } else if (!di) {
+ ret = -ENODATA;
goto out;
}
-
ret = btrfs_delete_one_dir_name(trans, root, path, di);
- BUG_ON(ret);
- btrfs_release_path(root, path);
-
- /* if we don''t have a value then we are removing the xattr */
- if (!value)
+ if (ret)
goto out;
- } else {
btrfs_release_path(root, path);
-
- if (flags & XATTR_REPLACE) {
- /* we couldn'...
2013 Apr 25
0
[PATCH] Btrfs: remove almost all of the BUG()'s from tree-log.c
..._tree(trans, log, &wc);
- BUG_ON(ret);
+
+ /* I don''t think this can happen but just in case */
+ if (ret)
+ btrfs_abort_transaction(trans, log, ret);
}
while (1) {
@@ -2625,7 +2660,10 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
if (di) {
ret = btrfs_delete_one_dir_name(trans, log, path, di);
bytes_del += name_len;
- BUG_ON(ret);
+ if (ret) {
+ err = ret;
+ goto fail;
+ }
}
btrfs_release_path(path);
di = btrfs_lookup_dir_index_item(trans, log, path, dir_ino,
@@ -2637,7 +2675,10 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,...
2010 Jun 10
0
[PATCH] [12/23] BTRFS: Clean up unused variables -- bugs
...find_space_info(fs_info, alloc_target);
return block_rsv;
}
Index: linux-2.6.35-rc2-gcc/fs/btrfs/dir-item.c
===================================================================
--- linux-2.6.35-rc2-gcc.orig/fs/btrfs/dir-item.c
+++ linux-2.6.35-rc2-gcc/fs/btrfs/dir-item.c
@@ -427,5 +427,5 @@ int btrfs_delete_one_dir_name(struct btr
ret = btrfs_truncate_item(trans, root, path,
item_len - sub_item_len, 1);
}
- return 0;
+ return ret;
}
Index: linux-2.6.35-rc2-gcc/fs/btrfs/extent_io.c
===================================================================
--- linux-2.6.35-rc2-gcc.orig/fs/btrfs/extent_io.c
++...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...inode);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
nr = trans->blocks_used;
@@ -2905,7 +2905,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans,
btrfs_dir_item_key_to_cpu(leaf, di, &key);
WARN_ON(key.type != BTRFS_ROOT_ITEM_KEY || key.objectid != objectid);
ret = btrfs_delete_one_dir_name(trans, root, path, di);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
btrfs_release_path(root, path);
ret = btrfs_del_root_ref(trans, root->fs_info->tree_root,
@@ -2931,13 +2931,13 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans,
btrfs_dir_item_key_to_cpu(leaf, di, &key)...
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...name_len, -1);
+ if (IS_ERR(di)) {
+ ret = PTR_ERR(di);
+ goto out_free;
+ }
+ if (!di) {
+ ret = -ENOENT;
+ printk(KERN_ERR "btrfs: could not find orphan record for inode"
+ " %lu\n", inode->i_ino);
+ goto out_free;
+ }
+ leaf = path->nodes[0];
+ ret = btrfs_delete_one_dir_name(trans, root, path, di);
+ if (ret)
+ goto out_free;
+
+ list_del_init(&BTRFS_I(inode)->i_orphan);
+
+out_free:
+ kfree(name);
+ btrfs_free_path(path);
+out:
+ return ret;
+}
+
void btrfs_read_locked_inode(struct inode *inode)
{
struct btrfs_path *path;
@@ -918,6 +1047,9 @@ fail:
*
*...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...btrfs_trans_handle *trans,
struct btrfs_root *root,
- struct btrfs_path *path, u64 dir,
+ struct inode *dir,
+ struct btrfs_path *path, u64 dirid,
const char *name, int name_len,
int mod);
struct btrfs_dir_item *
@@ -2851,7 +2876,8 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
struct btrfs_dir_item *di);
int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
- struct btrfs_path *path, u64 objectid,
+ struct inode *inode,
+ struct btrfs_path *path,
const char *na...
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all -
Here''s my current error handling patchset, against 3.1-rc8. Almost all of
this patchset is preparing for actual error handling. Before we start in
on that work, I''m trying to reduce the surface we need to worry about. It
turns out that there is a ton of code that returns an error code but never
actually reports an error.
The patchset has grown to 65 patches. 46 of them