All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] don't set extents flag for _any_ symlinks
Date: Mon, 18 Feb 2008 16:27:52 -0600	[thread overview]
Message-ID: <47BA0668.5020006@redhat.com> (raw)

As symlinks are limited to a single block anyway, and e2fsck
doesn't expect to find it set, don't set the extents flag on 
any type of symlinks at all: fast/in-inode, or the 
external-block flavor.

There are a lot of filesystems out there by now w/ exent-style 
symlink blocks though, so e2fsck should probably be able to 
repair that at some point...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>

---

Index: linux-2.6.24/fs/ext4/namei.c
===================================================================
--- linux-2.6.24.orig/fs/ext4/namei.c
+++ linux-2.6.24/fs/ext4/namei.c
@@ -2223,7 +2226,6 @@ retry:
 		inode->i_op = &ext4_fast_symlink_inode_operations;
 		memcpy((char*)&EXT4_I(inode)->i_data,symname,l);
 		inode->i_size = l-1;
-		EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL;
 	}
 	EXT4_I(inode)->i_disksize = inode->i_size;
 	err = ext4_add_nondir(handle, dentry, inode);

Index: linux-2.6.24/fs/ext4/ialloc.c
===================================================================
--- linux-2.6.24.orig/fs/ext4/ialloc.c
+++ linux-2.6.24/fs/ext4/ialloc.c
@@ -744,7 +744,7 @@ got:
 		ext4_std_error(sb, err);
 		goto fail_free_drop;
 	}
-	if (test_opt(sb, EXTENTS)) {
+	if (test_opt(sb, EXTENTS) && !S_ISLNK(mode)) {
 		EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
 		ext4_ext_tree_init(handle, inode);
 		err = ext4_update_incompat_feature(handle, sb,

             reply	other threads:[~2008-02-18 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 22:27 Eric Sandeen [this message]
2008-02-19  5:22 ` [PATCH] don't set extents flag for _any_ symlinks Mingming Cao

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=47BA0668.5020006@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.