From: Vivek Goyal <vgoyal@redhat.com>
To: Liu Bo <bo.liu@linux.alibaba.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] data integrity in dax mode
Date: Tue, 2 Jul 2019 13:43:58 -0400 [thread overview]
Message-ID: <20190702174358.GA30547@redhat.com> (raw)
In-Reply-To: <20190702055937.3ffpwph7anvohmxu@US-160370MP2.local>
On Mon, Jul 01, 2019 at 10:59:38PM -0700, Liu Bo wrote:
> Hi,
>
> I have a concern about data integrity in dax mode.
>
> For now virtio_fs_copy_from_iter() (i.e. the write direction) only
> does copy_from_iter(), which doesn't enforce a clean_cache_range or
> CLWB.
This is an interesting question and I had been wondring about it when
I wrote the code.
I could not justify the need of calling "clwb". Whatever we write will
be in host page cache (assuming dir is not pmem backed). And when app
in guest does fsync/msync, only then there are any guarantees that
data is persistent.
IOW, we are not offering pmem programming interface where msync can
be avoided by applications. Apps still need to call in fsync/msync
to ensure that data has been saved to persistent storage. And if
that happens, I am not sure why clwb needs to be called.
> And even worse, virtio-fs doesn't have a dax_writepages like,
> which can calls dax_writeback_mapping_range().
>
> Correct me if I'm wrong, but did virtio-fs solve it in some way?
We define address space operations for dax.
static const struct address_space_operations fuse_dax_file_aops = {
.writepages = fuse_dax_writepages,
.direct_IO = noop_direct_IO,
.set_page_dirty = noop_set_page_dirty,
.invalidatepage = noop_invalidatepage,
};
And fuse_dax_writepages() will call dax_writeback_mapping_range().
Thanks
Vivek
next prev parent reply other threads:[~2019-07-02 17:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 5:59 [Virtio-fs] data integrity in dax mode Liu Bo
2019-07-02 17:43 ` Vivek Goyal [this message]
2019-07-02 19:00 ` Liu Bo
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=20190702174358.GA30547@redhat.com \
--to=vgoyal@redhat.com \
--cc=bo.liu@linux.alibaba.com \
--cc=virtio-fs@redhat.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.