From: Christoph Hellwig <hch@lst.de>
To: Chandan Babu R <chandan.babu@oracle.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>, linux-xfs@vger.kernel.org
Subject: [PATCH 8/8] xfs: remove xfs_attr_sf_hdr_t
Date: Sun, 17 Dec 2023 18:03:50 +0100 [thread overview]
Message-ID: <20231217170350.605812-9-hch@lst.de> (raw)
In-Reply-To: <20231217170350.605812-1-hch@lst.de>
Remove the last two users of the typedef and move the comment next to
its declaration to a more useful place.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/libxfs/xfs_attr_leaf.c | 4 ++--
fs/xfs/libxfs/xfs_attr_sf.h | 8 --------
fs/xfs/libxfs/xfs_da_format.h | 5 ++++-
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
index e1281ab413c832..6374bf10724207 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.c
+++ b/fs/xfs/libxfs/xfs_attr_leaf.c
@@ -816,7 +816,7 @@ xfs_attr_sf_removename(
/*
* Fix up the start offset of the attribute fork
*/
- if (totsize == sizeof(xfs_attr_sf_hdr_t) && xfs_has_attr2(mp) &&
+ if (totsize == sizeof(struct xfs_attr_sf_hdr) && xfs_has_attr2(mp) &&
(dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
!(args->op_flags & (XFS_DA_OP_ADDNAME | XFS_DA_OP_REPLACE))) {
xfs_attr_fork_remove(dp, args->trans);
@@ -824,7 +824,7 @@ xfs_attr_sf_removename(
xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
dp->i_forkoff = xfs_attr_shortform_bytesfit(dp, totsize);
ASSERT(dp->i_forkoff);
- ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) ||
+ ASSERT(totsize > sizeof(struct xfs_attr_sf_hdr) ||
(args->op_flags & XFS_DA_OP_ADDNAME) ||
!xfs_has_attr2(mp) ||
dp->i_df.if_format == XFS_DINODE_FMT_BTREE);
diff --git a/fs/xfs/libxfs/xfs_attr_sf.h b/fs/xfs/libxfs/xfs_attr_sf.h
index a1d5ef88ca2673..0600b4e408fa36 100644
--- a/fs/xfs/libxfs/xfs_attr_sf.h
+++ b/fs/xfs/libxfs/xfs_attr_sf.h
@@ -6,14 +6,6 @@
#ifndef __XFS_ATTR_SF_H__
#define __XFS_ATTR_SF_H__
-/*
- * Attribute storage when stored inside the inode.
- *
- * Small attribute lists are packed as tightly as possible so as
- * to fit into the literal area of the inode.
- */
-typedef struct xfs_attr_sf_hdr xfs_attr_sf_hdr_t;
-
/*
* We generate this then sort it, attr_list() must return things in hash-order.
*/
diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h
index 650fedce40449e..dcfe2fe9edc385 100644
--- a/fs/xfs/libxfs/xfs_da_format.h
+++ b/fs/xfs/libxfs/xfs_da_format.h
@@ -578,7 +578,10 @@ xfs_dir2_block_leaf_p(struct xfs_dir2_block_tail *btp)
#define XFS_ATTR_LEAF_MAPSIZE 3 /* how many freespace slots */
/*
- * Entries are packed toward the top as tight as possible.
+ * Attribute storage when stored inside the inode.
+ *
+ * Small attribute lists are packed as tightly as possible so as
+ * to fit into the literal area of the inode.
*/
struct xfs_attr_sf_hdr { /* constant-structure header block */
__be16 totsize; /* total bytes in shortform list */
--
2.39.2
next prev parent reply other threads:[~2023-12-17 17:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-17 17:03 attr cleanups Christoph Hellwig
2023-12-17 17:03 ` [PATCH 1/8] xfs: make if_data a void pointer Christoph Hellwig
2023-12-18 22:31 ` Darrick J. Wong
2023-12-19 4:20 ` Christoph Hellwig
2023-12-19 4:48 ` Darrick J. Wong
2023-12-17 17:03 ` [PATCH 2/8] xfs: return if_data from xfs_idata_realloc Christoph Hellwig
2023-12-18 22:29 ` Darrick J. Wong
2023-12-17 17:03 ` [PATCH 3/8] xfs: move the xfs_attr_sf_lookup tracepoint Christoph Hellwig
2023-12-18 22:39 ` Darrick J. Wong
2023-12-19 4:21 ` Christoph Hellwig
2023-12-19 4:52 ` Darrick J. Wong
2023-12-17 17:03 ` [PATCH 4/8] xfs: simplify xfs_attr_sf_findname Christoph Hellwig
2023-12-18 22:35 ` Darrick J. Wong
2023-12-17 17:03 ` [PATCH 5/8] xfs: remove xfs_attr_shortform_lookup Christoph Hellwig
2023-12-18 22:37 ` Darrick J. Wong
2023-12-17 17:03 ` [PATCH 6/8] xfs: use xfs_attr_sf_findname in xfs_attr_shortform_getvalue Christoph Hellwig
2023-12-18 22:37 ` Darrick J. Wong
2023-12-17 17:03 ` [PATCH 7/8] xfs: remove struct xfs_attr_shortform Christoph Hellwig
2023-12-17 21:12 ` Dave Chinner
2023-12-18 4:30 ` Christoph Hellwig
2023-12-18 22:41 ` Darrick J. Wong
2023-12-17 17:03 ` Christoph Hellwig [this message]
2023-12-18 22:39 ` [PATCH 8/8] xfs: remove xfs_attr_sf_hdr_t Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2023-12-19 12:08 attr cleanups v2 Christoph Hellwig
2023-12-19 12:08 ` [PATCH 8/8] xfs: remove xfs_attr_sf_hdr_t 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=20231217170350.605812-9-hch@lst.de \
--to=hch@lst.de \
--cc=chandan.babu@oracle.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).