Skip to contentSkip to conversation

debugfs: open with EXT2_FLAG_64BITS

PATCH In review Eric Sandeen 3 participants 4 messages Sep 11, 2009 – Oct 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 debugfs: open with EXT2_FLAG_64BITS

Pointing debugfs from the pu branch at a large filesystem is still failing with:

Filesystem too large to use legacy bitmaps while reading block bitmap

We need to open with EXT2_FLAG_64BITS; I'm not sure if this should be a switch based on the size of the fs or not?

But in any case the below gets things moving enough to use debugfs on a large filesystem.

---

debugfs/debugfs.c +0 -0
index 3bb309f..fbebae7 100644
@@ -127,7 +127,7 @@ void do_open_filesys(int argc, char **argv)
	int	catastrophic = 0;
	blk64_t	superblock = 0;
	blk64_t	blocksize = 0;
-	int	open_flags = EXT2_FLAG_SOFTSUPP_FEATURES;
+	int	open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS; 
	char	*data_filename = 0;

	reset_getopt();
@@ -2148,7 +2148,7 @@ int main(int argc, char **argv)
	int		sci_idx;
	const char	*usage = "Usage: %s [-b blocksize] [-s superblock] [-f cmd_file] [-R request] [-V] [[-w] [-c] device]";
	int		c;
-	int		open_flags = EXT2_FLAG_SOFTSUPP_FEATURES;
+	int		open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS;
	char		*request = 0;
	int		exit_status = 0;
	char		*cmd_file = 0;
#1 lore raw
Quoted 7 lines · Eric Sandeen

Pointing debugfs from the pu branch at a large filesystem is still failing with:

Filesystem too large to use legacy bitmaps while reading block bitmap

We need to open with EXT2_FLAG_64BITS; I'm not sure if this should be a switch based on the size of the fs or not?

The one thing that is already VERY painful is the time it takes for debugfs to read the bitmaps from disk at startup. Running with "-c" allows that step to be skipped, but tha means it isn't possible to modify the filesystem at all.

The time for 8TB filesystems is already in the multi-minute range, so I can't imagine how long it will take on huge filesystems. The only saving grace might be flex_bg avoiding seeks between every pair of bitmaps.

Has any attention been given to the ext2fs_load_bitmaps() function for flex_bg filesystems? This would need to be tuned to read groups_per_flex block bitmaps first, then groups_per_flex inode bitmaps before skipping to the next flex group. Otherwise we may still be reading each pair of block+inode bitmaps at a time, and only by virtue of disk track caching are we avoiding a seek between each one (which would eventually break down once the groups_per_flex exceeds the track cache size).

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

#2 lore raw
In reply to Eric Sandeen
Quoted 10 lines · Eric Sandeen

Pointing debugfs from the pu branch at a large filesystem is still failing with:

Filesystem too large to use legacy bitmaps while reading block bitmap

We need to open with EXT2_FLAG_64BITS; I'm not sure if this should be a switch based on the size of the fs or not?

But in any case the below gets things moving enough to use debugfs on a large filesystem.

ping?

Thanks,
-Eric

Quoted 30 lines

---

debugfs/debugfs.c +2 -3
index 3bb309f..fbebae7 100644
@@ -127,7 +127,7 @@ void do_open_filesys(int argc, char **argv)
 	int	catastrophic = 0;
 	blk64_t	superblock = 0;
 	blk64_t	blocksize = 0;
-	int	open_flags = EXT2_FLAG_SOFTSUPP_FEATURES;
+	int	open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS; 
 	char	*data_filename = 0;
 
 	reset_getopt();
@@ -2148,7 +2148,7 @@ int main(int argc, char **argv)
 	int		sci_idx;
 	const char	*usage = "Usage: %s [-b blocksize] [-s superblock] [-f cmd_file] [-R request] [-V] [[-w] [-c] device]";
 	int		c;
-	int		open_flags = EXT2_FLAG_SOFTSUPP_FEATURES;
+	int		open_flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS;
 	char		*request = 0;
 	int		exit_status = 0;
 	char		*cmd_file = 0;
 
--

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

#3 lore raw
Quoted 6 lines · Eric Sandeen
Quoted 5 lines · Eric Sandeen

Pointing debugfs from the pu branch at a large filesystem is still failing with:

Filesystem too large to use legacy bitmaps while reading block bitmap

Quoted 7 lines
Quoted 5 lines

We need to open with EXT2_FLAG_64BITS; I'm not sure if this should be a switch based on the size of the fs or not?

But in any case the below gets things moving enough to use debugfs on a large filesystem.

ping?

I've added this patch to the pu branch. I've also updated the pu branch so it's up to date with the latest maint branch. I also found some missing conversions of ext2fs_group_{first,last}_block() to ext2fs_group_{first,last}_block2().

I also cleaned up a number of patches which I'm confident enough are clean enough that I've fast forwarded the next branch to include them.

There are now only 16 patches left that are unique to the pu branch, down from 57 patches initially (and many of the patches are smaller as they were refactored).

- Ted