Commit db6ec53
Jaegeuk Kim
f2fs: add a rw_sem to cover quota flag changes
Two paths to update quota and f2fs_lock_op:
1.
- lock_op
| - quota_update
`- unlock_op
2.
- quota_update
- lock_op
`- unlock_op
But, we need to make a transaction on quota_update + lock_op in #2 case.
So, this patch introduces:
1. lock_op
2. down_write
3. check __need_flush
4. up_write
5. if there is dirty quota entries, flush them
6. otherwise, good to go
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>1 parent c83414a commit db6ec53
3 files changed
+53
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| 1136 | + | |
| 1137 | + | |
1136 | 1138 | | |
1137 | 1139 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1147 | 1154 | | |
1148 | 1155 | | |
1149 | 1156 | | |
| |||
1162 | 1169 | | |
1163 | 1170 | | |
1164 | 1171 | | |
| 1172 | + | |
1165 | 1173 | | |
1166 | 1174 | | |
1167 | 1175 | | |
1168 | 1176 | | |
1169 | 1177 | | |
1170 | | - | |
| 1178 | + | |
1171 | 1179 | | |
1172 | 1180 | | |
1173 | | - | |
| 1181 | + | |
1174 | 1182 | | |
1175 | 1183 | | |
1176 | 1184 | | |
1177 | 1185 | | |
1178 | 1186 | | |
1179 | 1187 | | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | 1188 | | |
1186 | 1189 | | |
1187 | 1190 | | |
| |||
1203 | 1206 | | |
1204 | 1207 | | |
1205 | 1208 | | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | 1209 | | |
1213 | 1210 | | |
1214 | 1211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| 1259 | + | |
1259 | 1260 | | |
1260 | 1261 | | |
1261 | 1262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
1922 | 1934 | | |
1923 | 1935 | | |
1924 | 1936 | | |
| |||
1956 | 1968 | | |
1957 | 1969 | | |
1958 | 1970 | | |
| 1971 | + | |
| 1972 | + | |
1959 | 1973 | | |
1960 | 1974 | | |
1961 | 1975 | | |
| |||
2047 | 2061 | | |
2048 | 2062 | | |
2049 | 2063 | | |
| 2064 | + | |
2050 | 2065 | | |
2051 | 2066 | | |
| 2067 | + | |
2052 | 2068 | | |
2053 | 2069 | | |
2054 | | - | |
| 2070 | + | |
| 2071 | + | |
2055 | 2072 | | |
2056 | 2073 | | |
2057 | 2074 | | |
2058 | 2075 | | |
2059 | 2076 | | |
| 2077 | + | |
2060 | 2078 | | |
2061 | 2079 | | |
| 2080 | + | |
2062 | 2081 | | |
2063 | 2082 | | |
2064 | | - | |
2065 | | - | |
| 2083 | + | |
| 2084 | + | |
2066 | 2085 | | |
2067 | 2086 | | |
2068 | 2087 | | |
2069 | 2088 | | |
2070 | 2089 | | |
| 2090 | + | |
2071 | 2091 | | |
2072 | 2092 | | |
| 2093 | + | |
2073 | 2094 | | |
2074 | 2095 | | |
2075 | | - | |
| 2096 | + | |
| 2097 | + | |
2076 | 2098 | | |
2077 | 2099 | | |
2078 | 2100 | | |
| |||
2082 | 2104 | | |
2083 | 2105 | | |
2084 | 2106 | | |
| 2107 | + | |
2085 | 2108 | | |
2086 | 2109 | | |
2087 | 2110 | | |
2088 | 2111 | | |
2089 | 2112 | | |
2090 | 2113 | | |
| 2114 | + | |
2091 | 2115 | | |
2092 | 2116 | | |
2093 | 2117 | | |
2094 | 2118 | | |
2095 | 2119 | | |
| 2120 | + | |
2096 | 2121 | | |
2097 | 2122 | | |
| 2123 | + | |
2098 | 2124 | | |
2099 | 2125 | | |
2100 | | - | |
| 2126 | + | |
| 2127 | + | |
2101 | 2128 | | |
2102 | 2129 | | |
2103 | 2130 | | |
| |||
3167 | 3194 | | |
3168 | 3195 | | |
3169 | 3196 | | |
| 3197 | + | |
3170 | 3198 | | |
3171 | 3199 | | |
3172 | 3200 | | |
| |||
0 commit comments