FreeBSD Bugzilla – Attachment 247424 Details for
Bug 276002
nfscl: data corruption using both copy_file_range and mmap'd I/O
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Make Setattr invalidate for setting size if mmap'd writing might have occurred
mmapsetattr.patch (text/plain), 832 bytes, created by
Rick Macklem
on 2024-01-02 23:48:34 UTC
(
hide
)
Description:
Make Setattr invalidate for setting size if mmap'd writing might have occurred
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2024-01-02 23:48:34 UTC
Size:
832 bytes
patch
obsolete
>--- sys/fs/nfsclient/nfs_clvnops.c.setattr 2024-01-02 14:55:59.350032000 -0800 >+++ sys/fs/nfsclient/nfs_clvnops.c 2024-01-02 15:06:42.288049000 -0800 >@@ -1058,6 +1058,7 @@ nfs_setattr(struct vop_setattr_args *ap) > int error = 0; > u_quad_t tsize; > struct timespec ts; >+ bool do_inval; > > #ifndef nolint > tsize = (u_quad_t)0; >@@ -1113,8 +1114,12 @@ nfs_setattr(struct vop_setattr_args *ap) > tsize = np->n_size; > NFSUNLOCKNODE(np); > error = ncl_meta_setsize(vp, td, vap->va_size); >+ do_inval = false; >+ if (vp->v_object != NULL && >+ vm_object_mightbedirty(vp->v_object)) >+ do_inval = true; > NFSLOCKNODE(np); >- if (np->n_flag & NMODIFIED) { >+ if (do_inval || (np->n_flag & NMODIFIED) != 0) { > tsize = np->n_size; > NFSUNLOCKNODE(np); > error = ncl_vinvalbuf(vp, vap->va_size == 0 ?
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 276002
:
247343
|
247346
|
247360
| 247424 |
248653
|
248770
|
248807
|
249298
|
250535