linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Theodore Tso <tytso@mit.edu>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: powerpc e2fsprogs and fast symlink
Date: Fri, 21 Mar 2008 00:40:28 -0500	[thread overview]
Message-ID: <47E34A4C.2040805@redhat.com> (raw)
In-Reply-To: <47E34515.5070500@redhat.com>

Eric Sandeen wrote:

> Aneesh Kumar K.V wrote:
>
>   
>> The extent support on powerpc doesn't seems to work with e2fsprogs.
>> make check on e2fsprogs on powerpc gives
>>
>> f_extents: basic extents support: failed
>>   
>>     
> I see a few things wrong:
>
> Looks like swap_inode_full was incorrectly swapping the i_block
> data for extents, as well as incorrectly checking for the 
> EXTENTS flag on big-endian boxes.  Hmm maybe I need to think
> a little more about symlinks with the extent flag set...
>   
FWIW, here's a patch for these problems.  Still working on a clean
solution for the last one.

-Eric

Index: e2fsprogs/lib/ext2fs/swapfs.c
===================================================================
--- e2fsprogs.orig/lib/ext2fs/swapfs.c
+++ e2fsprogs/lib/ext2fs/swapfs.c
@@ -147,6 +147,7 @@ void ext2fs_swap_inode_full(ext2_filsys 
 			    int bufsize)
 {
 	unsigned i, has_data_blocks, extra_isize, attr_magic;
+	int has_extents = 0;
 	int islnk = 0;
 	__u32 *eaf, *eat;
 
@@ -172,12 +173,13 @@ void ext2fs_swap_inode_full(ext2_filsys 
 		has_data_blocks = ext2fs_inode_data_blocks(fs, 
 					   (struct ext2_inode *) t);
 	if (hostorder && (f->i_flags & EXT4_EXTENTS_FL))
-		has_data_blocks = 0;
+		has_extents = 1;
 	t->i_flags = ext2fs_swab32(f->i_flags);
-	if (hostorder && (t->i_flags & EXT4_EXTENTS_FL))
-		has_data_blocks = 0;
+	if (!hostorder && (t->i_flags & EXT4_EXTENTS_FL))
+		has_extents = 1;
 	t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
-	if (!islnk || has_data_blocks ) {
+	/* extent data are swapped on access, not here */
+	if (!has_extents && (!islnk || has_data_blocks)) {
 		for (i = 0; i < EXT2_N_BLOCKS; i++)
 			t->i_block[i] = ext2fs_swab32(f->i_block[i]);




  reply	other threads:[~2008-03-21  5:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 19:38 powerpc e2fsprogs and fast symlink Aneesh Kumar K.V
2008-03-20  7:47 ` Aneesh Kumar K.V
2008-03-21  5:18   ` Eric Sandeen
2008-03-21  5:40     ` Eric Sandeen [this message]
2008-03-20 12:50 ` Theodore Tso
2008-03-20 12:56   ` Aneesh Kumar K.V
2008-03-20 19:49 ` Eric Sandeen

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=47E34A4C.2040805@redhat.com \
    --to=sandeen@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@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).