From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 05/22] libxfs: move the transaction reservation structures
Date: Wed, 12 Jun 2013 20:36:17 +1000 [thread overview]
Message-ID: <1371033394-26006-6-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1371033394-26006-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
To prepare for getting rid of xfs_mount.h, we need to move the
definition of the struct for pre-calculated transaction reservations
out of xfs_mount.h. Move it to xfs_trans.h along with all the other
transaction reservation definitions.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
include/libxfs.h | 5 ++---
include/xfs_mount.h | 30 ------------------------------
include/xfs_trans.h | 30 ++++++++++++++++++++++++++++++
mkfs/maxtrres.c | 2 +-
4 files changed, 33 insertions(+), 34 deletions(-)
diff --git a/include/libxfs.h b/include/libxfs.h
index 900b115..9ab9604 100644
--- a/include/libxfs.h
+++ b/include/libxfs.h
@@ -58,6 +58,7 @@
#include <xfs/xfs_trace.h>
#include <xfs/xfs_symlink.h>
#include <xfs/xfs_icreate_item.h>
+#include <xfs/xfs_trans.h>
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -202,7 +203,7 @@ typedef struct xfs_mount {
int m_ialloc_blks; /* blocks in inode allocation */
int m_litino; /* size of inode union area */
int m_inoalign_mask;/* mask sb_inoalignmt if used */
- xfs_trans_reservations_t m_reservations;/* precomputed res values */
+ struct xfs_trans_reservations m_reservations;/* precomputed res values */
__uint64_t m_maxicount; /* maximum inode count */
int m_dalign; /* stripe unit */
int m_swidth; /* stripe width */
@@ -436,8 +437,6 @@ typedef struct xfs_buf_log_item {
xfs_buf_log_format_t bli_format; /* in-log header */
} xfs_buf_log_item_t;
-#include <xfs/xfs_trans.h>
-
typedef struct xfs_trans {
unsigned int t_type; /* transaction type */
unsigned int t_log_res; /* amt of log space resvd */
diff --git a/include/xfs_mount.h b/include/xfs_mount.h
index e609b5f..ce0adfb 100644
--- a/include/xfs_mount.h
+++ b/include/xfs_mount.h
@@ -18,36 +18,6 @@
#ifndef __XFS_MOUNT_H__
#define __XFS_MOUNT_H__
-typedef struct xfs_trans_reservations {
- uint tr_write; /* extent alloc trans */
- uint tr_itruncate; /* truncate trans */
- uint tr_rename; /* rename trans */
- uint tr_link; /* link trans */
- uint tr_remove; /* unlink trans */
- uint tr_symlink; /* symlink trans */
- uint tr_create; /* create trans */
- uint tr_mkdir; /* mkdir trans */
- uint tr_ifree; /* inode free trans */
- uint tr_ichange; /* inode update trans */
- uint tr_growdata; /* fs data section grow trans */
- uint tr_swrite; /* sync write inode trans */
- uint tr_addafork; /* cvt inode to attributed trans */
- uint tr_writeid; /* write setuid/setgid file */
- uint tr_attrinval; /* attr fork buffer invalidation */
- uint tr_attrsetm; /* set/create an attribute at mount time */
- uint tr_attrsetrt; /* set/create an attribute at runtime */
- uint tr_attrrm; /* remove an attribute */
- uint tr_clearagi; /* clear bad agi unlinked ino bucket */
- uint tr_growrtalloc; /* grow realtime allocations */
- uint tr_growrtzero; /* grow realtime zeroing */
- uint tr_growrtfree; /* grow realtime freeing */
- uint tr_qm_sbchange; /* change quota flags */
- uint tr_qm_setqlim; /* adjust quota limits */
- uint tr_qm_dqalloc; /* allocate quota on disk */
- uint tr_qm_quotaoff; /* turn quota off */
- uint tr_qm_equotaoff;/* end of turn quota off */
- uint tr_sb; /* modify superblock */
-} xfs_trans_reservations_t;
#ifndef __KERNEL__
diff --git a/include/xfs_trans.h b/include/xfs_trans.h
index 36a0026..78074f3 100644
--- a/include/xfs_trans.h
+++ b/include/xfs_trans.h
@@ -209,6 +209,36 @@ struct xfs_log_item_desc {
#define XFS_TRANS_SB_REXTENTS 0x00001000
#define XFS_TRANS_SB_REXTSLOG 0x00002000
+struct xfs_trans_reservations {
+ uint tr_write; /* extent alloc trans */
+ uint tr_itruncate; /* truncate trans */
+ uint tr_rename; /* rename trans */
+ uint tr_link; /* link trans */
+ uint tr_remove; /* unlink trans */
+ uint tr_symlink; /* symlink trans */
+ uint tr_create; /* create trans */
+ uint tr_mkdir; /* mkdir trans */
+ uint tr_ifree; /* inode free trans */
+ uint tr_ichange; /* inode update trans */
+ uint tr_growdata; /* fs data section grow trans */
+ uint tr_swrite; /* sync write inode trans */
+ uint tr_addafork; /* cvt inode to attributed trans */
+ uint tr_writeid; /* write setuid/setgid file */
+ uint tr_attrinval; /* attr fork buffer invalidation */
+ uint tr_attrsetm; /* set/create an attribute at mount time */
+ uint tr_attrsetrt; /* set/create an attribute at runtime */
+ uint tr_attrrm; /* remove an attribute */
+ uint tr_clearagi; /* clear bad agi unlinked ino bucket */
+ uint tr_growrtalloc; /* grow realtime allocations */
+ uint tr_growrtzero; /* grow realtime zeroing */
+ uint tr_growrtfree; /* grow realtime freeing */
+ uint tr_qm_sbchange; /* change quota flags */
+ uint tr_qm_setqlim; /* adjust quota limits */
+ uint tr_qm_dqalloc; /* allocate quota on disk */
+ uint tr_qm_quotaoff; /* turn quota off */
+ uint tr_qm_equotaoff;/* end of turn quota off */
+ uint tr_sb; /* modify superblock */
+};
/*
* Per-extent log reservation for the allocation btree changes
diff --git a/mkfs/maxtrres.c b/mkfs/maxtrres.c
index d571d77..373e582 100644
--- a/mkfs/maxtrres.c
+++ b/mkfs/maxtrres.c
@@ -56,7 +56,7 @@ max_trans_res_by_mount(
{
uint *p;
int rval;
- xfs_trans_reservations_t *tr = &mp->m_reservations;
+ struct xfs_trans_reservations *tr = &mp->m_reservations;
for (rval = 0, p = (uint *)tr; p < (uint *)(tr + 1); p++) {
if ((int)*p > rval)
--
1.7.10.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-06-12 10:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 10:36 [PATCH 00/22] xfsprogs: sync up with 3.11 kernel code Dave Chinner
2013-06-12 10:36 ` [PATCH 01/22] xfsprogs: introduce xfs_icreate.h Dave Chinner
2013-06-12 10:36 ` [PATCH 02/22] xfsprogs: port inode create transaction changes Dave Chinner
2013-06-12 10:36 ` [PATCH 03/22] xfsprogs: teach logprint about icreate transaction Dave Chinner
2013-06-12 10:36 ` [PATCH 04/22] libxfs: switch over to xfs_sb.c and remove xfs_mount.c Dave Chinner
2013-06-12 10:36 ` Dave Chinner [this message]
2013-06-12 10:36 ` [PATCH 06/22] xfsprogs: remove xfs_mount.h Dave Chinner
2013-06-12 10:36 ` [PATCH 07/22] libxfs: update xfs_inode.h to match new kernel version Dave Chinner
2013-06-12 10:36 ` [PATCH 08/22] xfs: remove local fork format handling from xfs_bmapi_write() Dave Chinner
2013-06-12 10:36 ` [PATCH 09/22] libxfs: local to remote format support of remote symlinks Dave Chinner
2013-06-12 10:36 ` [PATCH 10/22] xfsprogs: sync minor kernel header differences Dave Chinner
2013-06-12 10:36 ` [PATCH 11/22] libxfs: introduce xfs_trans_resv.c Dave Chinner
2013-06-12 10:36 ` [PATCH 12/22] libxfs: fix directory/attribute format issues Dave Chinner
2013-06-12 10:36 ` [PATCH 13/22] libxfs: ensure btree root split sets blkno correctly Dave Chinner
2013-06-12 10:36 ` [PATCH 14/22] libxfs: move transaction code to trans.c Dave Chinner
2013-06-12 10:36 ` [PATCH 15/22] libxfs: fix byte swapping on constants Dave Chinner
2013-06-12 10:36 ` [PATCH 16/22] libxfs: sync xfs_da_btree.c Dave Chinner
2013-06-12 10:36 ` [PATCH 17/22] libxfs: update xfs_alloc to current kernel version Dave Chinner
2013-06-12 10:36 ` [PATCH 18/22] libxfs: sync attr code with kernel Dave Chinner
2013-06-12 10:36 ` [PATCH 19/22] libxfs: sync dir2 kernel differences Dave Chinner
2013-06-12 10:36 ` [PATCH 20/22] libxfs: sync xfs_ialloc.c to the kernel code Dave Chinner
2013-06-12 10:36 ` [PATCH 21/22] xfsprogs: define min/max once and use them everywhere Dave Chinner
2013-06-12 10:36 ` [PATCH 22/22] libxfs: fix compile warnings Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371033394-26006-6-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox