PERFORCE change 197037 for review
Ilya Putsikau
ilya at FreeBSD.org
Mon Aug 1 21:39:46 UTC 2011
http://p4web.freebsd.org/@@197037?ac=10
Change 197037 by ilya at ilya_triton2011 on 2011/08/01 21:38:48
Fix file close-release race
Make fuse_filehandle_close foreground only
Change version to 0.4.3
Affected files ...
.. //depot/projects/soc2011/ilya_fuse/fuse/fuse.h#2 edit
.. //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.c#3 edit
.. //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.h#2 edit
.. //depot/projects/soc2011/ilya_fuse/fuse/fuse_version.h#2 edit
.. //depot/projects/soc2011/ilya_fuse/fuse/fuse_vnops.c#3 edit
Differences ...
==== //depot/projects/soc2011/ilya_fuse/fuse/fuse.h#2 (text+ko) ====
@@ -162,10 +162,5 @@
__STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \
} while (0)
-typedef enum fuse_op_waitfor {
- FUSE_OP_BACKGROUNDED = 0,
- FUSE_OP_FOREGROUNDED = 1,
-} fuse_op_waitfor_t;
-
void fuse_ipc_init(void);
void fuse_ipc_destroy(void);
==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.c#3 (text+ko) ====
@@ -101,8 +101,7 @@
fuse_filehandle_close(struct vnode *vp,
fufh_type_t fufh_type,
struct thread *td,
- struct ucred *cred,
- fuse_op_waitfor_t waitfor)
+ struct ucred *cred)
{
struct fuse_dispatcher fdi;
struct fuse_release_in *fri;
@@ -138,12 +137,7 @@
fri->fh = fufh->fh_id;
fri->flags = fuse_filehandle_xlate_to_oflags(fufh_type);
- if (waitfor == FUSE_OP_FOREGROUNDED) {
- err = fdisp_wait_answ(&fdi);
- } else {
- fuse_insert_callback(fdi.tick, NULL);
- fuse_insert_message(fdi.tick);
- }
+ err = fdisp_wait_answ(&fdi);
fdisp_destroy(&fdi);
out:
==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_file.h#2 (text+ko) ====
@@ -96,7 +96,6 @@
struct fuse_filehandle **fufhp, struct thread *td,
struct ucred *cred);
int fuse_filehandle_close(struct vnode *vp, fufh_type_t fufh_type,
- struct thread *td, struct ucred *cred,
- fuse_op_waitfor_t waitfor);
+ struct thread *td, struct ucred *cred);
#endif /* _FUSE_FILE_H_ */
==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_version.h#2 (text+ko) ====
@@ -1,3 +1,3 @@
#ifndef FUSE_FREEBSD_VERSION
-#define FUSE_FREEBSD_VERSION "0.4.2"
+#define FUSE_FREEBSD_VERSION "0.4.3"
#endif
==== //depot/projects/soc2011/ilya_fuse/fuse/fuse_vnops.c#3 (text+ko) ====
@@ -566,7 +566,7 @@
fuse_io_flushbuf(vp, MNT_WAIT, td);
need_flush = 0;
}
- fuse_filehandle_close(vp, type, td, NULL, FUSE_OP_BACKGROUNDED);
+ fuse_filehandle_close(vp, type, td, NULL);
}
}
@@ -1260,8 +1260,7 @@
fiov_teardown(&cookediov);
if (freefufh) {
- fuse_filehandle_close(vp, FUFH_RDONLY, NULL, cred,
- FUSE_OP_FOREGROUNDED);
+ fuse_filehandle_close(vp, FUFH_RDONLY, NULL, cred);
}
return err;
@@ -1343,7 +1342,7 @@
if (FUFH_IS_VALID(fufh)) {
printf("FUSE: vnode being reclaimed but fufh (type=%d) is valid",
type);
- fuse_filehandle_close(vp, type, td, NULL, FUSE_OP_BACKGROUNDED);
+ fuse_filehandle_close(vp, type, td, NULL);
}
}
More information about the p4-projects
mailing list