From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: <dsterba@suse.cz>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
Chris Mason <clm@fb.com>, Filipe Manana <fdmanana@suse.com>
Subject: [PATCH v2 3/4] btrfs: Rename and export __btrfs_set_prop to be called from running transaction
Date: Thu, 25 Sep 2014 14:55:29 +0900 [thread overview]
Message-ID: <5423AE51.8060701@jp.fujitsu.com> (raw)
In-Reply-To: <20140922120119.GK9715@twin.jikos.cz>
Hi David,
(2014/09/22 21:01), David Sterba wrote:
> On Fri, Sep 19, 2014 at 05:52:17PM +0900, Satoru Takeuchi wrote:
>> @@ -99,7 +99,7 @@ find_prop_handler(const char *name,
>> return NULL;
>> }
>>
>> -static int __btrfs_set_prop(struct btrfs_trans_handle *trans,
>> +int __btrfs_set_prop(struct btrfs_trans_handle *trans,
>
> It's common for static helpers to use the __ prefix, but please drop it
> for an exported function(s).
Sorry for the late reply. Here is the v2 patch.
Please take alook at it.
---
From: Naohiro Aota <naota@elisp.net>
Since "__" prefix means static helper, rename __btrfs_set_prop() to
btrfs_set_prop_trans.
Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
---
changelog
v1->v2: Reflect the following comment from David.
https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg37513.html
---
fs/btrfs/props.c | 6 +++---
fs/btrfs/props.h | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index 38efbe1..bba081a 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -99,7 +99,7 @@ find_prop_handler(const char *name,
return NULL;
}
-static int __btrfs_set_prop(struct btrfs_trans_handle *trans,
+int btrfs_set_prop_trans(struct btrfs_trans_handle *trans,
struct inode *inode,
const char *name,
const char *value,
@@ -153,7 +153,7 @@ int btrfs_set_prop(struct inode *inode,
size_t value_len,
int flags)
{
- return __btrfs_set_prop(NULL, inode, name, value, value_len, flags);
+ return btrfs_set_prop_trans(NULL, inode, name, value, value_len, flags);
}
static int iterate_object_props(struct btrfs_root *root,
@@ -325,7 +325,7 @@ static int inherit_props(struct btrfs_trans_handle *trans,
num_bytes, BTRFS_RESERVE_NO_FLUSH);
if (ret)
goto out;
- ret = __btrfs_set_prop(trans, inode, h->xattr_name,
+ ret = btrfs_set_prop_trans(trans, inode, h->xattr_name,
value, strlen(value), 0);
btrfs_block_rsv_release(root, trans->block_rsv, num_bytes);
if (ret)
diff --git a/fs/btrfs/props.h b/fs/btrfs/props.h
index 100f188..dcbccf9 100644
--- a/fs/btrfs/props.h
+++ b/fs/btrfs/props.h
@@ -29,6 +29,13 @@ int btrfs_set_prop(struct inode *inode,
size_t value_len,
int flags);
+int btrfs_set_prop_trans(struct btrfs_trans_handle *trans,
+ struct inode *inode,
+ const char *name,
+ const char *value,
+ size_t value_len,
+ int flags);
+
int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path);
int btrfs_inode_inherit_props(struct btrfs_trans_handle *trans,
-- 1.8.3.1
next prev parent reply other threads:[~2014-09-25 5:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 8:45 [PATCH 1/4] btrfs: correct empty compression property behavior Satoru Takeuchi
2014-09-19 8:48 ` [PATCH 2/4] btrfs: introduce new compression property to disable compression at all Satoru Takeuchi
2014-09-19 8:52 ` [PATCH 3/4] btrfs: export __btrfs_set_prop Satoru Takeuchi
2014-09-19 9:05 ` [PATCH 4/4] btrfs: Fix compression related ioctl to run atomic operations in one transaction Satoru Takeuchi
2014-09-25 5:57 ` [PATCH v2 " Satoru Takeuchi
2014-09-22 12:01 ` [PATCH 3/4] btrfs: export __btrfs_set_prop David Sterba
2014-09-25 5:55 ` Satoru Takeuchi [this message]
2014-09-29 16:23 ` [PATCH v2 3/4] btrfs: Rename and export __btrfs_set_prop to be called from running transaction David Sterba
2014-09-29 16:36 ` [PATCH 1/4] btrfs: correct empty compression property behavior David Sterba
2014-10-16 1:37 ` Satoru Takeuchi
2014-10-16 7:01 ` Filipe David Manana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5423AE51.8060701@jp.fujitsu.com \
--to=takeuchi_satoru@jp.fujitsu.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=fdmanana@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.