linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Wade Cline <clinew@linux.vnet.ibm.com>
Cc: "cmm@linux.vnet.ibm.com" <cmm@linux.vnet.ibm.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [e2fsprogs] ext2_dir_entry To ext2_dir_entry_2 Casting
Date: Wed, 3 Oct 2012 14:54:45 -0400	[thread overview]
Message-ID: <20121003185445.GA5160@thunk.org> (raw)
In-Reply-To: <506C8426.4010008@linux.vnet.ibm.com>

On Wed, Oct 03, 2012 at 11:29:58AM -0700, Wade Cline wrote:
> In this case, dir_iterate_proc() is being passed into
> ext2_dir_iterate2() and is called from ext2fs_process_dir_block(),
> not readdir(2). It looks like the main issue would be detecting if the
> EXT2_FEATURE_INCOMPAT_FILETYPE flag is -unset- and manually
> setting the file type to EXT2_FT_UNKNOWN (there appears to be a case for
> handling EXT2_FT_UNKNOWN; so long as the file type is not set to an
> undefined value it should be okay).

EXT2_FT_UNKNOWN == DT_UNKNOWN == 0

Since we've always enforced that name_len < 256, the high 8 bits
of name_len will always be zero, even if !EXT2_FEATURE_INCOMPAT_FILETYPE.

							- Ted

      reply	other threads:[~2012-10-03 18:54 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 ` [e2fsprogs] ext2_dir_entry To ext2_dir_entry_2 Casting Wade Cline
2012-10-02 21:08   ` 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 [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=20121003185445.GA5160@thunk.org \
    --to=tytso@mit.edu \
    --cc=clinew@linux.vnet.ibm.com \
    --cc=cmm@linux.vnet.ibm.com \
    --cc=linux-btrfs@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).