Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108587134
D38114.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38114.diff
View Options
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -917,11 +917,13 @@
*/
if (bp->bio_cmd == BIO_FLUSH) {
- (void) vn_start_write(vp, &mp, V_WAIT);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- error = VOP_FSYNC(vp, MNT_WAIT, td);
- VOP_UNLOCK(vp);
- vn_finished_write(mp);
+ do {
+ (void) vn_start_write(vp, &mp, V_WAIT);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+ error = VOP_FSYNC(vp, MNT_WAIT, td);
+ VOP_UNLOCK(vp);
+ vn_finished_write(mp);
+ } while (error == ERELOOKUP);
return (error);
} else if (bp->bio_cmd == BIO_DELETE) {
error = vn_deallocate(vp, &off, &len, 0,
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1233,8 +1233,23 @@
res = vm_object_page_clean(object, offset, offset + size,
flags);
VM_OBJECT_WUNLOCK(object);
- if (fsync_after)
- error = VOP_FSYNC(vp, MNT_WAIT, curthread);
+ if (fsync_after) {
+ for (;;) {
+ error = VOP_FSYNC(vp, MNT_WAIT, curthread);
+ if (error != ERELOOKUP)
+ break;
+
+ /*
+ * Allow SU/bufdaemon to handle more
+ * dependencies in the meantime.
+ */
+ VOP_UNLOCK(vp);
+ vn_finished_write(mp);
+
+ (void)vn_start_write(vp, &mp, V_WAIT);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+ }
+ }
VOP_UNLOCK(vp);
vn_finished_write(mp);
if (error != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 4:27 PM (6 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16200850
Default Alt Text
D38114.diff (1 KB)
Attached To
Mode
D38114: Handle ERELOOKUP from VOP_FSYNC()
Attached
Detach File
Event Timeline
Log In to Comment