diff mbox

[14/49] resize2fs: add inline dirs for remapping

Message ID 20140311065527.30585.97471.stgit@birch.djwong.org
State Accepted, archived
Headers show

Commit Message

Darrick Wong March 11, 2014, 6:55 a.m. UTC
When we're looking for directory blocks for the inode remapping step,
we need to include inline_data directories in the remap process.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 resize/resize2fs.c |    7 +++++++
 1 file changed, 7 insertions(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Theodore Ts'o March 14, 2014, 1:31 p.m. UTC | #1
On Mon, Mar 10, 2014 at 11:55:27PM -0700, Darrick J. Wong wrote:
> When we're looking for directory blocks for the inode remapping step,
> we need to include inline_data directories in the remap process.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 7122b2f..f5f1337 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -1712,6 +1712,13 @@  remap_blocks:
 				retval = pb.error;
 				goto errout;
 			}
+		} else if ((inode->i_flags & EXT4_INLINE_DATA_FL) &&
+			   (rfs->bmap || pb.is_dir)) {
+			/* inline data dir; update it too */
+			retval = ext2fs_add_dir_block2(rfs->old_fs->dblist,
+						       new_inode, 0, 0);
+			if (retval)
+				goto errout;
 		}
 	}
 	io_channel_flush(rfs->old_fs->io);