diff options
author | Valerie Clement <valerie.clement@bull.net> | 2008-02-05 10:56:37 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-02-05 10:56:37 -0500 |
commit | b8356c465b42c162f34b5fd4102a6c27cec36f43 (patch) | |
tree | 806034b9694b04341888f7bfcaf118fe73e75b71 /fs/ext4/migrate.c | |
parent | 4d605179723a3fb8ba594d9516897426e6629a5b (diff) |
ext4: Don't set EXTENTS_FL flag for fast symlinks
For fast symbolic links, the file content is stored in the i_block[]
array, which is not compatible with the new file extents format.
e2fsck reports error on such files because EXTENTS_FL is set.
Don't set the EXTENTS_FL flag when creating fast symlinks.
In the case of file migration, skip fast symbolic links.
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r-- | fs/ext4/migrate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 3ebc2332f52e..9ee1f7cfb2c5 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
@@ -414,6 +414,12 @@ int ext4_ext_migrate(struct inode *inode, struct file *filp, | |||
414 | if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) | 414 | if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) |
415 | return -EINVAL; | 415 | return -EINVAL; |
416 | 416 | ||
417 | if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0) | ||
418 | /* | ||
419 | * don't migrate fast symlink | ||
420 | */ | ||
421 | return retval; | ||
422 | |||
417 | down_write(&EXT4_I(inode)->i_data_sem); | 423 | down_write(&EXT4_I(inode)->i_data_sem); |
418 | handle = ext4_journal_start(inode, | 424 | handle = ext4_journal_start(inode, |
419 | EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + | 425 | EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + |