From: Tiger Yang <tiger.yang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/xattr: Restore not_found in xis.
Date: Wed, 19 Nov 2008 22:25:00 +0800 [thread overview]
Message-ID: <492421BC.7020304@oracle.com> (raw)
In-Reply-To: <1227084522-5012-2-git-send-email-tao.ma@oracle.com>
how quickly you solve this problem! I also found this problem with my
test script but forgot to tell you when you address the first problem.
thanks,
tiger
Tao Ma wrote:
> In xattr set, when we move a xattr which was stored in inode to
> the outside bucket, we have to delete it and it will use the old
> "xis->not_found", but it is removed by the ocfs2_calc_xattr_set_need.
> So restore it.
>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
> ---
> fs/ocfs2/xattr.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index 1504c6b..7d6307f 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -2414,7 +2414,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
> struct ocfs2_xattr_search *xbs,
> struct ocfs2_xattr_set_ctxt *ctxt)
> {
> - int ret = 0, credits;
> + int ret = 0, credits, old_found;
>
> if (!xi->value) {
> /* Remove existing extended attribute */
> @@ -2433,6 +2433,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
> xi->value = NULL;
> xi->value_len = 0;
>
> + old_found = xis->not_found;
> xis->not_found = -ENODATA;
> ret = ocfs2_calc_xattr_set_need(inode,
> di,
> @@ -2442,6 +2443,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
> NULL,
> NULL,
> &credits);
> + xis->not_found = old_found;
> if (ret) {
> mlog_errno(ret);
> goto out;
> @@ -2462,6 +2464,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
> if (ret)
> goto out;
>
> + old_found = xis->not_found;
> xis->not_found = -ENODATA;
> ret = ocfs2_calc_xattr_set_need(inode,
> di,
> @@ -2471,6 +2474,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
> NULL,
> NULL,
> &credits);
> + xis->not_found = old_found;
> if (ret) {
> mlog_errno(ret);
> goto out;
next prev parent reply other threads:[~2008-11-19 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 8:52 [Ocfs2-devel] [PATCH 0/2] 2 bug fix for xattr set transaction merge Tao Ma
2008-11-19 8:48 ` [Ocfs2-devel] [PATCH] ocfs2/xattr: Fix a bug in xattr allocation guess Tao Ma
2008-11-19 8:48 ` [Ocfs2-devel] [PATCH] ocfs2/xattr: Restore not_found in xis Tao Ma
2008-11-19 14:25 ` Tiger Yang [this message]
2008-11-19 23:32 ` [Ocfs2-devel] [PATCH 0/2] 2 bug fix for xattr set transaction merge Mark Fasheh
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=492421BC.7020304@oracle.com \
--to=tiger.yang@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/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.