From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: fix a refcount condition checking
Date: Fri, 05 Feb 2010 10:30:59 +0800 [thread overview]
Message-ID: <4B6B82E3.4010209@oracle.com> (raw)
In-Reply-To: <20100205022332.GA3708@laptop.oracle.com>
Wengang Wang wrote:
> Hi Tao,
>
> On 10-02-05 08:58, Tao Ma wrote:
>> Hi wengang,
>>
>> Wengang Wang wrote:
>>> Hi Joel/Tao,
>>>
>>> I don't know the reflink very well, so please ignore this patch if I am wrong.
>>>
>>> I think in ocfs2_prepare_inode_for_write(), we disable DIO write if the inode
>>> has reflink.
>>> If am right, the way we determine if the inode has reflink is wrong in case
>>> (!has_refcount && direct_io).
>> I just check the caller, all these 2 parameters are either set or NULL
>> simultaneously. You patch only make sense in (!has_refcount &&
>> direct_io), but currently we don't have such a case. So why bother
>> adding redundant code for a not-exist case?
>
> Yes that current calling has no problem. But such interface has potential danger
> for callers in future.
> If you don't like change code, I think it's better to add comment that
> has_refcount and direct_io must be both NULL or both non-NULL.
Add it please as you wish.
Regards,
Tao
next prev parent reply other threads:[~2010-02-05 2:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 21:20 [Ocfs2-devel] [PATCH] ocfs2: fix a refcount condition checking Wengang Wang
2010-02-05 0:58 ` Tao Ma
2010-02-05 2:23 ` Wengang Wang
2010-02-05 2:30 ` Tao Ma [this message]
2010-02-05 3:21 ` Wengang Wang
2010-02-09 1:06 ` Joel Becker
2010-02-09 1:15 ` Tao Ma
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=4B6B82E3.4010209@oracle.com \
--to=tao.ma@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.