All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] virtiofs,fuse: support per-file DAX
@ 2021-07-16 10:47 ` Jeffle Xu
  0 siblings, 0 replies; 50+ messages in thread
From: Jeffle Xu @ 2021-07-16 10:47 UTC (permalink / raw)
  To: vgoyal, stefanha, miklos; +Cc: linux-fsdevel, virtualization, bo.liu, joseph.qi

This patchset adds support of per-file DAX for virtiofs, which is
inspired by Ira Weiny's work on ext4[1] and xfs[2].

There are three related scenarios:
1. Alloc inode: get per-file DAX flag from fuse_attr.flags. (patch 3)
2. Per-file DAX flag changes when the file has been opened. (patch 3)
In this case, the dentry and inode are all marked as DONT_CACHE, and
the DAX state won't be updated until the file is closed and reopened
later.
3. Users can change the per-file DAX flag inside the guest by chattr(1).
(patch 4)
4. Create new files under directories with DAX enabled. When creating
new files in ext4/xfs on host, the new created files will inherit the
per-file DAX flag from the directory, and thus the new created files in
virtiofs will also inherit the per-file DAX flag if the fuse server
derives fuse_attr.flags from the underlying ext4/xfs inode's per-file
DAX flag.


Any comment is welcome.

[1] commit 9cb20f94afcd ("fs/ext4: Make DAX mount option a tri-state")
[2] commit 02beb2686ff9 ("fs/xfs: Make DAX mount option a tri-state")


changes since v1:
- add support for changing per-file DAX flags inside guest (patch 4)

v1:https://www.spinics.net/lists/linux-virtualization/msg51008.html

Jeffle Xu (4):
  fuse: add fuse_should_enable_dax() helper
  fuse: Make DAX mount option a tri-state
  fuse: add per-file DAX flag
  fuse: support changing per-file DAX flag inside guest

 fs/fuse/dax.c             | 36 ++++++++++++++++++++++++++++++++++--
 fs/fuse/file.c            |  4 ++--
 fs/fuse/fuse_i.h          | 16 ++++++++++++----
 fs/fuse/inode.c           |  7 +++++--
 fs/fuse/ioctl.c           |  9 ++++++---
 fs/fuse/virtio_fs.c       | 16 ++++++++++++++--
 include/uapi/linux/fuse.h |  5 +++++
 7 files changed, 78 insertions(+), 15 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2021-08-04  6:52 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 10:47 [PATCH v2 0/4] virtiofs,fuse: support per-file DAX Jeffle Xu
2021-07-16 10:47 ` Jeffle Xu
2021-07-16 10:47 ` [PATCH v2 1/4] fuse: add fuse_should_enable_dax() helper Jeffle Xu
2021-07-16 10:47   ` Jeffle Xu
2021-07-16 10:47 ` [PATCH v2 2/4] fuse: Make DAX mount option a tri-state Jeffle Xu
2021-07-16 10:47   ` Jeffle Xu
2021-07-19 18:02   ` Vivek Goyal
2021-07-19 18:02     ` Vivek Goyal
2021-07-20  5:54     ` JeffleXu
2021-07-20  5:54       ` JeffleXu
2021-07-16 10:47 ` [PATCH v2 3/4] fuse: add per-file DAX flag Jeffle Xu
2021-07-16 10:47   ` Jeffle Xu
2021-07-19 18:41   ` Vivek Goyal
2021-07-19 18:41     ` Vivek Goyal
2021-07-20  7:19     ` JeffleXu
2021-07-20  7:19       ` JeffleXu
2021-07-20 19:40       ` Vivek Goyal
2021-07-20 19:40         ` Vivek Goyal
2021-07-21 12:35         ` JeffleXu
2021-07-21 12:35           ` JeffleXu
2021-07-19 19:44   ` Vivek Goyal
2021-07-19 19:44     ` Vivek Goyal
2021-07-20  6:51     ` JeffleXu
2021-07-20  6:51       ` JeffleXu
2021-07-20  9:22       ` JeffleXu
2021-07-20  9:22         ` JeffleXu
2021-07-20 19:27       ` Vivek Goyal
2021-07-20 19:27         ` Vivek Goyal
2021-07-21 14:14         ` JeffleXu
2021-07-21 14:14           ` JeffleXu
2021-07-21 14:40           ` Vivek Goyal
2021-07-21 14:40             ` Vivek Goyal
2021-07-16 10:47 ` [PATCH v2 4/4] fuse: support changing per-file DAX flag inside guest Jeffle Xu
2021-07-16 10:47   ` Jeffle Xu
2021-07-19 19:54   ` Vivek Goyal
2021-07-19 19:54     ` Vivek Goyal
2021-07-19 21:30 ` [PATCH v2 0/4] virtiofs,fuse: support per-file DAX Vivek Goyal
2021-07-19 21:30   ` Vivek Goyal
2021-07-20  5:25   ` JeffleXu
2021-07-20  5:25     ` JeffleXu
2021-07-20 19:18     ` Vivek Goyal
2021-07-20 19:18       ` Vivek Goyal
2021-07-21 12:32       ` JeffleXu
2021-07-21 12:32         ` JeffleXu
2021-07-21 12:48         ` Vivek Goyal
2021-07-21 12:48           ` Vivek Goyal
2021-07-21 14:42           ` Vivek Goyal
2021-07-21 14:42             ` Vivek Goyal
2021-08-04  6:51             ` JeffleXu
2021-08-04  6:51               ` JeffleXu

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.