FUSE passthrough fixes
Subsystems (3)
Amir Goldstein
maintainercover FUSE passthrough fixes
Miklos,
While going over the code to prepare for getattr() passthrough I experienced a WTF moment that resulted in the two fix patches.
Patch 3/3 is included for reference and to give Sweet Tea a starting point for getattr() passthrough.
What puzzled me is that some ff->iomode state bugs were so blunt that I needed to figure out how I did not see any WARN_ON in my tests of rc1. There are different reasons for different types of bugs.
1. For concurrent dio writes without any passthrough open, fuse_file_cached_io_start() was supposed to hit WARN_ON(ff->iomode == IOM_UNCACHED) if there is already a dio write in-flight.
My conclusion is that the set of fstests that run on passthrough_hp, on my small test VM do not excercise concurrent dio writes.
2. For dio write, where the file was opened passthrough, every write was going to hit WARN_ON(ff->iomode == IOM_UNCACHED) and also fuse_file_cached_io_end() was going to set ff->iomode == IOM_NONE and leak the fuse_backing object.
However, the bug fixed by patch 2/3 made sure that parallel dio write would always fallback to exclusive dio if file was open with a backing file.
Testing:
I ran fstests with passthrough_hp with options:
1) FOPEN_PASSTHROUGH
2) FOPEN_DIRECT_IO | FOPEN_PARALLEL_DIRECT_WRITES
3) FOPEN_PASSTHROUGH | FOPEN_DIRECT_IO | FOPEN_PARALLEL_DIRECT_WRITES
Did not observe any regressions (not any improvments) from rc1.
Ran some multi threads aiodio tests with just patch 2/3 and the assertions in fuse_evict_inode() from patch 3/3.
First two configs did not hit any assertion.
The passthrough+direct_io+parallel_direct_writes config always hits the assertion in fuse_file_cached_io_start() and always hits the leaked fuse_backing assertion in fuse_evict_inode().
Bernd do you have different tests to cover concurrent dio writes in your setup? Any ideas on how to improve the fstests test coverage?
Thanks,
Amir.
Amir Goldstein (3):
fuse: fix wrong ff->iomode state changes from parallel dio write
fuse: fix parallel dio write on file open in passthrough mode
fuse: prepare for long lived reference on backing file
fs/fuse/file.c | 18 +++++++----- fs/fuse/fuse_i.h | 10 +++++-- fs/fuse/inode.c | 7 +++++ fs/fuse/iomode.c | 73 +++++++++++++++++++++++++++++++++--------------- 4 files changed, 76 insertions(+), 32 deletions(-)
Signature · 1 line
2.34.1
Amir Goldstein
maintainerPATCH 1/3 fuse: fix wrong ff->iomode state changes from parallel dio write
There is a confusion with fuse_file_uncached_io_{start,end} interface. These helpers do two things when called from passthrough open()/release():
1. Take/drop negative refcount of fi->iocachectr (inode uncached io mode)
2. State change ff->iomode IOM_NONE <-> IOM_UNCACHED (file uncached open)
The calls from parallel dio write path need to take a reference on fi->iocachectr, but they should not be changing ff->iomode state, because in this case, the fi->iocachectr reference does not stick around until file release().
Factor out helpers fuse_inode_uncached_io_{start,end}, to be used from parallel dio write path and rename fuse_file_*cached_io_{start,end} helpers to fuse_file_*cached_io_{open,release} to clarify the difference.
Add a check of ff->iomode in mmap(), so that fuse_file_cached_io_open() is called only on first mmap of direct_io file.
--- fs/fuse/file.c | 18 +++++++++------ fs/fuse/fuse_i.h | 7 +++--- fs/fuse/inode.c | 1 + fs/fuse/iomode.c | 59 ++++++++++++++++++++++++++++++++---------------- 4 files changed, 56 insertions(+), 29 deletions(-)
fs/fuse/file.c +11 -7
@@ -1362,7 +1362,7 @@ static void fuse_dio_lock(struct kiocb *iocb, struct iov_iter *from, bool *exclusive) {struct inode *inode =file_inode (iocb->ki_filp); -struct fuse_file *ff = iocb->ki_filp->private_data; +struct fuse_inode *fi =get_fuse_inode (inode); *exclusive =fuse_dio_wr_exclusive_lock (iocb, from);if (*exclusive) {
@@ -1377,7 +1377,7 @@ static void fuse_dio_lock(struct kiocb *iocb, struct iov_iter *from,* have raced, so check it again. */ if (fuse_io_past_eof (iocb, from) || -fuse_file_uncached_io_start (inode, ff,NULL ) !=0 ) { +fuse_inode_uncached_io_start (fi,NULL ) !=0 ) {inode_unlock_shared (inode);inode_lock (inode); *exclusive = true;
@@ -1388,13 +1388,13 @@ static void fuse_dio_lock(struct kiocb *iocb, struct iov_iter *from,static void fuse_dio_unlock (struct kiocb *iocb,bool exclusive) {struct inode *inode =file_inode (iocb->ki_filp); -struct fuse_file *ff = iocb->ki_filp->private_data; +struct fuse_inode *fi =get_fuse_inode (inode);if (exclusive) {inode_unlock (inode); }else {/* Allow opens in caching mode after last parallel dio end */ -fuse_file_uncached_io_end (inode, ff); +fuse_inode_uncached_io_end (fi);inode_unlock_shared (inode); } }
@@ -2574,10 +2574,14 @@ static int fuse_file_mmap(struct file *file, struct vm_area_struct *vma)* First mmap of direct_io file enters caching inode io mode. * Also waits for parallel dio writers to go into serial mode * (exclusive instead of shared lock). +* After first mmap, the inode stays in caching io mode until +* the direct_io file release. */ - rc =fuse_file_cached_io_start (inode, ff); -if (rc) -return rc; +if (READ_ONCE (ff->iomode) !=IOM_CACHED ) { + rc =fuse_file_cached_io_open (inode, ff); +if (rc) +return rc; + } }if ((vma->vm_flags &VM_SHARED ) && (vma->vm_flags &VM_MAYWRITE ))
fs/fuse/fuse_i.h +4 -3
@@ -1394,9 +1394,10 @@ int fuse_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry, struct fileattr *fa);/* iomode.c */ -int fuse_file_cached_io_start (struct inode *inode,struct fuse_file *ff); -int fuse_file_uncached_io_start (struct inode *inode,struct fuse_file *ff,struct fuse_backing *fb); -void fuse_file_uncached_io_end (struct inode *inode,struct fuse_file *ff); +int fuse_file_cached_io_open (struct inode *inode,struct fuse_file *ff); +int fuse_inode_uncached_io_start (struct fuse_inode *fi, +struct fuse_backing *fb); +void fuse_inode_uncached_io_end (struct fuse_inode *fi);int fuse_file_io_open (struct file *file,struct inode *inode);void fuse_file_io_release (struct fuse_file *ff,struct inode *inode);
fs/fuse/inode.c +1 -0
@@ -175,6 +175,7 @@ static void fuse_evict_inode(struct inode *inode) } }if (S_ISREG (inode->i_mode) && !fuse_is_bad (inode)) { +WARN_ON (fi->iocachectr !=0 );WARN_ON (!list_empty (&fi->write_files));WARN_ON (!list_empty (&fi->queued_writes)); }
fs/fuse/iomode.c +40 -19
141 lines not on this page · raw message
Signature · 1 line
2.34.1
Amir Goldstein
maintainerPATCH 2/3 fuse: fix parallel dio write on file open in passthrough mode
In reply to Amir GoldsteinParalle dio write takes a negative refcount of fi->iocachectr and so does open of file in passthrough mode.
The refcount of passthrough mode is associated with attach/detach of a fuse_backing object to fuse inode.
For parallel dio write, the backing file is irrelevant, so the call to fuse_inode_uncached_io_start() passes a NULL fuse_backing object.
Passing a NULL fuse_backing will result in false -EBUSY error if the file is already open in passthrough mode.
Allow taking negative fi->iocachectr refcount with NULL fuse_backing, because it does not conflict with an already attached fuse_backing object.
--- fs/fuse/iomode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/fuse/iomode.c +2 -2
@@ -89,7 +89,7 @@ int fuse_inode_uncached_io_start(struct fuse_inode *fi, struct fuse_backing *fb)spin_lock (&fi->lock);/* deny conflicting backing files on same fuse inode */ oldfb =fuse_inode_backing (fi); -if (oldfb && oldfb != fb) { +if (fb && oldfb && oldfb != fb) { err = -EBUSY ; goto unlock; }
@@ -100,7 +100,7 @@ int fuse_inode_uncached_io_start(struct fuse_inode *fi, struct fuse_backing *fb) fi->iocachectr--;/* fuse inode holds a single refcount of backing file */ -if (!oldfb) { +if (fb && !oldfb) { oldfb =fuse_inode_backing_set (fi, fb);WARN_ON_ONCE (oldfb !=NULL ); }else {
Signature · 1 line
2.34.1
Amir Goldstein
maintainerPATCH 3/3 fuse: prepare for long lived reference on backing file
In reply to Amir GoldsteinCurrently backing file is associated to fuse inode on the first passthrough open of the inode and detached on last passthourgh close.
In preparation for attaching a backing file on lookup, allow attaching a long lived (single) reference on fuse inode backing file that will be dropped on fuse inode evict.
--- fs/fuse/file.c | 2 +- fs/fuse/fuse_i.h | 5 ++++- fs/fuse/inode.c | 6 ++++++ fs/fuse/iomode.c | 14 +++++++++++--- 4 files changed, 22 insertions(+), 5 deletions(-)
fs/fuse/file.c +1 -1
@@ -1377,7 +1377,7 @@ static void fuse_dio_lock(struct kiocb *iocb, struct iov_iter *from,* have raced, so check it again. */ if (fuse_io_past_eof (iocb, from) || -fuse_inode_uncached_io_start (fi,NULL ) !=0 ) { +fuse_inode_uncached_io_start (fi,NULL , false) !=0 ) {inode_unlock_shared (inode);inode_lock (inode); *exclusive = true;
fs/fuse/fuse_i.h +4 -1
@@ -209,6 +209,8 @@ enum {FUSE_I_BTIME ,/* Wants or already has page cache IO */ FUSE_I_CACHE_IO_MODE , +/* Long lived backing file */ + FUSE_I_BACKING, };struct fuse_conn ;
@@ -1396,7 +1398,8 @@ int fuse_fileattr_set(struct mnt_idmap *idmap,/* iomode.c */ int fuse_file_cached_io_open (struct inode *inode,struct fuse_file *ff);int fuse_inode_uncached_io_start (struct fuse_inode *fi, -struct fuse_backing *fb); +struct fuse_backing *fb, +bool keep_fb);void fuse_inode_uncached_io_end (struct fuse_inode *fi);int fuse_file_io_open (struct file *file,struct inode *inode);
fs/fuse/inode.c +6 -0
@@ -175,6 +175,12 @@ static void fuse_evict_inode(struct inode *inode) } }if (S_ISREG (inode->i_mode) && !fuse_is_bad (inode)) { +/* fuse inode may have a long lived reference to backing file */ +if (fuse_inode_backing (fi)) { +WARN_ON (!test_bit (FUSE_I_BACKING , &fi->state)); +fuse_inode_uncached_io_end (fi); + } +WARN_ON (fi->iocachectr !=0 );WARN_ON (!list_empty (&fi->write_files));WARN_ON (!list_empty (&fi->queued_writes));
fs/fuse/iomode.c +11 -3
@@ -80,8 +80,14 @@ static void fuse_file_cached_io_release(struct fuse_file *ff,spin_unlock (&fi->lock); } -/* Start strictly uncached io mode where cache access is not allowed */ -int fuse_inode_uncached_io_start (struct fuse_inode *fi,struct fuse_backing *fb) +/* +* Start strictly uncached io mode where cache access is not allowed. +* +* With @keep_fb true, the backing file reference is expected to be dropped +* on inode evict. +*/ +int fuse_inode_uncached_io_start (struct fuse_inode *fi,struct fuse_backing *fb, +bool keep_fb) {struct fuse_backing *oldfb;int err =0 ;
@@ -103,6 +109,8 @@ int fuse_inode_uncached_io_start(struct fuse_inode *fi, struct fuse_backing *fb)if (fb && !oldfb) { oldfb =fuse_inode_backing_set (fi, fb);WARN_ON_ONCE (oldfb !=NULL ); +if (keep_fb) +set_bit (FUSE_I_BACKING , &fi->state); }else {fuse_backing_put (fb); }
@@ -119,7 +127,7 @@ static int fuse_file_uncached_io_open(struct inode *inode,struct fuse_inode *fi =get_fuse_inode (inode);int err; - err =fuse_inode_uncached_io_start (fi, fb); + err =fuse_inode_uncached_io_start (fi, fb, false);if (err)return err;
Signature · 1 line
2.34.1
Miklos Szeredi
maintainerRe: [PATCH 1/3] fuse: fix wrong ff->iomode state changes from parallel dio write
In reply to Amir GoldsteinQuoted 10 lines · Amir Goldstein
There is a confusion with fuse_file_uncached_io_{start,end} interface. These helpers do two things when called from passthrough open()/release():
1. Take/drop negative refcount offi->iocachectr(inode uncached io mode)
2. State changeff->iomodeIOM_NONE<->IOM_UNCACHED(file uncached open)The calls from parallel dio write path need to take a reference on
fi->iocachectr, but they should not be changingff->iomodestate, because in this case, thefi->iocachectrreference does not stick around until filerelease().
Okay.
Quoted 7 lines
Factor out helpers fuse_inode_uncached_io_{start,end}, to be used from parallel dio write path and rename fuse_file_*cached_io_{start,end} helpers to fuse_file_*cached_io_{open,release} to clarify the difference.
Add a check of
ff->iomodeinmmap(), so thatfuse_file_cached_io_open()is called only on first mmap ofdirect_iofile.
Is this supposed to be an optimization? AFAICS it's wrong, because it moves the check outside of any relevant locks.
fs/fuse/iomode.c int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff) · line 60
Quoted 7 lines
fs/fuse/iomode.c +1
-2@@ -56,8 +57,7 @@ int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff)return -ETXTBSY ; } -WARN_ON (ff->iomode ==IOM_UNCACHED ); -if (ff->iomode ==IOM_NONE ) { +if (!WARN_ON (ff->iomode !=IOM_NONE )) {
This double negation is ugly. Just let the compiler optimize away the second comparison.
Thanks,
Miklos
Amir Goldstein
maintainerRe: [PATCH 1/3] fuse: fix wrong ff->iomode state changes from parallel dio write
Quoted 16 lines · Miklos Szeredi
Quoted 10 lines · Amir Goldstein
There is a confusion with fuse_file_uncached_io_{start,end} interface. These helpers do two things when called from passthrough open()/release():
1. Take/drop negative refcount offi->iocachectr(inode uncached io mode)
2. State changeff->iomodeIOM_NONE<->IOM_UNCACHED(file uncached open)The calls from parallel dio write path need to take a reference on
fi->iocachectr, but they should not be changingff->iomodestate, because in this case, thefi->iocachectrreference does not stick around until filerelease().Okay.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Factor out helpers fuse_inode_uncached_io_{start,end}, to be used from parallel dio write path and rename fuse_file_*cached_io_{start,end} helpers to fuse_file_*cached_io_{open,release} to clarify the difference.
Add a check of
ff->iomodeinmmap(), so thatfuse_file_cached_io_open()is called only on first mmap ofdirect_iofile.Is this supposed to be an optimization?
No.
The reason I did this is because I wanted to differentiate the refcount semantics (start/end)
from the state semantics (open/release)
and to make it clearer that there is only one state change and refcount increment on the first mmap().
Quoted 3 lines
AFAICS it's wrong, because it
moves the check outside of any relevant locks.
Aren't concurrent mmap serialized on some lock?
Anyway, I think that the only "bug" that this can trigger is the WARN_ON(ff->iomode != IOM_NONE)
so if we ....
Quoted 11 lines
fs/fuse/iomode.c int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff) · line 60
Quoted 8 lines
fs/fuse/iomode.c +1
-2@@ -56,8 +57,7 @@ int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff)return -ETXTBSY ; } -WARN_ON (ff->iomode ==IOM_UNCACHED ); -if (ff->iomode ==IOM_NONE ) { +if (!WARN_ON (ff->iomode !=IOM_NONE )) {This double negation is ugly. Just let the compiler optimize away the second comparison.
...drop this change, we should be good.
If you agree, do you need me to re-post?
Thanks,
Amir.
Miklos Szeredi
maintainerRe: [PATCH 1/3] fuse: fix wrong ff->iomode state changes from parallel dio write
Quoted 34 lines · Amir Goldstein
Quoted 16 lines · Miklos Szeredi
Quoted 10 lines · Amir Goldstein
There is a confusion with fuse_file_uncached_io_{start,end} interface. These helpers do two things when called from passthrough open()/release():
1. Take/drop negative refcount offi->iocachectr(inode uncached io mode)
2. State changeff->iomodeIOM_NONE<->IOM_UNCACHED(file uncached open)The calls from parallel dio write path need to take a reference on
fi->iocachectr, but they should not be changingff->iomodestate, because in this case, thefi->iocachectrreference does not stick around until filerelease().Okay.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Factor out helpers fuse_inode_uncached_io_{start,end}, to be used from parallel dio write path and rename fuse_file_*cached_io_{start,end} helpers to fuse_file_*cached_io_{open,release} to clarify the difference.
Add a check of
ff->iomodeinmmap(), so thatfuse_file_cached_io_open()is called only on first mmap ofdirect_iofile.Is this supposed to be an optimization?
No.
The reason I did this is because I wanted to differentiate the refcount semantics (start/end)
from the state semantics (open/release)
and to make it clearer that there is only one state change and refcount increment on the firstmmap().
Quoted 5 lines
Quoted 3 lines
AFAICS it's wrong, because it
moves the check outside of any relevant locks.Aren't concurrent mmap serialized on some lock?
Only on current->mm, which doesn't serialize mmaps of the same file in different processes.
Quoted 17 lines
Anyway, I think that the only "bug" that this can trigger is the
WARN_ON(ff->iomode != IOM_NONE)
so if we ....Quoted 11 lines
fs/fuse/iomode.c int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff) · line 60
Quoted 8 lines
fs/fuse/iomode.c +1
-2@@ -56,8 +57,7 @@ int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff)return -ETXTBSY ; } -WARN_ON (ff->iomode ==IOM_UNCACHED ); -if (ff->iomode ==IOM_NONE ) { +if (!WARN_ON (ff->iomode !=IOM_NONE )) {This double negation is ugly. Just let the compiler optimize away the second comparison.
Quoted 3 lines
...drop this change, we should be good.
If you agree, do you need me to re-post?
Okay, but then what's the point of the unlocked check?
Thanks,
Miklos
Amir Goldstein
maintainerRe: [PATCH 1/3] fuse: fix wrong ff->iomode state changes from parallel dio write
Quoted 62 lines · Miklos Szeredi
Quoted 34 lines · Amir Goldstein
Quoted 16 lines · Miklos Szeredi
Quoted 10 lines · Amir Goldstein
There is a confusion with fuse_file_uncached_io_{start,end} interface. These helpers do two things when called from passthrough open()/release():
1. Take/drop negative refcount offi->iocachectr(inode uncached io mode)
2. State changeff->iomodeIOM_NONE<->IOM_UNCACHED(file uncached open)The calls from parallel dio write path need to take a reference on
fi->iocachectr, but they should not be changingff->iomodestate, because in this case, thefi->iocachectrreference does not stick around until filerelease().Okay.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Factor out helpers fuse_inode_uncached_io_{start,end}, to be used from parallel dio write path and rename fuse_file_*cached_io_{start,end} helpers to fuse_file_*cached_io_{open,release} to clarify the difference.
Add a check of
ff->iomodeinmmap(), so thatfuse_file_cached_io_open()is called only on first mmap ofdirect_iofile.Is this supposed to be an optimization?
No.
The reason I did this is because I wanted to differentiate the refcount semantics (start/end)
from the state semantics (open/release)
and to make it clearer that there is only one state change and refcount increment on the firstmmap().Quoted 5 lines
Quoted 3 lines
AFAICS it's wrong, because it
moves the check outside of any relevant locks.Aren't concurrent mmap serialized on some lock?
Only on
current->mm, which doesn't serialize mmaps of the same file in different processes.Quoted 17 lines
Anyway, I think that the only "bug" that this can trigger is the
WARN_ON(ff->iomode != IOM_NONE)
so if we ....Quoted 11 lines
fs/fuse/iomode.c int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff) · line 60
Quoted 8 lines
fs/fuse/iomode.c +1
-2@@ -56,8 +57,7 @@ int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff)return -ETXTBSY ; } -WARN_ON (ff->iomode ==IOM_UNCACHED ); -if (ff->iomode ==IOM_NONE ) { +if (!WARN_ON (ff->iomode !=IOM_NONE )) {This double negation is ugly. Just let the compiler optimize away the second comparison.
Quoted 5 lines
Quoted 3 lines
...drop this change, we should be good.
If you agree, do you need me to re-post?
Okay, but then what's the point of the unlocked check?
As I wrote, I just did it to emphasize the open-once semantics.
If you do not like the unlocked check, feel free to remove it.
Thanks,
Amir.
Amir Goldstein
maintainerRe: [PATCH 1/3] fuse: fix wrong ff->iomode state changes from parallel dio write
Quoted 66 lines · Amir Goldstein
Quoted 64 lines · Miklos Szeredi
Quoted 34 lines · Amir Goldstein
Quoted 16 lines · Miklos Szeredi
Quoted 10 lines · Amir Goldstein
There is a confusion with fuse_file_uncached_io_{start,end} interface. These helpers do two things when called from passthrough open()/release():
1. Take/drop negative refcount offi->iocachectr(inode uncached io mode)
2. State changeff->iomodeIOM_NONE<->IOM_UNCACHED(file uncached open)The calls from parallel dio write path need to take a reference on
fi->iocachectr, but they should not be changingff->iomodestate, because in this case, thefi->iocachectrreference does not stick around until filerelease().Okay.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Factor out helpers fuse_inode_uncached_io_{start,end}, to be used from parallel dio write path and rename fuse_file_*cached_io_{start,end} helpers to fuse_file_*cached_io_{open,release} to clarify the difference.
Add a check of
ff->iomodeinmmap(), so thatfuse_file_cached_io_open()is called only on first mmap ofdirect_iofile.Is this supposed to be an optimization?
No.
The reason I did this is because I wanted to differentiate the refcount semantics (start/end)
from the state semantics (open/release)
and to make it clearer that there is only one state change and refcount increment on the firstmmap().Quoted 5 lines
Quoted 3 lines
AFAICS it's wrong, because it
moves the check outside of any relevant locks.Aren't concurrent mmap serialized on some lock?
Only on
current->mm, which doesn't serialize mmaps of the same file in different processes.Quoted 19 lines
Anyway, I think that the only "bug" that this can trigger is the
WARN_ON(ff->iomode != IOM_NONE)
so if we ....Quoted 11 lines
fs/fuse/iomode.c int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff) · line 60
Quoted 8 lines
fs/fuse/iomode.c +1
-2@@ -56,8 +57,7 @@ int fuse_file_cached_io_start(struct inode *inode, struct fuse_file *ff)return -ETXTBSY ; } -WARN_ON (ff->iomode ==IOM_UNCACHED ); -if (ff->iomode ==IOM_NONE ) { +if (!WARN_ON (ff->iomode !=IOM_NONE )) {This double negation is ugly. Just let the compiler optimize away the second comparison.
...drop this change, we should be good.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
If you agree, do you need me to re-post?
Okay, but then what's the point of the unlocked check?
As I wrote, I just did it to emphasize the open-once semantics.
If you do not like the unlocked check, feel free to remove it.
Miklos,
I see that you removed the unlocked check in the fix staged for-next. Please also remove this from commit message:
Add a check of ff->iomode in mmap(), so that fuse_file_cached_io_open() is called only on first mmap of direct_io file.
Thanks,
Amir.
Miklos Szeredi
maintainerRe: [PATCH 1/3] fuse: fix wrong ff->iomode state changes from parallel dio write
Quoted 5 lines · Amir Goldstein
I see that you removed the unlocked check in the fix staged for-next. Please also remove this from commit message:
Add a check of
ff->iomodeinmmap(), so thatfuse_file_cached_io_open()is called only on first mmap ofdirect_iofile.
Done.
Thanks,
Miklos