diff options
author | Lukas Czerner <lczerner@redhat.com> | 2010-10-27 21:30:05 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-10-27 21:30:05 -0400 |
commit | 857ac889cce8a486d47874db4d2f9620e7e9e5de (patch) | |
tree | 12401895197d819fcbf2335244d91259f4640aa2 /fs/ext4/ialloc.c | |
parent | bfff68738f1cb5c93dab1114634cea02aae9e7ba (diff) |
ext4: add interface to advertise ext4 features in sysfs
User-space should have the opportunity to check what features doest ext4
support in each particular copy. This adds easy interface by creating new
"features" directory in sys/fs/ext4/. In that directory files
advertising feature names can be created.
Add lazy_itable_init to the feature list.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index e428f23215c0..87d228aae6b0 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -1274,6 +1274,16 @@ extern int ext4_init_inode_table(struct super_block *sb, ext4_group_t group, | |||
1274 | ext4_itable_unused_count(sb, gdp)), | 1274 | ext4_itable_unused_count(sb, gdp)), |
1275 | sbi->s_inodes_per_block); | 1275 | sbi->s_inodes_per_block); |
1276 | 1276 | ||
1277 | if ((used_blks < 0) || (used_blks > sbi->s_itb_per_group)) { | ||
1278 | ext4_error(sb, "Something is wrong with group %u\n" | ||
1279 | "Used itable blocks: %d" | ||
1280 | "itable unused count: %u\n", | ||
1281 | group, used_blks, | ||
1282 | ext4_itable_unused_count(sb, gdp)); | ||
1283 | ret = 1; | ||
1284 | goto out; | ||
1285 | } | ||
1286 | |||
1277 | blk = ext4_inode_table(sb, gdp) + used_blks; | 1287 | blk = ext4_inode_table(sb, gdp) + used_blks; |
1278 | num = sbi->s_itb_per_group - used_blks; | 1288 | num = sbi->s_itb_per_group - used_blks; |
1279 | 1289 | ||
@@ -1283,15 +1293,6 @@ extern int ext4_init_inode_table(struct super_block *sb, ext4_group_t group, | |||
1283 | if (ret) | 1293 | if (ret) |
1284 | goto err_out; | 1294 | goto err_out; |
1285 | 1295 | ||
1286 | if (unlikely(num > EXT4_INODES_PER_GROUP(sb))) { | ||
1287 | ext4_error(sb, "Something is wrong with group %u\n" | ||
1288 | "Used itable blocks: %d" | ||
1289 | "Itable blocks per group: %lu\n", | ||
1290 | group, used_blks, sbi->s_itb_per_group); | ||
1291 | ret = 1; | ||
1292 | goto err_out; | ||
1293 | } | ||
1294 | |||
1295 | /* | 1296 | /* |
1296 | * Skip zeroout if the inode table is full. But we set the ZEROED | 1297 | * Skip zeroout if the inode table is full. But we set the ZEROED |
1297 | * flag anyway, because obviously, when it is full it does not need | 1298 | * flag anyway, because obviously, when it is full it does not need |