Skip to contentSkip to conversation

mke2fs: enable bigalloc if -C is specified

PATCH In review Eric Sandeen 1 participant 2 messages May 31, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mke2fs: enable bigalloc if -C is specified

If -C is specified w/o -O bigalloc it has no effect and generates no error. If a cluster size is specified, that should imply bigalloc.

---

misc/mke2fs.c +2 -0
index 7ec8cc2..d1944dc 100644
@@ -1351,6 +1351,8 @@ profile_error:
 					optarg);
 				exit(1);
 			}
+			fs_param.s_feature_ro_compat |=
+					EXT4_FEATURE_RO_COMPAT_BIGALLOC;
 			break;
 		case 'D':
 			direct_io = 1;
#1 lore raw
Quoted 3 lines · Eric Sandeen

If -C is specified w/o -O bigalloc it has no effect and generates no error. If a cluster size is specified, that should imply bigalloc.

Hm, so should -O bigalloc even be supported (or documented), or should this always be done via -C XXXX? It seems better to specify the size rather than have some other -O option which picks an (arbitrary?) default of 16x.

I'm also wondering what kind of guidance we should offer for choosing cluster sizes - or if we should default to a cluster size given either fs size, inode count, or combinations thereof.

I think the hard cold truth is that ext4 just isn't sufficiently scalable at larger sizes without a larger cluster size, so I'm inclined to start thinking about choosing some increasing cluster sizes as defaults, what do you think?

And finally, is this stuff robust enough to start documenting in the manpages yet? I'm not sure the enospc problems have been worked out yet...

-Eric

Quoted 18 lines

---

misc/mke2fs.c +2 -0
index 7ec8cc2..d1944dc 100644
@@ -1351,6 +1351,8 @@ profile_error:
 					optarg);
 				exit(1);
 			}
+			fs_param.s_feature_ro_compat |=
+					EXT4_FEATURE_RO_COMPAT_BIGALLOC;
 			break;
 		case 'D':
 			direct_io = 1;