@@ -226,49 +226,6 @@ static const struct xfs_item_ops xfs_rud_item_ops = {
226
226
.iop_intent = xfs_rud_item_intent ,
227
227
};
228
228
229
- /* Set the map extent flags for this reverse mapping. */
230
- static void
231
- xfs_trans_set_rmap_flags (
232
- struct xfs_map_extent * map ,
233
- enum xfs_rmap_intent_type type ,
234
- int whichfork ,
235
- xfs_exntst_t state )
236
- {
237
- map -> me_flags = 0 ;
238
- if (state == XFS_EXT_UNWRITTEN )
239
- map -> me_flags |= XFS_RMAP_EXTENT_UNWRITTEN ;
240
- if (whichfork == XFS_ATTR_FORK )
241
- map -> me_flags |= XFS_RMAP_EXTENT_ATTR_FORK ;
242
- switch (type ) {
243
- case XFS_RMAP_MAP :
244
- map -> me_flags |= XFS_RMAP_EXTENT_MAP ;
245
- break ;
246
- case XFS_RMAP_MAP_SHARED :
247
- map -> me_flags |= XFS_RMAP_EXTENT_MAP_SHARED ;
248
- break ;
249
- case XFS_RMAP_UNMAP :
250
- map -> me_flags |= XFS_RMAP_EXTENT_UNMAP ;
251
- break ;
252
- case XFS_RMAP_UNMAP_SHARED :
253
- map -> me_flags |= XFS_RMAP_EXTENT_UNMAP_SHARED ;
254
- break ;
255
- case XFS_RMAP_CONVERT :
256
- map -> me_flags |= XFS_RMAP_EXTENT_CONVERT ;
257
- break ;
258
- case XFS_RMAP_CONVERT_SHARED :
259
- map -> me_flags |= XFS_RMAP_EXTENT_CONVERT_SHARED ;
260
- break ;
261
- case XFS_RMAP_ALLOC :
262
- map -> me_flags |= XFS_RMAP_EXTENT_ALLOC ;
263
- break ;
264
- case XFS_RMAP_FREE :
265
- map -> me_flags |= XFS_RMAP_EXTENT_FREE ;
266
- break ;
267
- default :
268
- ASSERT (0 );
269
- }
270
- }
271
-
272
229
/* Sort rmap intents by AG. */
273
230
static int
274
231
xfs_rmap_update_diff_items (
@@ -307,8 +264,40 @@ xfs_rmap_update_log_item(
307
264
map -> me_startblock = ri -> ri_bmap .br_startblock ;
308
265
map -> me_startoff = ri -> ri_bmap .br_startoff ;
309
266
map -> me_len = ri -> ri_bmap .br_blockcount ;
310
- xfs_trans_set_rmap_flags (map , ri -> ri_type , ri -> ri_whichfork ,
311
- ri -> ri_bmap .br_state );
267
+
268
+ map -> me_flags = 0 ;
269
+ if (ri -> ri_bmap .br_state == XFS_EXT_UNWRITTEN )
270
+ map -> me_flags |= XFS_RMAP_EXTENT_UNWRITTEN ;
271
+ if (ri -> ri_whichfork == XFS_ATTR_FORK )
272
+ map -> me_flags |= XFS_RMAP_EXTENT_ATTR_FORK ;
273
+ switch (ri -> ri_type ) {
274
+ case XFS_RMAP_MAP :
275
+ map -> me_flags |= XFS_RMAP_EXTENT_MAP ;
276
+ break ;
277
+ case XFS_RMAP_MAP_SHARED :
278
+ map -> me_flags |= XFS_RMAP_EXTENT_MAP_SHARED ;
279
+ break ;
280
+ case XFS_RMAP_UNMAP :
281
+ map -> me_flags |= XFS_RMAP_EXTENT_UNMAP ;
282
+ break ;
283
+ case XFS_RMAP_UNMAP_SHARED :
284
+ map -> me_flags |= XFS_RMAP_EXTENT_UNMAP_SHARED ;
285
+ break ;
286
+ case XFS_RMAP_CONVERT :
287
+ map -> me_flags |= XFS_RMAP_EXTENT_CONVERT ;
288
+ break ;
289
+ case XFS_RMAP_CONVERT_SHARED :
290
+ map -> me_flags |= XFS_RMAP_EXTENT_CONVERT_SHARED ;
291
+ break ;
292
+ case XFS_RMAP_ALLOC :
293
+ map -> me_flags |= XFS_RMAP_EXTENT_ALLOC ;
294
+ break ;
295
+ case XFS_RMAP_FREE :
296
+ map -> me_flags |= XFS_RMAP_EXTENT_FREE ;
297
+ break ;
298
+ default :
299
+ ASSERT (0 );
300
+ }
312
301
}
313
302
314
303
static struct xfs_log_item *
0 commit comments