xfs_icreate_item.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2008-2010, Dave Chinner
  3. * All Rights Reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it would be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write the Free Software Foundation,
  16. * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef XFS_ICREATE_ITEM_H
  19. #define XFS_ICREATE_ITEM_H 1
  20. /*
  21. * on disk log item structure
  22. *
  23. * Log recovery assumes the first two entries are the type and size and they fit
  24. * in 32 bits. Also in host order (ugh) so they have to be 32 bit aligned so
  25. * decoding can be done correctly.
  26. */
  27. struct xfs_icreate_log {
  28. __uint16_t icl_type; /* type of log format structure */
  29. __uint16_t icl_size; /* size of log format structure */
  30. __be32 icl_ag; /* ag being allocated in */
  31. __be32 icl_agbno; /* start block of inode range */
  32. __be32 icl_count; /* number of inodes to initialise */
  33. __be32 icl_isize; /* size of inodes */
  34. __be32 icl_length; /* length of extent to initialise */
  35. __be32 icl_gen; /* inode generation number to use */
  36. };
  37. /* in memory log item structure */
  38. struct xfs_icreate_item {
  39. struct xfs_log_item ic_item;
  40. struct xfs_icreate_log ic_format;
  41. };
  42. extern kmem_zone_t *xfs_icreate_zone; /* inode create item zone */
  43. void xfs_icreate_log(struct xfs_trans *tp, xfs_agnumber_t agno,
  44. xfs_agblock_t agbno, unsigned int count,
  45. unsigned int inode_size, xfs_agblock_t length,
  46. unsigned int generation);
  47. #endif /* XFS_ICREATE_ITEM_H */