Move dmap free worker kicker inside the critical region, so that extra
spinlock lock/unlock could be avoided.
Suggested-by: Liu Jiang
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index d7d3a7f06862
accordingly if the file is capable of per-file DAX.
Currently only ext4/xfs since linux kernel v5.8 support storing
FS_DAX_FL flag persistently, and thus advertise support for per-file
DAX feature only when the backend fs type is ext4 and xfs.
Signed-off-by: Jeffle Xu
---
tools/virtiofsd
For passthrough, when the corresponding virtiofs in guest is mounted
with '-o dax=inode', advertise that the file is capable of per-file
DAX if the inode in the backend fs is marked with FS_DAX_FL flag.
Signed-off-by: Jeffle Xu
---
tools/virtiofsd/passthrough
4 in v2 is incomplete by mistake and it will fail to be compiled.
I had ever sent a seperate patch 4 of v3. Now I send the whole complete
set in v4. Except for this, there's no other diferrence.
Jeffle Xu (4):
virtiofsd: add .ioctl() support
virtiofsd: expand fuse protocol to support per
supported. Later we can restrict
the flags/attributes allowed to be set to reinforce the security, or
extend the scope of allowed ioctls if it is really needed later.
Signed-off-by: Jeffle Xu
---
tools/virtiofsd/passthrough_ll.c | 53 +++
tools/virtiofsd
Signed-off-by: Jeffle Xu
---
include/standard-headers/linux/fuse.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/standard-headers/linux/fuse.h
b/include/standard-headers/linux/fuse.h
index 950d7edb7e..7bd006ffcb 100644
--- a/include/standard-headers/linux/fuse.h
+++ b/include
inux-fsdevel/msg200852.html
v2: https://www.spinics.net/lists/linux-fsdevel/msg199584.html
v1: https://www.spinics.net/lists/linux-virtualization/msg51008.html
Jeffle Xu (8):
fuse: add fuse_should_enable_dax() helper
fuse: Make DAX mount option a tri-state
fuse: support per-file DAX
fuse:
Prior of this patch, the mount option will still show '-o dax=inode'
when FUSE server advertises that it doesn't support per-file DAX.
Signed-off-by: Jeffle Xu
---
fs/fuse/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/inode.c b/fs/fus
Fuse client can enable or disable per-file DAX inside kernel/guest by
chattr(1). Similarly the new state won't be updated until the file is
closed and reopened later.
Signed-off-by: Jeffle Xu
---
fs/fuse/ioctl.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff
;t be updated until this file is closed
and reopened later.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c| 9 +
fs/fuse/fuse_i.h | 1 +
fs/fuse/inode.c | 3 +++
3 files changed, 13 insertions(+)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 30833f8d37dd..f7ede0be4e00 100644
--- a/fs
Enable per-file DAX if fuse server advertises that the file supports
that.
Currently the state whether the file enables DAX or not is initialized
only when inode is instantiated.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c| 12
fs/fuse/file.c | 4 ++--
fs/fuse/fuse_i.h | 4
request accordingly.
Requirements for client:
- capable of handling per-file DAX when receiving FUSE_ATTR_DAX.
Signed-off-by: Jeffle Xu
---
fs/fuse/fuse_i.h | 3 +++
fs/fuse/inode.c | 12
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/fs/fuse/fuse_i.h b/fs/fuse
FUSE_LOOKUP request.
Signed-off-by: Jeffle Xu
---
include/uapi/linux/fuse.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 36ed092227fa..15a1f5fc0797 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux
This is in prep for following per-file DAX checking.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 0e5407f48e6a..c6f4e82e65f3 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1336,11
We add 'always', 'never', and 'inode' (default). '-o dax' continues to
operate the same which is equivalent to 'always'.
By the time this patch is applied, 'inode' mode is actually equal to
'always' mode, before the per-file DA
ated to be same with that on host
side, the end result is that O_TRUNC semantic is broken.
This disables atomic_o_trunc as well if with no_open.
Reviewed-by: Peng Tao
Signed-off-by: Liu Bo
Signed-off-by: Jeffle Xu
---
fs/fuse/file.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-
From: Liu Bo
Since %req has been removed from fpq->processing_list, no one except
request_wait_answer() is looking at this %req and request_wait_answer()
waits only on FINISH flag, it's OK to remove fpq->lock after %req is
dropped from the list.
Signed-off-by: Liu Bo
Signed-off-by
Some fixes or optimization for virtiofs, which are authored by Liu Bo.
Liu Bo (2):
virtio-fs: disable atomic_o_trunc if no_open is enabled
virtiofs: reduce lock contention on fpq->lock
fs/fuse/file.c | 11 +--
fs/fuse/virtio_fs.c | 3 ---
2 files changed, 9 insertions(+), 5 del
For passthrough, when the corresponding virtiofs in guest is mounted
with '-o dax=inode', advertise that the file is capable of per-file
DAX if the inode in the backend fs is marked with FS_DAX_FL flag.
Signed-off-by: Jeffle Xu
---
Sorry I forget to add staged changes to the lat
For passthrough, when the corresponding virtiofs in guest is mounted
with '-o dax=inode', advertise that the file is capable of per-file
DAX if the inode in the backend fs is marked with FS_DAX_FL flag.
Signed-off-by: Jeffle Xu
---
tools/virtiofsd/passthrough
Signed-off-by: Jeffle Xu
---
include/standard-headers/linux/fuse.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/standard-headers/linux/fuse.h
b/include/standard-headers/linux/fuse.h
index 950d7edb7e..7bd006ffcb 100644
--- a/include/standard-headers/linux/fuse.h
+++ b/include
accordingly if the file is capable of per-file DAX.
Currently only ext4/xfs since linux kernel v5.8 support storing
FS_DAX_FL flag persistently, and thus advertise support for per-file
DAX feature only when the backend fs type is ext4 and xfs.
Signed-off-by: Jeffle Xu
---
tools/virtiofsd
supported. Later we can restrict
the flags/attributes allowed to be set to reinforce the security, or
extend the scope of allowed ioctls if it is really needed later.
Signed-off-by: Jeffle Xu
---
tools/virtiofsd/passthrough_ll.c | 53 +++
tools/virtiofsd
implementation, the kernel always advertise
FUSE_PERFILE_DAX no matter whether it's mounted with '-o dax=inode' or
not. It can be fixed in the next version, and I need more feedbacks so far.
Any comment on this whole series is welcome.
Jeffle Xu (4):
virtiofsd: add .ioctl() support
vi
Signed-off-by: Jeffle Xu
---
include/standard-headers/linux/fuse.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/standard-headers/linux/fuse.h
b/include/standard-headers/linux/fuse.h
index 950d7edb7e..7bd006ffcb 100644
--- a/include/standard-headers/linux/fuse.h
+++ b/include
Signed-off-by: Jeffle Xu
---
tools/virtiofsd/fuse_common.h| 5 +
tools/virtiofsd/fuse_lowlevel.c | 6 ++
tools/virtiofsd/passthrough_ll.c | 3 +++
3 files changed, 14 insertions(+)
diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
index 8a75729be9
Signed-off-by: Jeffle Xu
---
tools/virtiofsd/passthrough_ll.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index da88304253..1a472ce7f0 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd
still used for test only, marking files larger
than 1MB shall enable per-file DAX.
Jeffle Xu (3):
virtiofsd: expand fuse protocol to support per-file DAX
virtiofsd: support per-file DAX negotiation in FUSE_INIT
virtiofsd: support per-file DAX in FUSE_LOOKUP
include/standard-headers/linux/
t option a tri-state")
v2: https://www.spinics.net/lists/linux-fsdevel/msg199584.html
v1: https://www.spinics.net/lists/linux-virtualization/msg51008.html
Jeffle Xu (8):
fuse: add fuse_should_enable_dax() helper
fuse: Make DAX mount option a tri-state
fuse: support per-file DAX
fuse: n
Enable per-file DAX if fuse server advertises that the file supports
that.
Currently the state whether the file enables DAX or not is initialized
only when inode is instantiated.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c| 12
fs/fuse/file.c | 4 ++--
fs/fuse/fuse_i.h | 4
Prior of this patch, the mount option will still show '-o dax=inode'
when FUSE server advertises that it doesn't support per-file DAX.
Signed-off-by: Jeffle Xu
---
fs/fuse/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/inode.c b/fs/fus
request accordingly.
Requirements for client:
- capable of handling per-file DAX when receiving FUSE_ATTR_DAX.
Signed-off-by: Jeffle Xu
---
fs/fuse/fuse_i.h | 3 +++
fs/fuse/inode.c | 12 +++-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/fs/fuse/fuse_i.h b/fs/fuse
FUSE_LOOKUP request.
Signed-off-by: Jeffle Xu
---
include/uapi/linux/fuse.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 36ed092227fa..15a1f5fc0797 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux
;t be updated until this file is closed
and reopened later.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c| 9 +
fs/fuse/fuse_i.h | 1 +
fs/fuse/inode.c | 3 +++
3 files changed, 13 insertions(+)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 30833f8d37dd..14bc5b9a0576 100644
--- a/fs
We add 'always', 'never', and 'inode' (default). '-o dax' continues to
operate the same which is equivalent to 'always'.
By the time this patch is applied, 'inode' mode is actually equal to
'always' mode, before the per-file DA
Fuse client can enable or disable per-file DAX inside kernel/guest by
chattr(1). Similarly the new state won't be updated until the file is
closed and reopened later.
Signed-off-by: Jeffle Xu
---
fs/fuse/ioctl.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff
This is in prep for following per-file DAX checking.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 0e5407f48e6a..c6f4e82e65f3 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1336,11
We add 'always', 'never', and 'inode' (default). '-o dax' continues to
operate the same which is equivalent to 'always'.
By the time this patch is applied, 'inode' mode is actually equal to
'always' mode, before the per-file DA
flags retrieved
by FUSE LOOKUP routine, while the algorithm constructing fuse_attr.flags
is totally fuse server specific, not to mention ioctl may not be
supported by fuse server at all.
Signed-off-by: Jeffle Xu
---
fs/fuse/ioctl.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --
Add one flag for fuse_attr.flags indicating if DAX shall be enabled for
this file.
When the per-file DAX flag changes for an *opened* file, the state of
the file won't be updated until this file is closed and reopened later.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c
This is in prep for following per-file DAX checking.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 0e5407f48e6a..c6f4e82e65f3 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1336,11
nics.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 +
An example implementation of supporting per-file DAX flag for virtiofsd,
where DAx is enabled for files larger than 1M size.
Signed-off-by: Jeffle Xu
---
contrib/virtiofsd/fuse_kernel.h | 4 +++-
contrib/virtiofsd/fuse_lowlevel.c | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff
We add 'always', 'never', and 'inode' (default). '-o dax' continues to
operate the same which is equivalent to 'always'.
By the time this patch is applied, 'inode' mode is actually equal to
'always' mode, before the per-file DA
nside
guest kernel, e.g., by chattr(1).
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c | 28
fs/fuse/file.c| 4 ++--
fs/fuse/fuse_i.h | 5 +++--
fs/fuse/inode.c | 4 +++-
include/uapi/linux/fuse.h | 5 +
5 files change
This is in prep for following per-file DAX checking.
Signed-off-by: Jeffle Xu
---
fs/fuse/dax.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 0e5407f48e6a..97b8bd09baa3 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1336,11
ernel, e.g., by chattr(1).
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")
Jeffle Xu (3):
fuse: add fuse_should_enable_dax() helper
fuse: Make DAX mount
47 matches
Mail list logo