Displaying 8 results from an estimated 8 matches for "do_setxattr".
2011 May 27
0
[PATCH] Btrfs: try to only do one btrfs_search_slot in do_setxattr
...>
---
fs/btrfs/xattr.c | 54 ++++++++++++++++++++++++++----------------------------
1 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 72ab029..4857a87 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -102,43 +102,41 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
if (!path)
return -ENOMEM;
- /* first lets see if we already have this xattr */
- di = btrfs_lookup_xattr(trans, root, path, inode->i_ino, name,
- strlen(name), -1);
- if (IS_ERR(di)) {
- ret = PTR_ERR(di);
- goto out;
- }
-
- /* ok we already have t...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...)) {
ret = PTR_ERR(trans);
+ btrfs_abort_transaction(root, ret);
goto done;
}
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 5366fe4..048d4cd 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -155,8 +155,10 @@ int __btrfs_setxattr(struct btrfs_trans_handle *trans,
return do_setxattr(trans, inode, name, value, size, flags);
trans = btrfs_start_transaction(root, 2);
- if (IS_ERR(trans))
+ if (IS_ERR(trans)) {
+ btrfs_abort_transaction(root, PTR_ERR(trans));
return PTR_ERR(trans);
+ }
ret = do_setxattr(trans, inode, name, value, size, flags);
if (ret)
--
To unsubs...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...oup_linuxxattrs_available (void)
guestfs_int_xattr_list *
do_getxattrs (const char *path)
{
- NOT_AVAILABLE (NULL);
+ NOT_AVAILABLE (linuxxattrs, NULL);
}
guestfs_int_xattr_list *
do_lgetxattrs (const char *path)
{
- NOT_AVAILABLE (NULL);
+ NOT_AVAILABLE (linuxxattrs, NULL);
}
int
do_setxattr (const char *xattr, const char *val, int vallen, const char *path)
{
- NOT_AVAILABLE (-1);
+ NOT_AVAILABLE (linuxxattrs, -1);
}
int
do_lsetxattr (const char *xattr, const char *val, int vallen, const char *path)
{
- NOT_AVAILABLE (-1);
+ NOT_AVAILABLE (linuxxattrs, -1);
}
int
do_rem...
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32
times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the
extent buffer while we look for readahead targets. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/ctree.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ap_tree, em);
write_unlock(&map_tree->map_tree.lock);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
free_extent_map(em);
return 0;
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 88ecbb2..0b4f7e6 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -119,7 +119,7 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
}
ret = btrfs_delete_one_dir_name(trans, root, path, di);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
btrfs_release_path(root, path);
/* if we don''t have a value then we are removing the xattr */
@@ -138,7 +138,7 @@ static int do_setxattr...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...de_ref(trans, log, name, name_len, inode,
dirid, &index);
mutex_unlock(&BTRFS_I(inode)->log_mutex);
if (ret == -ENOSPC) {
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 3f4e2d6..1dbbe91 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -125,7 +125,7 @@ static int do_setxattr(struct btrfs_trans_handle *trans,
}
again:
- ret = btrfs_insert_xattr_item(trans, root, path, btrfs_ino(inode),
+ ret = btrfs_insert_xattr_item(trans, root, inode, path,
name, name_len, value, size);
/*
* If we''re setting an xattr to a new value but the new value is sa...
2012 Dec 13
22
[PATCH] Btrfs: fix a deadlock on chunk mutex
An user reported that he has hit an annoying deadlock while playing with
ceph based on btrfs.
Current updating device tree requires space from METADATA chunk,
so we -may- need to do a recursive chunk allocation when adding/updating
dev extent, that is where the deadlock comes from.
If we use SYSTEM metadata to update device tree, we can avoid the recursive
stuff.
Reported-by: Jim Schutt