From: Wade Cline <clinew@linux.vnet.ibm.com>
To: tytso@mit.edu
Cc: "cmm@linux.vnet.ibm.com" <cmm@linux.vnet.ibm.com>,
linux-btrfs@vger.kernel.org
Subject: [e2fsprogs] ext2_dir_entry To ext2_dir_entry_2 Casting
Date: Tue, 02 Oct 2012 12:02:22 -0700 [thread overview]
Message-ID: <506B3A3E.1060003@linux.vnet.ibm.com> (raw)
In-Reply-To: <506B31B7.40405@linux.vnet.ibm.com>
Hello Theodore Ts'o,
Is there a function similar to ext2fs_dir_iterate2() that will call a hook
function on an ext2_dir_entry_2 structure and not an ext2_dir_entry
structure?
The reason I ask is because btrfs-convert currently tries to do a cast
between the two structures as such:
static int dir_iterate_proc(..., struct ext2_dir_entry *old, ...)
{
...
struct ext2_dir_entry_2 *dirent = (struct ext2_dir_entry_2 *)old;
which works fine on little-endian machines, but breaks on big-endian machines.
If there isn't, would you be interested in a patch that adds a function, say,
ext2_dir_entry_upgrade(struct ext2_dir_entry *old, struct ext2_dir_entry_2 *new)
that will convert one structure to the other and take into account the endianness
of the machine? This would be better than just ad-hoc fixing the code in btrfs.
Thank you,
Wade Cline
next parent reply other threads:[~2012-10-02 19:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <506B31B7.40405@linux.vnet.ibm.com>
2012-10-02 19:02 ` Wade Cline [this message]
2012-10-02 21:08 ` [e2fsprogs] ext2_dir_entry To ext2_dir_entry_2 Casting Theodore Ts'o
2012-10-03 17:39 ` Wade Cline
2012-10-03 17:58 ` Theodore Ts'o
2012-10-03 18:29 ` Wade Cline
2012-10-03 18:54 ` Theodore Ts'o
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=506B3A3E.1060003@linux.vnet.ibm.com \
--to=clinew@linux.vnet.ibm.com \
--cc=cmm@linux.vnet.ibm.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=tytso@mit.edu \
/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).