summaryrefslogtreecommitdiff
path: root/debian/patches/ext2fs_nowait.patch
blob: 061f9760e5ba0110e3cbbb8da5b184c0b8fa9c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Avoid waiting for disk I/O completion. This improves performance quite a bit,
and should not be less safe.

diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index 66d8c8a..f0f52f7 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -690,7 +690,7 @@ diskfs_direnter_hard (struct node *dp, const char *name, struct node *np,
 	}
     }
 
-  diskfs_file_update (dp, 1);
+  diskfs_file_update (dp, diskfs_synchronous);
 
   return 0;
 }
@@ -727,7 +727,7 @@ diskfs_dirremove_hard (struct node *dp, struct dirstat *ds)
   if (dp->dn->dirents && dp->dn->dirents[ds->idx] != -1)
     dp->dn->dirents[ds->idx]--;
 
-  diskfs_file_update (dp, 1);
+  diskfs_file_update (dp, diskfs_synchronous);
 
   return 0;
 }
@@ -753,7 +753,7 @@ diskfs_dirrewrite_hard (struct node *dp, struct node *np, struct dirstat *ds)
 
   munmap ((caddr_t) ds->mapbuf, ds->mapextent);
 
-  diskfs_file_update (dp, 1);
+  diskfs_file_update (dp, diskfs_synchronous);
 
   return 0;
 }
diff --git a/ext2fs/truncate.c b/ext2fs/truncate.c
index 077225b..2058a1c 100644
--- a/ext2fs/truncate.c
+++ b/ext2fs/truncate.c
@@ -294,7 +294,7 @@ diskfs_truncate (struct node *node, off_t length)
       node->dn_stat.st_size = length;
       node->dn_set_mtime = 1;
       node->dn_set_ctime = 1;
-      diskfs_node_update (node, 1);
+      diskfs_node_update (node, diskfs_synchronous);
       return 0;
     }
 
@@ -309,6 +309,7 @@ diskfs_truncate (struct node *node, off_t length)
     {
       diskfs_node_rdwr (node, (void *)zeroblock, length, block_size - offset,
 			1, 0, 0);
+      /* Make sure that really happens to avoid leaks.  */
       diskfs_file_update (node, 1);
     }
 
@@ -323,7 +324,7 @@ diskfs_truncate (struct node *node, off_t length)
   node->dn_stat.st_size = length;
   node->dn_set_mtime = 1;
   node->dn_set_ctime = 1;
-  diskfs_node_update (node, 1);
+  diskfs_node_update (node, diskfs_synchronous);
 
   err = diskfs_catch_exception ();
   if (!err)
diff --git a/libdiskfs/dir-init.c b/libdiskfs/dir-init.c
index 2cba3a4..4efded0 100644
--- a/libdiskfs/dir-init.c
+++ b/libdiskfs/dir-init.c
@@ -63,6 +63,6 @@ diskfs_init_dir (struct node *dp, struct node *pdp, struct protid *cred)
       return err;
     }
 
-  diskfs_node_update (dp, 1);
+  diskfs_node_update (dp, diskfs_synchronous);
   return 0;
 }
diff --git a/libdiskfs/dir-link.c b/libdiskfs/dir-link.c
index 7cc8863..df1bb6a 100644
--- a/libdiskfs/dir-link.c
+++ b/libdiskfs/dir-link.c
@@ -101,7 +101,7 @@ diskfs_S_dir_link (struct protid *dircred,
     }
   np->dn_stat.st_nlink++;
   np->dn_set_ctime = 1;
-  diskfs_node_update (np, 1);
+  diskfs_node_update (np, diskfs_synchronous);
 
   /* Attach it */
   if (tnp)
diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c
index 867e395..298669b 100644
--- a/libdiskfs/dir-rename.c
+++ b/libdiskfs/dir-rename.c
@@ -164,7 +164,7 @@ diskfs_S_dir_rename (struct protid *fromcred,
     }
   fnp->dn_stat.st_nlink++;
   fnp->dn_set_ctime = 1;
-  diskfs_node_update (fnp, 1);
+  diskfs_node_update (fnp, diskfs_synchronous);
 
   if (tnp)
     {
diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
index ce8f415..319a41a 100644
--- a/libdiskfs/dir-renamed.c
+++ b/libdiskfs/dir-renamed.c
@@ -177,7 +177,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, const char *fromname,
     }
   fnp->dn_stat.st_nlink++;
   fnp->dn_set_ctime = 1;
-  diskfs_node_update (fnp, 1);
+  diskfs_node_update (fnp, diskfs_synchronous);
 
   if (tnp)
     {
diff --git a/libdiskfs/file-set-trans.c b/libdiskfs/file-set-trans.c
index 26a19eb..c9b2c61 100644
--- a/libdiskfs/file-set-trans.c
+++ b/libdiskfs/file-set-trans.c
@@ -196,7 +196,7 @@ diskfs_S_file_set_translator (struct protid *cred,
 	      if (!error)
 		{
 		  np->dn_stat.st_mode = newmode;
-		  diskfs_node_update (np, 1);
+		  diskfs_node_update (np, diskfs_synchronous);
 		}
 	      mutex_unlock (&np->lock);
 	      return error;
diff --git a/libdiskfs/node-create.c b/libdiskfs/node-create.c
index 4a7d108..5b5e463 100644
--- a/libdiskfs/node-create.c
+++ b/libdiskfs/node-create.c
@@ -131,7 +131,7 @@ diskfs_create_node (struct node *dir,
   if (S_ISDIR (mode))
     err = diskfs_init_dir (np, dir, cred);
 
-  diskfs_node_update (np, 1);
+  diskfs_node_update (np, diskfs_synchronous);
 
   if (err)
     {
diff --git a/libdiskfs/node-drop.c b/libdiskfs/node-drop.c
index f44966b..c3d32c9 100644
--- a/libdiskfs/node-drop.c
+++ b/libdiskfs/node-drop.c
@@ -78,7 +78,7 @@ diskfs_drop_node (struct node *np)
       np->dn_stat.st_mode = 0;
       np->dn_stat.st_rdev = 0;
       np->dn_set_ctime = np->dn_set_atime = 1;
-      diskfs_node_update (np, 1);
+      diskfs_node_update (np, diskfs_synchronous);
       diskfs_free_node (np, savemode);
     }
   else