From: "Darrick J. Wong" <djwong@kernel.org>
To: aalbersh@kernel.org, djwong@kernel.org, cem@kernel.org
Cc: Julian Sun <sunjunchao2870@gmail.com>,
Chandan Babu R <chandanbabu@kernel.org>,
linux-xfs@vger.kernel.org
Subject: [PATCH 62/64] xfs: remove unused parameter in macro XFS_DQUOT_LOGRES
Date: Tue, 01 Oct 2024 18:23:58 -0700 [thread overview]
Message-ID: <172783102714.4036371.5964586442120497902.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <172783101710.4036371.10020616537589726441.stgit@frogsfrogsfrogs>
From: Julian Sun <sunjunchao2870@gmail.com>
Source kernel commit: af5d92f2fad818663da2ce073b6fe15b9d56ffdc
In the macro definition of XFS_DQUOT_LOGRES, a parameter is accepted,
but it is not used. Hence, it should be removed.
This patch has only passed compilation test, but it should be fine.
Signed-off-by: Julian Sun <sunjunchao2870@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
---
libxfs/xfs_quota_defs.h | 2 +-
libxfs/xfs_trans_resv.c | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/libxfs/xfs_quota_defs.h b/libxfs/xfs_quota_defs.h
index cb035da3f..fb05f44f6 100644
--- a/libxfs/xfs_quota_defs.h
+++ b/libxfs/xfs_quota_defs.h
@@ -56,7 +56,7 @@ typedef uint8_t xfs_dqtype_t;
* And, of course, we also need to take into account the dquot log format item
* used to describe each dquot.
*/
-#define XFS_DQUOT_LOGRES(mp) \
+#define XFS_DQUOT_LOGRES \
((sizeof(struct xfs_dq_logformat) + sizeof(struct xfs_disk_dquot)) * 6)
#define XFS_IS_QUOTA_ON(mp) ((mp)->m_qflags & XFS_ALL_QUOTA_ACCT)
diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c
index a2cb4d63e..6b87bf4d5 100644
--- a/libxfs/xfs_trans_resv.c
+++ b/libxfs/xfs_trans_resv.c
@@ -335,11 +335,11 @@ xfs_calc_write_reservation(
blksz);
t1 += adj;
t3 += adj;
- return XFS_DQUOT_LOGRES(mp) + max3(t1, t2, t3);
+ return XFS_DQUOT_LOGRES + max3(t1, t2, t3);
}
t4 = xfs_calc_refcountbt_reservation(mp, 1);
- return XFS_DQUOT_LOGRES(mp) + max(t4, max3(t1, t2, t3));
+ return XFS_DQUOT_LOGRES + max(t4, max3(t1, t2, t3));
}
unsigned int
@@ -407,11 +407,11 @@ xfs_calc_itruncate_reservation(
xfs_refcountbt_block_count(mp, 4),
blksz);
- return XFS_DQUOT_LOGRES(mp) + max3(t1, t2, t3);
+ return XFS_DQUOT_LOGRES + max3(t1, t2, t3);
}
t4 = xfs_calc_refcountbt_reservation(mp, 2);
- return XFS_DQUOT_LOGRES(mp) + max(t4, max3(t1, t2, t3));
+ return XFS_DQUOT_LOGRES + max(t4, max3(t1, t2, t3));
}
unsigned int
@@ -463,7 +463,7 @@ STATIC uint
xfs_calc_rename_reservation(
struct xfs_mount *mp)
{
- unsigned int overhead = XFS_DQUOT_LOGRES(mp);
+ unsigned int overhead = XFS_DQUOT_LOGRES;
struct xfs_trans_resv *resp = M_RES(mp);
unsigned int t1, t2, t3 = 0;
@@ -574,7 +574,7 @@ STATIC uint
xfs_calc_link_reservation(
struct xfs_mount *mp)
{
- unsigned int overhead = XFS_DQUOT_LOGRES(mp);
+ unsigned int overhead = XFS_DQUOT_LOGRES;
struct xfs_trans_resv *resp = M_RES(mp);
unsigned int t1, t2, t3 = 0;
@@ -638,7 +638,7 @@ STATIC uint
xfs_calc_remove_reservation(
struct xfs_mount *mp)
{
- unsigned int overhead = XFS_DQUOT_LOGRES(mp);
+ unsigned int overhead = XFS_DQUOT_LOGRES;
struct xfs_trans_resv *resp = M_RES(mp);
unsigned int t1, t2, t3 = 0;
@@ -726,7 +726,7 @@ xfs_calc_icreate_reservation(
struct xfs_mount *mp)
{
struct xfs_trans_resv *resp = M_RES(mp);
- unsigned int overhead = XFS_DQUOT_LOGRES(mp);
+ unsigned int overhead = XFS_DQUOT_LOGRES;
unsigned int t1, t2, t3 = 0;
t1 = xfs_calc_icreate_resv_alloc(mp);
@@ -744,7 +744,7 @@ STATIC uint
xfs_calc_create_tmpfile_reservation(
struct xfs_mount *mp)
{
- uint res = XFS_DQUOT_LOGRES(mp);
+ uint res = XFS_DQUOT_LOGRES;
res += xfs_calc_icreate_resv_alloc(mp);
return res + xfs_calc_iunlink_add_reservation(mp);
@@ -826,7 +826,7 @@ STATIC uint
xfs_calc_ifree_reservation(
struct xfs_mount *mp)
{
- return XFS_DQUOT_LOGRES(mp) +
+ return XFS_DQUOT_LOGRES +
xfs_calc_inode_res(mp, 1) +
xfs_calc_buf_res(3, mp->m_sb.sb_sectsize) +
xfs_calc_iunlink_remove_reservation(mp) +
@@ -843,7 +843,7 @@ STATIC uint
xfs_calc_ichange_reservation(
struct xfs_mount *mp)
{
- return XFS_DQUOT_LOGRES(mp) +
+ return XFS_DQUOT_LOGRES +
xfs_calc_inode_res(mp, 1) +
xfs_calc_buf_res(1, mp->m_sb.sb_sectsize);
@@ -952,7 +952,7 @@ STATIC uint
xfs_calc_addafork_reservation(
struct xfs_mount *mp)
{
- return XFS_DQUOT_LOGRES(mp) +
+ return XFS_DQUOT_LOGRES +
xfs_calc_inode_res(mp, 1) +
xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) +
xfs_calc_buf_res(1, mp->m_dir_geo->blksize) +
@@ -1000,7 +1000,7 @@ STATIC uint
xfs_calc_attrsetm_reservation(
struct xfs_mount *mp)
{
- return XFS_DQUOT_LOGRES(mp) +
+ return XFS_DQUOT_LOGRES +
xfs_calc_inode_res(mp, 1) +
xfs_calc_buf_res(1, mp->m_sb.sb_sectsize) +
xfs_calc_buf_res(XFS_DA_NODE_MAXDEPTH, XFS_FSB_TO_B(mp, 1));
@@ -1040,7 +1040,7 @@ STATIC uint
xfs_calc_attrrm_reservation(
struct xfs_mount *mp)
{
- return XFS_DQUOT_LOGRES(mp) +
+ return XFS_DQUOT_LOGRES +
max((xfs_calc_inode_res(mp, 1) +
xfs_calc_buf_res(XFS_DA_NODE_MAXDEPTH,
XFS_FSB_TO_B(mp, 1)) +
next prev parent reply other threads:[~2024-10-02 1:23 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 1:00 [PATCHBOMB] xfsprogs: catch us up to 6.11 Darrick J. Wong
2024-10-02 1:04 ` [PATCHSET 1/6] xfsprogs: Debian and Ubuntu archive changes Darrick J. Wong
2024-10-02 1:05 ` [PATCH 1/6] debian: Update debhelper-compat level Darrick J. Wong
2024-10-02 1:06 ` [PATCH 2/6] debian: Update public release key Darrick J. Wong
2024-10-02 1:06 ` [PATCH 3/6] debian: Prevent recreating the orig tarball Darrick J. Wong
2024-10-02 1:06 ` [PATCH 4/6] debian: Add Build-Depends on pkg with systemd.pc Darrick J. Wong
2024-10-02 1:07 ` [PATCH 5/6] debian: Modernize build script Darrick J. Wong
2024-10-02 1:07 ` [PATCH 6/6] debian: Correct the day-of-week on 2024-09-04 Darrick J. Wong
2024-10-02 5:47 ` [PATCHSET 1/6] xfsprogs: Debian and Ubuntu archive changes Christoph Hellwig
2024-10-02 1:04 ` [PATCHSET 2/6] xfsprogs: do not depend on libattr Darrick J. Wong
2024-10-02 1:07 ` [PATCH 1/2] misc: clean up code around attr_list_by_handle calls Darrick J. Wong
2024-10-02 1:07 ` [PATCH 2/2] libfrog: emulate deprecated attrlist functionality in libattr Darrick J. Wong
2024-10-02 1:04 ` [PATCHSET v2.5 3/6] libxfs: resync with 6.11 Darrick J. Wong
2024-10-02 1:08 ` [PATCH 01/64] xfs: avoid redundant AGFL buffer invalidation Darrick J. Wong
2024-10-02 1:08 ` [PATCH 02/64] xfs: don't walk off the end of a directory data block Darrick J. Wong
2024-10-02 1:08 ` [PATCH 03/64] xfs: Remove header files which are included more than once Darrick J. Wong
2024-10-02 1:08 ` [PATCH 04/64] xfs: hoist extent size helpers to libxfs Darrick J. Wong
2024-10-02 1:09 ` [PATCH 05/64] xfs: hoist inode flag conversion functions " Darrick J. Wong
2024-10-02 1:09 ` [PATCH 06/64] xfs: hoist project id get/set " Darrick J. Wong
2024-10-02 1:09 ` [PATCH 07/64] libxfs: put all the inode functions in a single file Darrick J. Wong
2024-10-02 1:09 ` [PATCH 08/64] libxfs: pass IGET flags through to xfs_iread Darrick J. Wong
2024-10-02 5:47 ` Christoph Hellwig
2024-10-02 1:10 ` [PATCH 09/64] xfs: pack icreate initialization parameters into a separate structure Darrick J. Wong
2024-10-02 1:10 ` [PATCH 10/64] libxfs: " Darrick J. Wong
2024-10-02 1:10 ` [PATCH 11/64] xfs: implement atime updates in xfs_trans_ichgtime Darrick J. Wong
2024-10-02 1:10 ` [PATCH 12/64] libxfs: rearrange libxfs_trans_ichgtime call when creating inodes Darrick J. Wong
2024-10-02 5:48 ` Christoph Hellwig
2024-10-02 1:11 ` [PATCH 13/64] libxfs: set access time when creating files Darrick J. Wong
2024-10-02 5:49 ` Christoph Hellwig
2024-10-02 1:11 ` [PATCH 14/64] libxfs: when creating a file in a directory, set the project id based on the parent Darrick J. Wong
2024-10-02 5:49 ` Christoph Hellwig
2024-10-02 1:11 ` [PATCH 15/64] libxfs: pass flags2 from parent to child when creating files Darrick J. Wong
2024-10-02 5:49 ` Christoph Hellwig
2024-10-02 1:12 ` [PATCH 16/64] xfs: split new inode creation into two pieces Darrick J. Wong
2024-10-02 1:12 ` [PATCH 17/64] libxfs: " Darrick J. Wong
2024-10-02 1:12 ` [PATCH 18/64] libxfs: backport inode init code from the kernel Darrick J. Wong
2024-10-02 5:50 ` Christoph Hellwig
2024-10-02 1:12 ` [PATCH 19/64] libxfs: remove libxfs_dir_ialloc Darrick J. Wong
2024-10-02 5:51 ` Christoph Hellwig
2024-10-02 1:13 ` [PATCH 20/64] libxfs: implement get_random_u32 Darrick J. Wong
2024-10-02 5:51 ` Christoph Hellwig
2024-10-02 1:13 ` [PATCH 21/64] xfs: hoist new inode initialization functions to libxfs Darrick J. Wong
2024-10-02 1:13 ` [PATCH 22/64] xfs: hoist xfs_iunlink " Darrick J. Wong
2024-10-02 1:13 ` [PATCH 23/64] xfs: hoist xfs_{bump,drop}link " Darrick J. Wong
2024-10-02 1:14 ` [PATCH 24/64] xfs: separate the icreate logic around INIT_XATTRS Darrick J. Wong
2024-10-02 1:14 ` [PATCH 25/64] xfs: create libxfs helper to link a new inode into a directory Darrick J. Wong
2024-10-02 1:14 ` [PATCH 26/64] xfs: create libxfs helper to link an existing " Darrick J. Wong
2024-10-02 1:14 ` [PATCH 27/64] xfs: hoist inode free function to libxfs Darrick J. Wong
2024-10-02 1:15 ` [PATCH 28/64] xfs: create libxfs helper to remove an existing inode/name from a directory Darrick J. Wong
2024-10-02 1:15 ` [PATCH 29/64] xfs: create libxfs helper to exchange two directory entries Darrick J. Wong
2024-10-02 1:15 ` [PATCH 30/64] xfs: create libxfs helper to rename " Darrick J. Wong
2024-10-02 1:15 ` [PATCH 31/64] xfs: move dirent update hooks to xfs_dir2.c Darrick J. Wong
2024-10-02 1:16 ` [PATCH 32/64] xfs: don't use the incore struct xfs_sb for offsets into struct xfs_dsb Darrick J. Wong
2024-10-02 1:16 ` [PATCH 33/64] xfs: clean up extent free log intent item tracepoint callsites Darrick J. Wong
2024-10-02 1:16 ` [PATCH 34/64] xfs: convert "skip_discard" to a proper flags bitset Darrick J. Wong
2024-10-02 1:16 ` [PATCH 35/64] xfs: pass the fsbno to xfs_perag_intent_get Darrick J. Wong
2024-10-02 1:17 ` [PATCH 36/64] xfs: add a xefi_entry helper Darrick J. Wong
2024-10-02 1:17 ` [PATCH 37/64] xfs: reuse xfs_extent_free_cancel_item Darrick J. Wong
2024-10-02 1:17 ` [PATCH 38/64] xfs: remove duplicate asserts in xfs_defer_extent_free Darrick J. Wong
2024-10-02 1:17 ` [PATCH 39/64] xfs: remove xfs_defer_agfl_block Darrick J. Wong
2024-10-02 1:18 ` [PATCH 40/64] xfs: move xfs_extent_free_defer_add to xfs_extfree_item.c Darrick J. Wong
2024-10-02 1:18 ` [PATCH 41/64] xfs: give rmap btree cursor error tracepoints their own class Darrick J. Wong
2024-10-02 1:18 ` [PATCH 42/64] xfs: pass btree cursors to rmap btree tracepoints Darrick J. Wong
2024-10-02 1:19 ` [PATCH 43/64] xfs: clean up rmap log intent item tracepoint callsites Darrick J. Wong
2024-10-02 1:19 ` [PATCH 44/64] xfs: add a ri_entry helper Darrick J. Wong
2024-10-02 1:19 ` [PATCH 45/64] xfs: reuse xfs_rmap_update_cancel_item Darrick J. Wong
2024-10-02 1:19 ` [PATCH 46/64] xfs: don't bother calling xfs_rmap_finish_one_cleanup in xfs_rmap_finish_one Darrick J. Wong
2024-10-02 1:20 ` [PATCH 47/64] xfs: simplify usage of the rcur local variable " Darrick J. Wong
2024-10-02 1:20 ` [PATCH 48/64] xfs: move xfs_rmap_update_defer_add to xfs_rmap_item.c Darrick J. Wong
2024-10-02 1:20 ` [PATCH 49/64] xfs: give refcount btree cursor error tracepoints their own class Darrick J. Wong
2024-10-02 1:20 ` [PATCH 50/64] xfs: create specialized classes for refcount tracepoints Darrick J. Wong
2024-10-02 1:21 ` [PATCH 51/64] xfs: pass btree cursors to refcount btree tracepoints Darrick J. Wong
2024-10-02 1:21 ` [PATCH 52/64] xfs: clean up refcount log intent item tracepoint callsites Darrick J. Wong
2024-10-02 1:21 ` [PATCH 53/64] xfs: add a ci_entry helper Darrick J. Wong
2024-10-02 1:21 ` [PATCH 54/64] xfs: reuse xfs_refcount_update_cancel_item Darrick J. Wong
2024-10-02 1:22 ` [PATCH 55/64] xfs: don't bother calling xfs_refcount_finish_one_cleanup in xfs_refcount_finish_one Darrick J. Wong
2024-10-02 1:22 ` [PATCH 56/64] xfs: simplify usage of the rcur local variable " Darrick J. Wong
2024-10-02 1:22 ` [PATCH 57/64] xfs: move xfs_refcount_update_defer_add to xfs_refcount_item.c Darrick J. Wong
2024-10-02 1:22 ` [PATCH 58/64] xfs: Avoid races with cnt_btree lastrec updates Darrick J. Wong
2024-10-02 1:23 ` [PATCH 59/64] xfs: AIL doesn't need manual pushing Darrick J. Wong
2024-10-02 1:23 ` [PATCH 60/64] xfs: background AIL push should target physical space Darrick J. Wong
2024-10-02 1:23 ` [PATCH 61/64] xfs: get rid of xfs_ag_resv_rmapbt_alloc Darrick J. Wong
2024-10-02 1:23 ` Darrick J. Wong [this message]
2024-10-02 1:24 ` [PATCH 63/64] xfs: fix di_onlink checking for V1/V2 inodes Darrick J. Wong
2024-10-02 1:24 ` [PATCH 64/64] xfs: xfs_finobt_count_blocks() walks the wrong btree Darrick J. Wong
2024-10-02 1:05 ` [PATCHSET v2.5 4/6] xfsprogs: port tools to new 6.11 APIs Darrick J. Wong
2024-10-02 1:24 ` [PATCH 1/4] xfs_db: port the unlink command to use libxfs_droplink Darrick J. Wong
2024-10-02 5:52 ` Christoph Hellwig
2024-10-02 1:25 ` [PATCH 2/4] xfs_db/mkfs/xfs_repair: port to use XFS_ICREATE_UNLINKABLE Darrick J. Wong
2024-10-02 5:53 ` Christoph Hellwig
2024-10-02 22:50 ` Darrick J. Wong
2024-10-04 11:08 ` Andrey Albershteyn
2024-10-02 1:25 ` [PATCH 3/4] xfs_db/mdrestore/repair: don't use the incore struct xfs_sb for offsets into struct xfs_dsb Darrick J. Wong
2024-10-02 5:54 ` Christoph Hellwig
2024-10-02 22:51 ` Darrick J. Wong
2024-10-02 1:25 ` [PATCH 4/4] xfs_db: port the iunlink command to use the libxfs iunlink function Darrick J. Wong
2024-10-02 5:54 ` Christoph Hellwig
2024-10-02 1:05 ` [PATCHSET 5/6] xfs_repair: cleanups for 6.11 Darrick J. Wong
2024-10-02 1:25 ` [PATCH 1/4] xfs_repair: fix exchrange upgrade Darrick J. Wong
2024-10-02 5:57 ` Christoph Hellwig
2024-10-02 1:26 ` [PATCH 2/4] xfs_repair: don't crash in get_inode_parent Darrick J. Wong
2024-10-02 5:58 ` Christoph Hellwig
2024-10-02 1:26 ` [PATCH 3/4] xfs_repair: use library functions to reset root/rbm/rsum inodes Darrick J. Wong
2024-10-02 5:58 ` Christoph Hellwig
2024-10-02 1:26 ` [PATCH 4/4] xfs_repair: use library functions for orphanage creation Darrick J. Wong
2024-10-02 5:58 ` Christoph Hellwig
2024-10-02 1:05 ` [PATCHSET v2.5 6/6] mkfs: clean up inode initialization code Darrick J. Wong
2024-10-02 1:26 ` [PATCH 1/2] mkfs: clean up the rtinit() function Darrick J. Wong
2024-10-02 6:03 ` Christoph Hellwig
2024-10-02 1:27 ` [PATCH 2/2] mkfs: break up the rest of " Darrick J. Wong
2024-10-02 6:04 ` Christoph Hellwig
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=172783102714.4036371.5964586442120497902.stgit@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@kernel.org \
--cc=cem@kernel.org \
--cc=chandanbabu@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sunjunchao2870@gmail.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