From: Wengang Wang <wen.gang.wang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V5)
Date: Mon, 02 Mar 2009 10:16:00 +0800 [thread overview]
Message-ID: <49AB4160.8050609@oracle.com> (raw)
In-Reply-To: <20090228022236.GK10695@mail.oracle.com>
>
>> + bg_blkno = ocfs2_which_suballoc_group(blkno, bit);
>> + status = ocfs2_read_group_descriptor(suballoc, alloc_fe, bg_blkno,
>> + &group_bh);
>> + if (status < 0) {
>> + mlog(ML_ERROR, "read group %llu failed %d\n", bg_blkno, status);
>> + goto bail;
>> + }
>> +
>> + status = ocfs2_check_group_descriptor(osb->sb, alloc_fe, group_bh);
>> + if (status < 0) {
>> + mlog(ML_ERROR, "check group %llu faild %d\n", bg_blkno, status);
>> + goto bail;
>> + }
>
> The call to ocfs2_read_group_descriptor() already does the same
> checkin as ocfs2_check_group_descriptor(), so you don't need to call
> ocfs2_check_group_descriptor().
ah, yes. I only verified that ocfs2_check_group_descriptor() is not
called in ocfs2_read_group_descriptor(). but didn't notice the same
contents are done in ocfs2_read_group_descriptor() as well.
will repost as V6.
> Other than that, I think this patch is done! Do you have a test
> to test it?
I tested against V4 which checks group without sub allocator cluster
lock taken.
the test case is:
1) 2 nodes env
2) each node exports ocfs2 fs(/wwg-ocfs2_test).
3) each node does the script:
OCFS2_TOP=/wwg-ocfs2-test
TOP_DIR=/ocfs2-export
write_thread()
{
while [ 1 ] ; do
host=`/bin/hostname`
/bin/rm -rf $TOP_DIR/$host
/bin/mkdir $TOP_DIR/$host
/bin/cp -r /usr/share $TOP_DIR/$host/
done
}
mkdir $OCFS2_TOP $TOP_DIR
mount -L ocfs2_anti_stale $OCFS2_TOP
mount -o nordirplus 127.0.0.1:/${OCFS2_TOP} ${TOP_DIR}
write_thread&
while [ 1 ]; do
ls -lR $TOP_DIR >/dev/null 2>&1
done
is it enough?
regards,
wengang.
next prev parent reply other threads:[~2009-03-02 2:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 12:33 [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V5) wengang wang
2009-02-28 2:22 ` Joel Becker
2009-03-02 2:16 ` Wengang Wang [this message]
2009-03-02 8:08 ` Joel Becker
2009-03-02 8:28 ` Wengang Wang
2009-03-02 21:57 ` Joel Becker
2009-03-03 2:28 ` Wengang Wang
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=49AB4160.8050609@oracle.com \
--to=wen.gang.wang@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.