From: Mark Tinguely <tinguely@sgi.com>
To: XFS Community List <xfs@oss.sgi.com>
Subject: [patch 5/4] xfsprogs: add field types to v4 xfs_db directory entries
Date: Wed, 23 Oct 2013 08:39:28 -0500 [thread overview]
Message-ID: <20131023133932.145199412@sgi.com> (raw)
In-Reply-To: 20131017152804.204045257@sgi.com
[-- Attachment #1: 5-4-xfsprog-add-ftype-to-xfs_db-v4-dirs.patch --]
[-- Type: text/plain, Size: 1697 bytes --]
Display the inode type field that follows the name in xfs_db
for dir2 (non-crc filesystems) that enabled the feature
(mkfs -n ftype).
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
---
db/dir2.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: b/db/dir2.c
===================================================================
--- a/db/dir2.c
+++ b/db/dir2.c
@@ -52,6 +52,8 @@ static int dir2_leaf_tail_count(void *ob
static int dir2_leaf_tail_offset(void *obj, int startoff, int idx);
static int dir2_node_btree_count(void *obj, int startoff);
static int dir2_node_hdr_count(void *obj, int startoff);
+static int dir3_data_union_ftype_offset(void *obj, int startoff, int idx);
+static int dir2_data_union_ftype_count(void *obj, int startoff);
const field_t dir2_hfld[] = {
{ "", FLDT_DIR2, OI(0), C1, 0, TYP_NONE },
@@ -130,6 +132,8 @@ const field_t dir2_data_union_flds[] = {
dir2_data_union_namelen_count, FLD_COUNT, TYP_NONE },
{ "name", FLDT_CHARNS, OI(DEOFF(name)), dir2_data_union_name_count,
FLD_COUNT, TYP_NONE },
+ { "filetype", FLDT_UINT8D, dir3_data_union_ftype_offset,
+ dir2_data_union_ftype_count, FLD_OFFSET|FLD_COUNT, TYP_NONE },
{ "tag", FLDT_DIR2_DATA_OFF, dir2_data_union_tag_offset,
dir2_data_union_tag_count, FLD_OFFSET|FLD_COUNT, TYP_NONE },
{ NULL }
@@ -454,6 +458,14 @@ dir2_data_union_name_count(
}
static int
+dir2_data_union_ftype_count(
+ void *obj,
+ int startoff)
+{
+ return xfs_sb_version_hasftype(&mp->m_sb);
+}
+
+static int
dir2_data_union_namelen_count(
void *obj,
int startoff)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2013-10-23 13:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 15:28 [PATCH v3 0/4] xfsprogs: v4 inode type in directory Mark Tinguely
2013-10-17 15:28 ` [PATCH v3 1/4] xfsprog: add xfs sb v4 support for dirent filetype field Mark Tinguely
2013-10-22 23:23 ` Dave Chinner
2013-10-23 23:47 ` Rich Johnston
2013-10-17 15:28 ` [PATCH v3 2/4] xfsprog: add dirent filetype information for xfs_info Mark Tinguely
2013-10-22 23:23 ` Dave Chinner
2013-10-23 23:43 ` Rich Johnston
2013-10-17 15:28 ` [PATCH v3 3/4] xfs_progs: add dirent filetype to xfs_db version Mark Tinguely
2013-10-22 23:24 ` Dave Chinner
2013-10-23 23:43 ` Rich Johnston
2013-10-17 15:28 ` [PATCH v3 4/4] xfsprog: add mkfs.xfs sb v4 support for dirent filetype field Mark Tinguely
2013-10-22 23:26 ` Dave Chinner
2013-10-23 23:43 ` Rich Johnston
2013-10-24 16:15 ` Christoph Hellwig
2013-10-24 21:17 ` Dave Chinner
2013-10-24 21:29 ` Mark Tinguely
2013-10-17 22:08 ` [PATCH v3 0/4] xfsprogs: v4 inode type in directory Mark Tinguely
2013-10-18 3:19 ` Dave Chinner
2013-10-18 13:22 ` Mark Tinguely
2013-10-18 22:55 ` Dave Chinner
2013-10-20 18:17 ` Mark Tinguely
2013-10-22 23:27 ` Dave Chinner
2013-10-23 13:39 ` Mark Tinguely [this message]
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=20131023133932.145199412@sgi.com \
--to=tinguely@sgi.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