From: Jeff Liu <jeff.liu@oracle.com>
To: xfs@oss.sgi.com
Subject: [PATCH 0/4] xfs: Kill the hardcode number 128 for transactions space reservation
Date: Fri, 07 Dec 2012 20:13:02 +0800 [thread overview]
Message-ID: <50C1DD4E.80909@oracle.com> (raw)
Hello,
We have a hard code number of "128" for almost all sorts of transactions space reservations.
This number is used to reserve the space for the struct xfs_buf_log_format that gets written
into the log for every buffer as well as a little bit of extra space because there also needs
a log opheader, i.e. struct xlog_op_header.
This idea is totally inspired by Dave's comments at:
http://oss.sgi.com/archives/xfs/2012-12/msg00009.html
I'll add Signed-off-by for Dave once the patches are qualified to be accept for his credit.
The patches replace the magic number with a new function xfs_buf_log_overhead(), which is
introduced to examine the extra buf log space more flexible than hard coding it.
Maybe it's better to tweak it up in a macro to make the code style in xfs_trans.c looks a bit neat?
#define XFS_BUF_LOG_OVERHEAD (xfs_buf_log_overhead())
To make sure there is no regression with those changes, I have run dozens of xfs test cases, they
are works to me.
[PATCH 1/4] Add a new function xfs_buf_log_overhead() to replace the hard-code number of 128
[PATCH 2/4] Make xfs_fs_log_dummy() aware of this change
[PATCH 3/4] Make super block unit change related transactions aware of this change
[PATCH 4/4] Make disk quota related transactions aware of this change
---
fs/xfs/xfs_dquot.c | 6 ++-
fs/xfs/xfs_fsops.c | 5 +-
fs/xfs/xfs_mount.c | 15 +++---
fs/xfs/xfs_qm.c | 6 +--
fs/xfs/xfs_qm_syscalls.c | 20 ++++----
fs/xfs/xfs_trans.c | 113 ++++++++++++++++++++++++++++++----------------
fs/xfs/xfs_trans.h | 4 +-
7 files changed, 106 insertions(+), 63 deletions(-)
Thanks,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
reply other threads:[~2012-12-07 12:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=50C1DD4E.80909@oracle.com \
--to=jeff.liu@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.