From: jiangyiwen <jiangyiwen@huawei.com>
To: Eric Van Hensbergen <ericvh@gmail.com>,
Ron Minnich <rminnich@sandia.gov>,
Latchesar Ionkov <lucho@ionkov.net>,
v9fs-developer@lists.sourceforge.net
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
sochin.jiang@huawei.com,
Eduard Shishkin <Eduard.Shishkin@huawei.com>,
"Xulei (Stone)" <stone.xulei@huawei.com>
Subject: [V9fs-developer] [bug report] fs/9p: inode blocks show error in fscache mode
Date: Wed, 22 Nov 2017 09:31:06 +0000 [thread overview]
Message-ID: <5A1543DA.30504@huawei.com> (raw)
Hi all,
I test a scenario that will cause the difference of inode blocks
between client and host, the scenario as follows:
Precondition:
1) use VirtFS(virtio-9p) to connect guest and host.
2) 9p dir in guest is /mnt/9p, host is /9p-host.
3) server fs is ext4 and block size is 4096.
Test steps:
1) on the client(guest)
# touch /mnt/9p/test/file
# dd if=/dev/zero of=/mnt/9p/test/file bs=1 count\x1043456 seek\x1302528 conv=notrunc
2) on the client(guest)
# stat /mnt/9p/test/file
the file's blocks is 4582 blocks(block size is 512)
3) on the server(host)
# stat /9p-host/test/file
the file's blocks is 2040 blocks(block size is 512)
Cause analysis:
Because the file is sparse file, so in function v9fs_write_end will
update inode blocks according to difference between last_pos and
inode_size, only when last_pos is larger than the inode_size, then it
update the blocks and inode_size, the operation is not fit the sparse
file.
Currently I want to call v9fs_invalidate_inode_attr to invalidate inode,
but it will influence the performance, so I don't have a good solution.
Please advise. Thanks in advance!
Best regards,
Yiwen
WARNING: multiple messages have this Message-ID (diff)
From: jiangyiwen <jiangyiwen@huawei.com>
To: Eric Van Hensbergen <ericvh@gmail.com>,
Ron Minnich <rminnich@sandia.gov>,
Latchesar Ionkov <lucho@ionkov.net>,
<v9fs-developer@lists.sourceforge.net>
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<sochin.jiang@huawei.com>,
Eduard Shishkin <Eduard.Shishkin@huawei.com>,
"Xulei (Stone)" <stone.xulei@huawei.com>
Subject: [V9fs-developer] [bug report] fs/9p: inode blocks show error in fscache mode
Date: Wed, 22 Nov 2017 17:31:06 +0800 [thread overview]
Message-ID: <5A1543DA.30504@huawei.com> (raw)
Hi all,
I test a scenario that will cause the difference of inode blocks
between client and host, the scenario as follows:
Precondition:
1) use VirtFS(virtio-9p) to connect guest and host.
2) 9p dir in guest is /mnt/9p, host is /9p-host.
3) server fs is ext4 and block size is 4096.
Test steps:
1) on the client(guest)
# touch /mnt/9p/test/file
# dd if=/dev/zero of=/mnt/9p/test/file bs=1 count=1043456 seek=1302528 conv=notrunc
2) on the client(guest)
# stat /mnt/9p/test/file
the file's blocks is 4582 blocks(block size is 512)
3) on the server(host)
# stat /9p-host/test/file
the file's blocks is 2040 blocks(block size is 512)
Cause analysis:
Because the file is sparse file, so in function v9fs_write_end will
update inode blocks according to difference between last_pos and
inode_size, only when last_pos is larger than the inode_size, then it
update the blocks and inode_size, the operation is not fit the sparse
file.
Currently I want to call v9fs_invalidate_inode_attr to invalidate inode,
but it will influence the performance, so I don't have a good solution.
Please advise. Thanks in advance!
Best regards,
Yiwen
next reply other threads:[~2017-11-22 9:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 9:31 jiangyiwen [this message]
2017-11-22 9:31 ` [V9fs-developer] [bug report] fs/9p: inode blocks show error in fscache mode jiangyiwen
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=5A1543DA.30504@huawei.com \
--to=jiangyiwen@huawei.com \
--cc=Eduard.Shishkin@huawei.com \
--cc=ericvh@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=rminnich@sandia.gov \
--cc=sochin.jiang@huawei.com \
--cc=stone.xulei@huawei.com \
--cc=v9fs-developer@lists.sourceforge.net \
/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.