diff options
Diffstat (limited to 'fs/xfs/xfs_log_format.h')
-rw-r--r-- | fs/xfs/xfs_log_format.h | 177 |
1 files changed, 0 insertions, 177 deletions
diff --git a/fs/xfs/xfs_log_format.h b/fs/xfs/xfs_log_format.h index ca7e28a8ed31..f0969c77bdbe 100644 --- a/fs/xfs/xfs_log_format.h +++ b/fs/xfs/xfs_log_format.h | |||
@@ -234,178 +234,6 @@ typedef struct xfs_trans_header { | |||
234 | { XFS_LI_ICREATE, "XFS_LI_ICREATE" } | 234 | { XFS_LI_ICREATE, "XFS_LI_ICREATE" } |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * Transaction types. Used to distinguish types of buffers. | ||
238 | */ | ||
239 | #define XFS_TRANS_SETATTR_NOT_SIZE 1 | ||
240 | #define XFS_TRANS_SETATTR_SIZE 2 | ||
241 | #define XFS_TRANS_INACTIVE 3 | ||
242 | #define XFS_TRANS_CREATE 4 | ||
243 | #define XFS_TRANS_CREATE_TRUNC 5 | ||
244 | #define XFS_TRANS_TRUNCATE_FILE 6 | ||
245 | #define XFS_TRANS_REMOVE 7 | ||
246 | #define XFS_TRANS_LINK 8 | ||
247 | #define XFS_TRANS_RENAME 9 | ||
248 | #define XFS_TRANS_MKDIR 10 | ||
249 | #define XFS_TRANS_RMDIR 11 | ||
250 | #define XFS_TRANS_SYMLINK 12 | ||
251 | #define XFS_TRANS_SET_DMATTRS 13 | ||
252 | #define XFS_TRANS_GROWFS 14 | ||
253 | #define XFS_TRANS_STRAT_WRITE 15 | ||
254 | #define XFS_TRANS_DIOSTRAT 16 | ||
255 | /* 17 was XFS_TRANS_WRITE_SYNC */ | ||
256 | #define XFS_TRANS_WRITEID 18 | ||
257 | #define XFS_TRANS_ADDAFORK 19 | ||
258 | #define XFS_TRANS_ATTRINVAL 20 | ||
259 | #define XFS_TRANS_ATRUNCATE 21 | ||
260 | #define XFS_TRANS_ATTR_SET 22 | ||
261 | #define XFS_TRANS_ATTR_RM 23 | ||
262 | #define XFS_TRANS_ATTR_FLAG 24 | ||
263 | #define XFS_TRANS_CLEAR_AGI_BUCKET 25 | ||
264 | #define XFS_TRANS_QM_SBCHANGE 26 | ||
265 | /* | ||
266 | * Dummy entries since we use the transaction type to index into the | ||
267 | * trans_type[] in xlog_recover_print_trans_head() | ||
268 | */ | ||
269 | #define XFS_TRANS_DUMMY1 27 | ||
270 | #define XFS_TRANS_DUMMY2 28 | ||
271 | #define XFS_TRANS_QM_QUOTAOFF 29 | ||
272 | #define XFS_TRANS_QM_DQALLOC 30 | ||
273 | #define XFS_TRANS_QM_SETQLIM 31 | ||
274 | #define XFS_TRANS_QM_DQCLUSTER 32 | ||
275 | #define XFS_TRANS_QM_QINOCREATE 33 | ||
276 | #define XFS_TRANS_QM_QUOTAOFF_END 34 | ||
277 | #define XFS_TRANS_SB_UNIT 35 | ||
278 | #define XFS_TRANS_FSYNC_TS 36 | ||
279 | #define XFS_TRANS_GROWFSRT_ALLOC 37 | ||
280 | #define XFS_TRANS_GROWFSRT_ZERO 38 | ||
281 | #define XFS_TRANS_GROWFSRT_FREE 39 | ||
282 | #define XFS_TRANS_SWAPEXT 40 | ||
283 | #define XFS_TRANS_SB_COUNT 41 | ||
284 | #define XFS_TRANS_CHECKPOINT 42 | ||
285 | #define XFS_TRANS_ICREATE 43 | ||
286 | #define XFS_TRANS_TYPE_MAX 43 | ||
287 | /* new transaction types need to be reflected in xfs_logprint(8) */ | ||
288 | |||
289 | #define XFS_TRANS_TYPES \ | ||
290 | { XFS_TRANS_SETATTR_NOT_SIZE, "SETATTR_NOT_SIZE" }, \ | ||
291 | { XFS_TRANS_SETATTR_SIZE, "SETATTR_SIZE" }, \ | ||
292 | { XFS_TRANS_INACTIVE, "INACTIVE" }, \ | ||
293 | { XFS_TRANS_CREATE, "CREATE" }, \ | ||
294 | { XFS_TRANS_CREATE_TRUNC, "CREATE_TRUNC" }, \ | ||
295 | { XFS_TRANS_TRUNCATE_FILE, "TRUNCATE_FILE" }, \ | ||
296 | { XFS_TRANS_REMOVE, "REMOVE" }, \ | ||
297 | { XFS_TRANS_LINK, "LINK" }, \ | ||
298 | { XFS_TRANS_RENAME, "RENAME" }, \ | ||
299 | { XFS_TRANS_MKDIR, "MKDIR" }, \ | ||
300 | { XFS_TRANS_RMDIR, "RMDIR" }, \ | ||
301 | { XFS_TRANS_SYMLINK, "SYMLINK" }, \ | ||
302 | { XFS_TRANS_SET_DMATTRS, "SET_DMATTRS" }, \ | ||
303 | { XFS_TRANS_GROWFS, "GROWFS" }, \ | ||
304 | { XFS_TRANS_STRAT_WRITE, "STRAT_WRITE" }, \ | ||
305 | { XFS_TRANS_DIOSTRAT, "DIOSTRAT" }, \ | ||
306 | { XFS_TRANS_WRITEID, "WRITEID" }, \ | ||
307 | { XFS_TRANS_ADDAFORK, "ADDAFORK" }, \ | ||
308 | { XFS_TRANS_ATTRINVAL, "ATTRINVAL" }, \ | ||
309 | { XFS_TRANS_ATRUNCATE, "ATRUNCATE" }, \ | ||
310 | { XFS_TRANS_ATTR_SET, "ATTR_SET" }, \ | ||
311 | { XFS_TRANS_ATTR_RM, "ATTR_RM" }, \ | ||
312 | { XFS_TRANS_ATTR_FLAG, "ATTR_FLAG" }, \ | ||
313 | { XFS_TRANS_CLEAR_AGI_BUCKET, "CLEAR_AGI_BUCKET" }, \ | ||
314 | { XFS_TRANS_QM_SBCHANGE, "QM_SBCHANGE" }, \ | ||
315 | { XFS_TRANS_QM_QUOTAOFF, "QM_QUOTAOFF" }, \ | ||
316 | { XFS_TRANS_QM_DQALLOC, "QM_DQALLOC" }, \ | ||
317 | { XFS_TRANS_QM_SETQLIM, "QM_SETQLIM" }, \ | ||
318 | { XFS_TRANS_QM_DQCLUSTER, "QM_DQCLUSTER" }, \ | ||
319 | { XFS_TRANS_QM_QINOCREATE, "QM_QINOCREATE" }, \ | ||
320 | { XFS_TRANS_QM_QUOTAOFF_END, "QM_QOFF_END" }, \ | ||
321 | { XFS_TRANS_SB_UNIT, "SB_UNIT" }, \ | ||
322 | { XFS_TRANS_FSYNC_TS, "FSYNC_TS" }, \ | ||
323 | { XFS_TRANS_GROWFSRT_ALLOC, "GROWFSRT_ALLOC" }, \ | ||
324 | { XFS_TRANS_GROWFSRT_ZERO, "GROWFSRT_ZERO" }, \ | ||
325 | { XFS_TRANS_GROWFSRT_FREE, "GROWFSRT_FREE" }, \ | ||
326 | { XFS_TRANS_SWAPEXT, "SWAPEXT" }, \ | ||
327 | { XFS_TRANS_SB_COUNT, "SB_COUNT" }, \ | ||
328 | { XFS_TRANS_CHECKPOINT, "CHECKPOINT" }, \ | ||
329 | { XFS_TRANS_DUMMY1, "DUMMY1" }, \ | ||
330 | { XFS_TRANS_DUMMY2, "DUMMY2" }, \ | ||
331 | { XLOG_UNMOUNT_REC_TYPE, "UNMOUNT" } | ||
332 | |||
333 | /* | ||
334 | * This structure is used to track log items associated with | ||
335 | * a transaction. It points to the log item and keeps some | ||
336 | * flags to track the state of the log item. It also tracks | ||
337 | * the amount of space needed to log the item it describes | ||
338 | * once we get to commit processing (see xfs_trans_commit()). | ||
339 | */ | ||
340 | struct xfs_log_item_desc { | ||
341 | struct xfs_log_item *lid_item; | ||
342 | struct list_head lid_trans; | ||
343 | unsigned char lid_flags; | ||
344 | }; | ||
345 | |||
346 | #define XFS_LID_DIRTY 0x1 | ||
347 | |||
348 | /* | ||
349 | * Values for t_flags. | ||
350 | */ | ||
351 | #define XFS_TRANS_DIRTY 0x01 /* something needs to be logged */ | ||
352 | #define XFS_TRANS_SB_DIRTY 0x02 /* superblock is modified */ | ||
353 | #define XFS_TRANS_PERM_LOG_RES 0x04 /* xact took a permanent log res */ | ||
354 | #define XFS_TRANS_SYNC 0x08 /* make commit synchronous */ | ||
355 | #define XFS_TRANS_DQ_DIRTY 0x10 /* at least one dquot in trx dirty */ | ||
356 | #define XFS_TRANS_RESERVE 0x20 /* OK to use reserved data blocks */ | ||
357 | #define XFS_TRANS_FREEZE_PROT 0x40 /* Transaction has elevated writer | ||
358 | count in superblock */ | ||
359 | |||
360 | /* | ||
361 | * Values for call flags parameter. | ||
362 | */ | ||
363 | #define XFS_TRANS_RELEASE_LOG_RES 0x4 | ||
364 | #define XFS_TRANS_ABORT 0x8 | ||
365 | |||
366 | /* | ||
367 | * Field values for xfs_trans_mod_sb. | ||
368 | */ | ||
369 | #define XFS_TRANS_SB_ICOUNT 0x00000001 | ||
370 | #define XFS_TRANS_SB_IFREE 0x00000002 | ||
371 | #define XFS_TRANS_SB_FDBLOCKS 0x00000004 | ||
372 | #define XFS_TRANS_SB_RES_FDBLOCKS 0x00000008 | ||
373 | #define XFS_TRANS_SB_FREXTENTS 0x00000010 | ||
374 | #define XFS_TRANS_SB_RES_FREXTENTS 0x00000020 | ||
375 | #define XFS_TRANS_SB_DBLOCKS 0x00000040 | ||
376 | #define XFS_TRANS_SB_AGCOUNT 0x00000080 | ||
377 | #define XFS_TRANS_SB_IMAXPCT 0x00000100 | ||
378 | #define XFS_TRANS_SB_REXTSIZE 0x00000200 | ||
379 | #define XFS_TRANS_SB_RBMBLOCKS 0x00000400 | ||
380 | #define XFS_TRANS_SB_RBLOCKS 0x00000800 | ||
381 | #define XFS_TRANS_SB_REXTENTS 0x00001000 | ||
382 | #define XFS_TRANS_SB_REXTSLOG 0x00002000 | ||
383 | |||
384 | /* | ||
385 | * Here we centralize the specification of XFS meta-data buffer | ||
386 | * reference count values. This determine how hard the buffer | ||
387 | * cache tries to hold onto the buffer. | ||
388 | */ | ||
389 | #define XFS_AGF_REF 4 | ||
390 | #define XFS_AGI_REF 4 | ||
391 | #define XFS_AGFL_REF 3 | ||
392 | #define XFS_INO_BTREE_REF 3 | ||
393 | #define XFS_ALLOC_BTREE_REF 2 | ||
394 | #define XFS_BMAP_BTREE_REF 2 | ||
395 | #define XFS_DIR_BTREE_REF 2 | ||
396 | #define XFS_INO_REF 2 | ||
397 | #define XFS_ATTR_BTREE_REF 1 | ||
398 | #define XFS_DQUOT_REF 1 | ||
399 | |||
400 | /* | ||
401 | * Flags for xfs_trans_ichgtime(). | ||
402 | */ | ||
403 | #define XFS_ICHGTIME_MOD 0x1 /* data fork modification timestamp */ | ||
404 | #define XFS_ICHGTIME_CHG 0x2 /* inode field change timestamp */ | ||
405 | #define XFS_ICHGTIME_CREATE 0x4 /* inode create timestamp */ | ||
406 | |||
407 | |||
408 | /* | ||
409 | * Inode Log Item Format definitions. | 237 | * Inode Log Item Format definitions. |
410 | * | 238 | * |
411 | * This is the structure used to lay out an inode log item in the | 239 | * This is the structure used to lay out an inode log item in the |
@@ -797,7 +625,6 @@ typedef struct xfs_qoff_logformat { | |||
797 | char qf_pad[12]; /* padding for future */ | 625 | char qf_pad[12]; /* padding for future */ |
798 | } xfs_qoff_logformat_t; | 626 | } xfs_qoff_logformat_t; |
799 | 627 | ||
800 | |||
801 | /* | 628 | /* |
802 | * Disk quotas status in m_qflags, and also sb_qflags. 16 bits. | 629 | * Disk quotas status in m_qflags, and also sb_qflags. 16 bits. |
803 | */ | 630 | */ |
@@ -849,8 +676,4 @@ struct xfs_icreate_log { | |||
849 | __be32 icl_gen; /* inode generation number to use */ | 676 | __be32 icl_gen; /* inode generation number to use */ |
850 | }; | 677 | }; |
851 | 678 | ||
852 | int xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes); | ||
853 | int xfs_log_calc_minimum_size(struct xfs_mount *); | ||
854 | |||
855 | |||
856 | #endif /* __XFS_LOG_FORMAT_H__ */ | 679 | #endif /* __XFS_LOG_FORMAT_H__ */ |