All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Gang He <GHe@suse.com>,
	"ocfs2-devel@oss.oracle.com" <ocfs2-devel@oss.oracle.com>,
	"Markov, Andrey" <Markov.Andrey@Dell.com>,
	Junxiao Bi <junxiao.bi@oracle.com>
Subject: Re: [Ocfs2-devel] The last part of the file is zeroed out when write N random bytes
Date: Mon, 27 Sep 2021 15:49:44 +0800	[thread overview]
Message-ID: <816ee511-5764-aeed-4554-83b91de8e06e@linux.alibaba.com> (raw)
In-Reply-To: <AM6PR04MB6488C35E2103DFC0BF4AF896CFA79@AM6PR04MB6488.eurprd04.prod.outlook.com>


Last week, Andrey Markov reported a similar issue, but unfortunately not
on mail list.

And Junxiao has resolved a similar issue recently. So can you reproduce
the bug in latest kernel?

Thanks,
Joseph

On 9/27/21 3:16 PM, Gang He wrote:
> Hi List,
> 
> I'd like to report a data loss bug when write N random bytes, since I saw there were some related commits in the past weeks.
> I can reproduce this bug stably with the latest ocfs2 kernel module code as below,
> 1) Create a three node(e.g. ghe-tw-nd1, ghe-tw-nd2, ghe-tw-nd3) ocfs2 cluster, attach a shared disk(e.g. /dev/vdb).
> 2) Format the disk with the command "mkfs.ocfs2 -N 4 -b 4096 -C 1048576 /dev/vdb", and mount the disk to /mnt/shared on each node. The cluster size must be greater than 4K, this is the key to the problem.
> 3) Copy the file write/test scripts to /mnt/shared directory, then run test script on node1 to reproduce this bug. 
>     file write script ocfs2_fallocate_bug_plain_write.py: https://pastebin.com/QsXcD8rq
>     file test script ocfs2_loop.sh: https://pastebin.com/eTUe2hkW
> 4) Then, you can meet this bug, the file md5sum is different between from node1 and from node2.
>     In fact, the last part of the file is zeroed out from node2.
>     e.g.
>     file dump from node1: https://pastebin.com/HB92TVS0
>     file dump from node2: https://pastebin.com/jBG7HdSz
> 
> More information, 
> this bug does not exist on some old kernels( e.g. linux-4.12.14-120), but it will happen on some new kernels, I feel this bug is probably NOT caused by ocfs2 commits, since I used old ocfs2 kernel module code on the new kernels, the problem also happened.
> Anyway, if you have any comments, please reply this mail.
>  
> Thanks
> Gang
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
> 

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

  reply	other threads:[~2021-09-27  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  7:16 [Ocfs2-devel] The last part of the file is zeroed out when write N random bytes Gang He
2021-09-27  7:49 ` Joseph Qi [this message]
2021-09-27  7:57   ` Gang He
2021-09-29  0:57     ` Gang He

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=816ee511-5764-aeed-4554-83b91de8e06e@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=GHe@suse.com \
    --cc=Markov.Andrey@Dell.com \
    --cc=junxiao.bi@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.