FreeBSD Bugzilla – Attachment 164881 Details for
Bug 194293
FUSE program freezes when seeking pos > file size
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
invalidate buffer cache blocks when switching to DIRECT_IO
fuse-invalbuf.patch (text/plain), 701 bytes, created by
rmacklem
on 2015-12-31 01:07:48 UTC
(
hide
)
Description:
invalidate buffer cache blocks when switching to DIRECT_IO
Filename:
MIME Type:
Creator:
rmacklem
Created:
2015-12-31 01:07:48 UTC
Size:
701 bytes
patch
obsolete
>--- fs/fuse/fuse_node.c.yyy 2015-12-30 16:55:25.794051000 -0500 >+++ fs/fuse/fuse_node.c 2015-12-30 16:21:41.102780000 -0500 >@@ -289,7 +289,16 @@ fuse_vnode_open(struct vnode *vp, int32_ > * XXXIP: Handle fd based DIRECT_IO > */ > if (fuse_open_flags & FOPEN_DIRECT_IO) { >- VTOFUD(vp)->flag |= FN_DIRECTIO; >+ ASSERT_VOP_ELOCKED(vp, __func__); >+ /* >+ * If switching from buffer cache I/O to direct I/O, the >+ * buffer cache blocks must be invalidated to avoid accessing >+ * stale data in the buffer cache. >+ */ >+ if ((VTOFUD(vp)->flag & FN_DIRECTIO) == 0) { >+ VTOFUD(vp)->flag |= FN_DIRECTIO; >+ fuse_io_invalbuf(vp, td); >+ } > } else { > VTOFUD(vp)->flag &= ~FN_DIRECTIO; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194293
:
148181
|
164744
|
164831
| 164881